public interface CustomFieldValueHandler
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTR_FIELD
Script attribute: the custom field being validated
|
static java.lang.String |
ATTR_OBJECT
Script attribute: the object being validated
|
static java.lang.String |
ATTR_VALUE
Script attribute: the current value being validated
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLengthValidation(org.cyclos.impl.utils.validation.Property property,
IntegerRange length)
Adds a length range validation on the given
Property for the given IntegerRange. |
void |
addPatternValidation(org.cyclos.impl.utils.validation.Property property,
java.lang.String pattern)
Adds an input with pattern validation on the given
Property for the given pattern. |
void |
addTitleParameters(org.cyclos.impl.utils.reports.ReportParameters reportParameters,
java.lang.Class<? extends CustomField<?,?,?>> customFieldType,
java.util.Collection<CustomFieldValueForSearchDTO> fieldValues)
Adds as report title parameters all custom fields in the given collection
|
void |
addValueValidation(org.cyclos.impl.utils.validation.Validator validator,
CustomField<?,?,?> field,
com.mysema.query.types.path.EntityPathBase<? extends CustomFieldValue<?,?,?,?>> fv,
java.util.Map<java.lang.String,?> dynamicValueBindings)
Adds a validation on the given
Validator for the given CustomField |
void |
addValueValidation(org.cyclos.impl.utils.validation.Validator validator,
CustomField<?,?,?> field,
com.mysema.query.types.path.EntityPathBase<? extends CustomFieldValue<?,?,?,?>> fv,
java.util.Map<java.lang.String,?> dynamicValueBindings,
java.lang.String valuesProperty)
Adds a validation on the given
Validator for the given CustomField, using a custom values collection |
void |
addWordSizeValidation(org.cyclos.impl.utils.validation.Property property,
CustomField<?,?,?> field)
Adds a word size validation on the given
Property.A larger default size will be applied for TEXT and URL. |
<E extends org.cyclos.entities.BaseEntity,CFV extends CustomFieldValue<?,?,?,?>> |
createFilters(com.mysema.query.types.path.EntityPathBase<E> owner,
com.mysema.query.types.path.EntityPathBase<CFV> fv,
java.util.Collection<CustomFieldValueForSearchDTO> customValues)
Adds the given filters to a collection of predicates
|
<DTO extends CustomFieldValueDTO,CF extends CustomField<?,?,?>> |
fillCustomFieldValueDTOFromString(CF field,
DTO dto,
java.lang.String value,
FormatterImpl formatter)
Fills a custom field a
|
org.cyclos.impl.system.DynamicFieldValuesAccessor |
newDynamicValuesAccessor(CustomField<?,?,?> field)
Returns a
DynamicFieldValuesAccessor which can be used to generate the possible values for a given custom field |
com.mysema.query.types.Predicate |
queryFilter(com.mysema.query.types.EntityPath<? extends CustomFieldValue<?,?,?,?>> valuePath,
CustomField<?,?,?> customField,
CustomFieldValueForSearchDTO valueForSearch)
Returns a predicate which represents the condition for the given custom field and value path for the given custom field search value, or null
if no query criteria specified
|
java.util.Map<java.lang.String,java.lang.Object> |
toMap(java.lang.Class<? extends CustomField<?,?,?>> customFieldType,
java.util.List<? extends ICustomFieldValue> customValues)
Returns a Map, keyed by the custom field internal names, whose values are "server side" (example,
Date, not DateTime,
CustomFieldPossibleValue, not CustomFieldPossibleValueVO, etc) |
static final java.lang.String ATTR_OBJECT
static final java.lang.String ATTR_FIELD
static final java.lang.String ATTR_VALUE
<DTO extends CustomFieldValueDTO,CF extends CustomField<?,?,?>> void fillCustomFieldValueDTOFromString(CF field, DTO dto, java.lang.String value, FormatterImpl formatter) throws java.text.ParseException
java.text.ParseExceptionvoid addLengthValidation(org.cyclos.impl.utils.validation.Property property,
IntegerRange length)
Property for the given IntegerRange.
If the length parameter is null then it returns without changes.void addPatternValidation(org.cyclos.impl.utils.validation.Property property,
java.lang.String pattern)
Property for the given pattern.
If the pattern parameter is empty (or null) then it returns without changes.void addTitleParameters(org.cyclos.impl.utils.reports.ReportParameters reportParameters,
java.lang.Class<? extends CustomField<?,?,?>> customFieldType,
java.util.Collection<CustomFieldValueForSearchDTO> fieldValues)
void addValueValidation(org.cyclos.impl.utils.validation.Validator validator,
CustomField<?,?,?> field,
com.mysema.query.types.path.EntityPathBase<? extends CustomFieldValue<?,?,?,?>> fv,
java.util.Map<java.lang.String,?> dynamicValueBindings)
Validator for the given CustomFieldvoid addValueValidation(org.cyclos.impl.utils.validation.Validator validator,
CustomField<?,?,?> field,
com.mysema.query.types.path.EntityPathBase<? extends CustomFieldValue<?,?,?,?>> fv,
java.util.Map<java.lang.String,?> dynamicValueBindings,
java.lang.String valuesProperty)
Validator for the given CustomField, using a custom values collectionvoid addWordSizeValidation(org.cyclos.impl.utils.validation.Property property,
CustomField<?,?,?> field)
Property.<E extends org.cyclos.entities.BaseEntity,CFV extends CustomFieldValue<?,?,?,?>> com.mysema.query.types.Predicate createFilters(com.mysema.query.types.path.EntityPathBase<E> owner, com.mysema.query.types.path.EntityPathBase<CFV> fv, java.util.Collection<CustomFieldValueForSearchDTO> customValues)
org.cyclos.impl.system.DynamicFieldValuesAccessor newDynamicValuesAccessor(CustomField<?,?,?> field)
DynamicFieldValuesAccessor which can be used to generate the possible values for a given custom fieldcom.mysema.query.types.Predicate queryFilter(com.mysema.query.types.EntityPath<? extends CustomFieldValue<?,?,?,?>> valuePath, CustomField<?,?,?> customField, CustomFieldValueForSearchDTO valueForSearch)
java.util.Map<java.lang.String,java.lang.Object> toMap(java.lang.Class<? extends CustomField<?,?,?>> customFieldType, java.util.List<? extends ICustomFieldValue> customValues)
Date, not DateTime,
CustomFieldPossibleValue, not CustomFieldPossibleValueVO, etc)