Package org.alfresco.repo.dictionary
Interface ValueDataTypeValidator
-
- All Known Implementing Classes:
ValueDataTypeValidatorImpl
public interface ValueDataTypeValidatorA generic validator to validate string value against the target data type.- Author:
- Jamal Kaabi-Mofrad
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidvalidateValue(java.lang.String dataType, java.lang.String value)Validates the givenvalueagainst the givendataType.
-
-
-
Method Detail
-
validateValue
void validateValue(java.lang.String dataType, java.lang.String value) throws org.alfresco.service.namespace.InvalidQNameException, org.alfresco.service.namespace.NamespaceException, org.alfresco.error.AlfrescoRuntimeExceptionValidates the givenvalueagainst the givendataType.The supplied
dataTypemust be a validQNameprefixed string so it can be resolved into a fully qualified name data type registered in theDataTypeDefinition.- Parameters:
dataType- the target prefixed data type (e.g.d:int) which the string value should be converted tovalue- non-empty string value- Throws:
org.alfresco.service.namespace.InvalidQNameException- if the dataType is not a validQNameprefixed string (prefix:type)org.alfresco.service.namespace.NamespaceException- if the prefix of the given dataType is not mapped to a namespace URIorg.alfresco.error.AlfrescoRuntimeException- if the given value cannot be converted into the given data type, or the data type is unknown
-
-