Class FieldModelHandler
java.lang.Object
ch.tocco.nice2.model.entity.impl.reading.entity.FieldModelHandler
- All Implemented Interfaces:
ValidatorReceivable
Represents a field tag and sub elements of an entityModel xml.
-
Constructor Summary
ConstructorDescriptionFieldModelHandler
(boolean isKey, NiceModelReceiver receiver, EntityModel parent, DisplayValueFactory displayFactory, ValidatorHandlerContextFactory validatorHandlerContextFactory, EntityModelHandlerImpl.Prefix fieldPrefix, DefaultValueResolver resolver, ConfigModuleContext configModuleContext) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addValidator
(Validator validator) This case only allows an AndGroupValidatorImpl, not just any validator!final void
finish()
label()
void
setBinaryReplacementDisabled
(boolean disabled) void
void
setDocumentation
(String documentation) void
void
setLocalized
(boolean localized) void
void
setNullable
(boolean nullable) void
setPrivilegedOnly
(boolean privilegedOnly) void
void
void
setUnique
(boolean unique) void
setXmlFilter
(boolean xssFilter)
-
Constructor Details
-
FieldModelHandler
public FieldModelHandler(boolean isKey, NiceModelReceiver receiver, EntityModel parent, DisplayValueFactory displayFactory, ValidatorHandlerContextFactory validatorHandlerContextFactory, @Nullable EntityModelHandlerImpl.Prefix fieldPrefix, DefaultValueResolver resolver, ConfigModuleContext configModuleContext)
-
-
Method Details
-
setName
- Throws:
IllegalArgumentException
-
label
-
setDocumentation
-
setDoc
-
setTarget
-
setType
- Throws:
InvalidValueException
-
setLabel
- Throws:
InvalidValueException
-
setNullable
-
setLocalized
-
setXmlFilter
-
setUnique
-
setBinaryReplacementDisabled
-
setPrivilegedOnly
-
addValidations
@Element("validations") @Cardinality(min=0, max=1) public AndGroupValidatorModelHandler addValidations() throws ModelBuildException- Throws:
ModelBuildException
-
addDefaultValues
@Element("default") @Cardinality(min=0, max=1) public DefaultValueHandler addDefaultValues() throws ModelBuildException- Throws:
ModelBuildException
-
finish
- Throws:
InvalidValueException
-
addValidator
This case only allows an AndGroupValidatorImpl, not just any validator!- Specified by:
addValidator
in interfaceValidatorReceivable
- Parameters:
validator
- The main group.- Throws:
IllegalArgumentException
- if a later validator uses a stronger error level than a previous one in the same group.
-