PREV CLASS NEXT CLASS
Tree SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.workplace.wcm.api.extensions.validation
Class FileUploadValidationExceptionjava.lang.Objectjava.lang.Throwable
java.lang.Exception
com.ibm.workplace.wcm.api.exceptions.WCMException
com.ibm.workplace.wcm.api.extensions.validation.FileUploadValidationException
- All Implemented Interfaces:
- Localized, java.io.Serializable
public class FileUploadValidationException- extends WCMException
A FileUploadValidationException if any error occurs while validation file contents by a FileUploadValidation Plugin.
- Since:
- 6.1.5
- See Also:
- Serialized Form
Field Summary
Fields inherited from class com.ibm.workplace.wcm.api.exceptions.WCMException ERR_APTRIX
Constructor Summary FileUploadValidationException()
Constructs a new exception with the given message.FileUploadValidationException(java.lang.String detail)
Constructs a new exception with the given message.FileUploadValidationException(java.lang.String detail, java.lang.Throwable cause)
Constructs a new exception with the given message.FileUploadValidationException(java.lang.Throwable cause)
Constructs a new exception with the given message.
Method Summary java.lang.String getReason()
Retrieves the detailed reason for validation failure.java.lang.String getReason(java.util.Locale locale)
Retrieves the detailed reason for validation failure.java.lang.String getValidationFailureMessage(java.util.Locale locale)
Retrieves the reason for validation failure, formatted ( if possible ) to the given Locale.boolean isConsiderFileContentsValid()
If true the file contents should be considered valid, even though an exception was thrown during validation.void setConsiderFileContentsValid(boolean considerFileContentsValid)
If set to true, WCM will consider the file content valid ( is passed validation) even though an exception is being thrown during validation.void setReason(java.lang.String reason)
Sets the reason for the validation failure.
Methods inherited from class com.ibm.workplace.wcm.api.exceptions.WCMException getCause, getDescription, getErrorCode, getLocales, getMessage, getMessage, getTitle, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail FileUploadValidationException
public FileUploadValidationException()
- Constructs a new exception with the given message.
FileUploadValidationException
public FileUploadValidationException(java.lang.String detail, java.lang.Throwable cause)
- Constructs a new exception with the given message.
- Parameters:
- detail - the message
- cause - the exception that caused this exception
FileUploadValidationException
public FileUploadValidationException(java.lang.String detail)
- Constructs a new exception with the given message.
- Parameters:
- detail - the message
FileUploadValidationException
public FileUploadValidationException(java.lang.Throwable cause)
- Constructs a new exception with the given message.
- Parameters:
- cause - the exception that caused this exception
Method Detail isConsiderFileContentsValid
public boolean isConsiderFileContentsValid()
- If true the file contents should be considered valid, even though an exception was thrown during validation.
- Returns:
- true if the file should be considered to having passed validation
setConsiderFileContentsValid
public void setConsiderFileContentsValid(boolean considerFileContentsValid)
- If set to true, WCM will consider the file content valid ( is passed validation) even though an exception is being thrown during validation.
This can be used in a case where the plugin failed for some reason other than the file failing validation, and it wishes to a allow the file to be stored.
the default values is false.
- Parameters:
- considerFileContentsValid - - set to true is the exception is "informational" to WCM and the file contents are valid.
getReason
public java.lang.String getReason()
- Retrieves the detailed reason for validation failure.
- Returns:
- reason for the validation failure.
getReason
public java.lang.String getReason(java.util.Locale locale)
- Retrieves the detailed reason for validation failure.
- Parameters:
- locale - Locale version of the reason string.
- Returns:
- reason for the validation failure.
setReason
public void setReason(java.lang.String reason)
- Sets the reason for the validation failure. This can be used to provide a more detailed description of the error. The message should be suitable to display to the User.
- Parameters:
- reason - Detailed description of the validation failure.
getValidationFailureMessage
public java.lang.String getValidationFailureMessage(java.util.Locale locale)PREV CLASS NEXT CLASS
- Retrieves the reason for validation failure, formatted ( if possible ) to the given Locale. By default this will return the result of getReason(locale), If getReason(locale) returns null, then getMessage() will be returned.
- Parameters:
- locale - locale used to format the returned string
- Returns:
- reason for the validation failure.
Tree SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD