Interface IPropertyType
- All Known Subinterfaces:
IPropertyTypeBoolean,IPropertyTypeInteger,IPropertyTypePath,IPropertyTypeString
- All Known Implementing Classes:
PropertyTypeBoolean,PropertyTypeInteger,PropertyTypePath,PropertyTypeSelection,PropertyTypeString
public interface IPropertyType
Base interface for property types.
Implementations provide a default value, validation rules, and optional read/write conversion hooks for property values.
-
Method Summary
Modifier and TypeMethodDescriptiondefault ObjectafterRead(IPropertyDefinition def, Object value) Post-processing to be done after reading a value.default ObjectbeforeWrite(IPropertyDefinition def, Object value) Pre-processing to be done before storing a value.Get the default value.getName()Get the type name.booleanValidate a property value.
-
Method Details
-
getName
String getName()Get the type name.- Returns:
- the human-readable type name
-
getDefault
Object getDefault()Get the default value.- Returns:
- the default value, cannot be null
-
validate
Validate a property value.- Parameters:
value- the property value- Returns:
- true on success
-
afterRead
Post-processing to be done after reading a value. This method should only be called after a successful call tovalidate(Object).- Parameters:
def- property definition associated with the valuevalue- must not be null- Returns:
- the converted value to expose to clients
-
beforeWrite
Pre-processing to be done before storing a value.- Parameters:
def- property definition associated with the valuevalue- value to be stored- Returns:
- the converted value to persist
-