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 default value for a given property type, as well as a validation method to validate a property against a type.
  • Method Details

    • getName

      String getName()
      Get the type name.
      Returns:
    • getDefault

      Object getDefault()
      Get the default value.
      Returns:
      the default value, cannot be null
    • validate

      boolean validate(Object value)
      Validate a property value.
      Parameters:
      value - the property value
      Returns:
      true on success
    • afterRead

      default Object afterRead(IPropertyDefinition def, Object value)
      Post-processing to be done after reading a value. This method should only be called after a successful call to validate(Object).
      Parameters:
      def -
      value - must not be null
      Returns:
    • beforeWrite

      default Object beforeWrite(IPropertyDefinition def, Object value)
      Pre-processing to be done before storing a value.
      Parameters:
      def -
      value -
      Returns: