Interface ValueDataTypeValidator

  • All Known Implementing Classes:
    ValueDataTypeValidatorImpl

    public interface ValueDataTypeValidator
    A generic validator to validate string value against the target data type.
    Author:
    Jamal Kaabi-Mofrad
    • Method Detail

      • validateValue

        void validateValue​(String dataType,
                           String value)
                    throws InvalidQNameException,
                           NamespaceException,
                           AlfrescoRuntimeException
        Validates the given value against the given dataType.

        The supplied dataType must be a valid QName prefixed string so it can be resolved into a fully qualified name data type registered in the DataTypeDefinition.

        Parameters:
        dataType - the target prefixed data type (e.g. d:int) which the string value should be converted to
        value - non-empty string value
        Throws:
        InvalidQNameException - if the dataType is not a valid QName prefixed string (prefix:type )
        NamespaceException - if the prefix of the given dataType is not mapped to a namespace URI
        AlfrescoRuntimeException - if the given value cannot be converted into the given data type, or the data type is unknown