TypeService¶
-
public interface
TypeService
¶ The
TypeService
is an interface defining available methods to execute various actions on Field Types.
Methods¶
findType¶
-
TypeDto
findType
(Class<?> clazz)¶ Retrieves MDS type, based on the class that handles that type in the backend. Throws
org.motechproject.mds.exception.type.NoSuchTypeException
when the given class does not handle any MDS type.Parameters: - clazz – handler class
Returns: MDS type that is handled by the given class
findValidations¶
-
List<TypeValidation>
findValidations
(TypeDto type, Class<? extends Annotation> aClass)¶ Retrieves all MDS validations for the given type, that are triggered by the given annotation.
Parameters: - type – MDS type representation
- aClass – Annotation class type
Returns: A list of validations that match the criteria or empty list, if none were found
getAllTypes¶
getType¶
-
Type
getType
(TypeValidation validation)¶ Retrieves MDS Type, connected to the given validation.
Parameters: - validation – Validation representation
Returns: MDS Type that is connected to this validation