Class FileAttributeDefinitionFormValidator
- java.lang.Object
-
- org.zkoss.bind.validator.AbstractValidator
-
- org.openforis.collect.designer.form.validator.BaseValidator
-
- org.openforis.collect.designer.form.validator.FormValidator
-
- org.openforis.collect.designer.form.validator.NodeDefinitionFormValidator
-
- org.openforis.collect.designer.form.validator.AttributeDefinitionFormValidator
-
- org.openforis.collect.designer.form.validator.FileAttributeDefinitionFormValidator
-
- All Implemented Interfaces:
org.zkoss.bind.Validator
public class FileAttributeDefinitionFormValidator extends AttributeDefinitionFormValidator
- Author:
- S. Ricci
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringEXPRESSIONS_REGEXprotected static StringFILE_NAME_EXPRESSION_FIELDprotected static StringINVALID_EXTENSIONS_ERROR_KEYprotected static intMAX_FILE_SIZEprotected static StringMAX_SIZE_FIELD-
Fields inherited from class org.openforis.collect.designer.form.validator.AttributeDefinitionFormValidator
CALCULATED_ONLY_ONE_TIME_FIELD, KEY_ATTRIBUTE_CANNOT_BE_MULTIPLE_MESSAGE_KEY
-
Fields inherited from class org.openforis.collect.designer.form.validator.NodeDefinitionFormValidator
BACKGROUND_COLOR, BACKGROUND_TRANSPARENCY, COLUMN_FIELD, COLUMN_SPAN_FIELD, DESCRIPTION_FIELD, KEY_FIELD, MAX_COUNT_EXPRESSION_FIELD, MAX_COUNT_MIN_VALUE, MIN_COUNT_EXPRESSION_FIELD, NAME_FIELD, NODE_NAME_ALREADY_DEFINED_MESSAGE_KEY, RELEVANCE_TYPE_FIELD, RELEVANT_EXPR_FIELD, REQUIRED_EXPR_FIELD, REQUIRENESS_TYPE_FIELD, TAB_NAME_FIELD
-
Fields inherited from class org.openforis.collect.designer.form.validator.FormValidator
blocking, CIRCULAR_REFERENCE_IN_EXPRESSION_MESSAGE_KEY, INVALID_EXPRESSION_MESSAGE_KEY, RESERVED_NAME_MESSAGE_KEY
-
Fields inherited from class org.openforis.collect.designer.form.validator.BaseValidator
FIELD_REQUIRED_MESSAGE_KEY, GREATER_THAN_EQUAL_MESSAGE_KEY, GREATER_THAN_MESSAGE_KEY, INTERNAL_NAME_INVALID_VALUE_ERROR_KEY, INVALID_URI_MESSAGE_KEY, ITEM_NAME_ALREADY_DEFINED_MESSAGE_KEY, LESS_THAN_EQUAL_MESSAGE_KEY, LESS_THAN_MESSAGE_KEY
-
-
Constructor Summary
Constructors Constructor Description FileAttributeDefinitionFormValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidinternalValidate(org.zkoss.bind.ValidationContext ctx)protected voidvalidateFileNameExpression(org.zkoss.bind.ValidationContext ctx)protected voidvalidateMaxSize(org.zkoss.bind.ValidationContext ctx)-
Methods inherited from class org.openforis.collect.designer.form.validator.AttributeDefinitionFormValidator
getFieldNames, validateAttributeDefaults, validateChecks
-
Methods inherited from class org.openforis.collect.designer.form.validator.NodeDefinitionFormValidator
getEditedNode, getParentEntity, isNameUnique, validateDescription, validateMaxCount, validateName, validateNameUniqueness
-
Methods inherited from class org.openforis.collect.designer.form.validator.FormValidator
afterValidate, getExpressionValidator, getMessage, isBlocking, isEditingItem, normalizeMessageArgument, normalizeMessageArguments, validate, validateBooleanExpressionField, validateExpression, validateExpressionField, validateExpressionField, validateNameNotReserved, validatePathExpressionField, validateValueExpressionField, validateValueExpressionField
-
Methods inherited from class org.openforis.collect.designer.form.validator.BaseValidator
createCompareMessage, getNumericValue, getProperties, getValue, getValue, getValueWithDefault, getVM, isNumber, isNumber, validateGreaterThan, validateGreaterThan, validateGreaterThan, validateGreaterThan, validateInternalName, validateInternalName, validateLessThan, validateLessThan, validateLessThan, validateLessThan, validateRegEx, validateRegEx, validateRegEx, validateRegEx, validateRegExValue, validateRequired, validateRequired, validateRequired, validateUri
-
-
-
-
Field Detail
-
MAX_FILE_SIZE
protected static final int MAX_FILE_SIZE
- See Also:
- Constant Field Values
-
MAX_SIZE_FIELD
protected static final String MAX_SIZE_FIELD
- See Also:
- Constant Field Values
-
FILE_NAME_EXPRESSION_FIELD
protected static final String FILE_NAME_EXPRESSION_FIELD
- See Also:
- Constant Field Values
-
EXPRESSIONS_REGEX
protected static final String EXPRESSIONS_REGEX
- See Also:
- Constant Field Values
-
INVALID_EXTENSIONS_ERROR_KEY
protected static final String INVALID_EXTENSIONS_ERROR_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
internalValidate
protected void internalValidate(org.zkoss.bind.ValidationContext ctx)
- Overrides:
internalValidatein classAttributeDefinitionFormValidator
-
validateMaxSize
protected void validateMaxSize(org.zkoss.bind.ValidationContext ctx)
-
validateFileNameExpression
protected void validateFileNameExpression(org.zkoss.bind.ValidationContext ctx)
-
-