Package org.forgerock.opendj.config
Class PropertyException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.forgerock.opendj.config.PropertyException
-
- All Implemented Interfaces:
Serializable,LocalizableException
public final class PropertyException extends RuntimeException implements LocalizableException
Exceptions thrown as a result of errors that occurred when decoding and modifying property values.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PropertyExceptiondefaultBehaviorException(PropertyDefinition<?> pd, Throwable cause)Creates a new default behavior exception with a cause.static PropertyExceptionerrorReadingFileCommonsConfigTokenException(PropertyDefinition<?> pd, String expression, LocalizableException cause)Creates a new error reading file commons-config token exception, raised when the file content resolver could not retrieve the value from the file.LocalizableMessagegetMessageObject()Returns the localizable message that explains the problem that occurred.PropertyDefinition<?>getPropertyDefinition()Returns the property definition associated with the property that caused the exception.static PropertyExceptionillegalPropertyValueException(PropertyDefinition<?> pd, Object value)Creates a new illegal property value exception.static PropertyExceptionillegalPropertyValueException(PropertyDefinition<?> pd, Object value, Throwable cause)Creates a new illegal property value exception.static PropertyExceptionpropertyIsMandatoryException(PropertyDefinition<?> pd)Creates a new property is mandatory exception.static PropertyExceptionpropertyIsReadOnlyException(PropertyDefinition<?> pd)Creates a new property is read-only exception.static PropertyExceptionpropertyIsSingleValuedException(PropertyDefinition<?> pd)Creates a new property is single valued exception.static PropertyExceptionpropertyIsVirtualException(PropertyDefinition<?> pd)Creates a new property is virtual exception.static PropertyExceptionunknownPropertyDefinitionException(PropertyDefinition<?> pd)Creates a new unknown property definition exception.static PropertyExceptionunresolvedCommonsConfigTokenException(PropertyDefinition<?> pd, String expression, Throwable cause)Creates a new unresolved commons-config token exception, raised when a token in a commons-config expression could not be resolved.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
defaultBehaviorException
public static PropertyException defaultBehaviorException(PropertyDefinition<?> pd, Throwable cause)
Creates a new default behavior exception with a cause.- Parameters:
pd- The property definition whose default values could not be determined.cause- The exception that prevented the default values from being determined.- Returns:
- A new default behavior exception with a cause.
-
illegalPropertyValueException
public static PropertyException illegalPropertyValueException(PropertyDefinition<?> pd, Object value)
Creates a new illegal property value exception.- Parameters:
pd- The property definition.value- The illegal property value.- Returns:
- A new illegal property value exception.
-
unresolvedCommonsConfigTokenException
public static PropertyException unresolvedCommonsConfigTokenException(PropertyDefinition<?> pd, String expression, Throwable cause)
Creates a new unresolved commons-config token exception, raised when a token in a commons-config expression could not be resolved.- Parameters:
pd- The property definition.expression- The commons-config expression which could not be resolved.cause- Underlying exception that may provide more details.- Returns:
- A new unresolved commons-config token exception.
-
errorReadingFileCommonsConfigTokenException
public static PropertyException errorReadingFileCommonsConfigTokenException(PropertyDefinition<?> pd, String expression, LocalizableException cause)
Creates a new error reading file commons-config token exception, raised when the file content resolver could not retrieve the value from the file.- Parameters:
pd- The property definition.expression- The commons-config expression which contains a "file:" partcause- Underlying exception that may provide more details.- Returns:
- A new exception
-
illegalPropertyValueException
public static PropertyException illegalPropertyValueException(PropertyDefinition<?> pd, Object value, Throwable cause)
Creates a new illegal property value exception.- Parameters:
pd- The property definition.value- The illegal property value.cause- The cause.- Returns:
- A new illegal property value exception.
-
propertyIsMandatoryException
public static PropertyException propertyIsMandatoryException(PropertyDefinition<?> pd)
Creates a new property is mandatory exception.- Parameters:
pd- The property definition.- Returns:
- A new property is mandatory exception.
-
propertyIsReadOnlyException
public static PropertyException propertyIsReadOnlyException(PropertyDefinition<?> pd)
Creates a new property is read-only exception.- Parameters:
pd- The property definition.- Returns:
- A new property is read-only exception.
-
propertyIsSingleValuedException
public static PropertyException propertyIsSingleValuedException(PropertyDefinition<?> pd)
Creates a new property is single valued exception.- Parameters:
pd- The property definition.- Returns:
- A new property is single valued exception.
-
propertyIsVirtualException
public static PropertyException propertyIsVirtualException(PropertyDefinition<?> pd)
Creates a new property is virtual exception.- Parameters:
pd- The property definition.- Returns:
- A new property is virtual exception.
-
unknownPropertyDefinitionException
public static PropertyException unknownPropertyDefinitionException(PropertyDefinition<?> pd)
Creates a new unknown property definition exception.- Parameters:
pd- The unknown property definition.- Returns:
- A new unknown property definition exception.
-
getMessageObject
public LocalizableMessage getMessageObject()
Description copied from interface:LocalizableExceptionReturns the localizable message that explains the problem that occurred.- Specified by:
getMessageObjectin interfaceLocalizableException- Returns:
- The localizable message that explains the problem that occurred.
-
getPropertyDefinition
public PropertyDefinition<?> getPropertyDefinition()
Returns the property definition associated with the property that caused the exception.- Returns:
- The property definition associated with the property that caused the exception.
-
-