public interface AttributeValueSyntax<T>
Note that validation is only meaningful when the implementation was properly populated with configuration.
Modifier and Type | Method and Description |
---|---|
boolean |
areEqual(T value,
Object another) |
default boolean |
areEqualStringValue(String value,
String another)
Converts values from string and then performs equality checking
|
T |
convertFromString(String stringRepresentation)
Converts the value from string representation as produced by
convertToString(Object) |
String |
convertToString(T value)
Dumps a domain value to string.
|
default T |
deserializeSimple(String value)
Many attributes are passed in a string form, especially when obtained externally.
|
default Optional<pl.edu.icm.unity.types.confirmation.EmailConfirmationConfiguration> |
getEmailConfirmationConfiguration()
If syntax is verifiable by email return confirmation configuration
|
com.fasterxml.jackson.databind.JsonNode |
getSerializedConfiguration() |
String |
getValueSyntaxId() |
int |
hashCode(Object value) |
boolean |
isEmailVerifiable() |
boolean |
isUserVerifiable() |
default String |
serializeSimple(T value)
Performs a simplified serialization of the value object to string.
|
void |
setSerializedConfiguration(com.fasterxml.jackson.databind.JsonNode json)
Initializes
|
void |
validate(T value)
Validates the value
|
default void |
validateStringValue(String value)
Converts value to string and then validates it
|
com.fasterxml.jackson.databind.JsonNode getSerializedConfiguration()
void setSerializedConfiguration(com.fasterxml.jackson.databind.JsonNode json)
json
- String getValueSyntaxId()
void validate(T value) throws pl.edu.icm.unity.exceptions.IllegalAttributeValueException
value
- pl.edu.icm.unity.exceptions.IllegalAttributeValueException
default void validateStringValue(String value) throws pl.edu.icm.unity.exceptions.IllegalAttributeValueException
value
- pl.edu.icm.unity.exceptions.IllegalAttributeValueException
boolean areEqual(T value, Object another)
value
- another
- default boolean areEqualStringValue(String value, String another)
value
- another
- int hashCode(Object value)
value,
- must be of T type, otherwise the standard hash should be returned.default String serializeSimple(T value)
domain
- objectdefault T deserializeSimple(String value) throws pl.edu.icm.unity.exceptions.IllegalAttributeValueException
value
- to deserializepl.edu.icm.unity.exceptions.IllegalAttributeValueException
#serializeSimple(Object)}
T convertFromString(String stringRepresentation)
convertToString(Object)
stringRepresentation
- pl.edu.icm.unity.exceptions.IllegalAttributeValueException
- if the conversion can not be performed.String convertToString(T value)
serializeSimple(Object)
) must
output a complete value.value
- boolean isEmailVerifiable()
isUserVerifiable()
must also return trueboolean isUserVerifiable()
default Optional<pl.edu.icm.unity.types.confirmation.EmailConfirmationConfiguration> getEmailConfirmationConfiguration()
Copyright © 2018 Unity. All rights reserved.