Package org.hippoecm.frontend.types
Interface IFieldDescriptor
- All Superinterfaces:
org.apache.wicket.util.io.IClusterable
,IObservable
,Serializable
- All Known Implementing Classes:
JavaFieldDescriptor
The field descriptor contains the meta information of a field in a type.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addValidator
(String validator) For residual field definitions (name is '*'), the excluded names consist of the list of the paths for all other fields in the type.getName()
Symbolic name of the field.getPath()
The (JCR) path of the field.The descriptor of the type of the field.The symbolic names for validators associated with this field.boolean
Will an instance of the field be created automatically for a new instance of the containing type.boolean
When the field is mandatory, it must be present for the (JCR) session to be in a valid state.boolean
Can multiple instances of this field be created.boolean
When multiple instances of the field can be present, can they be reordered.boolean
Is this field the primary field of the containing type.boolean
Is the field protected, i.e.void
removeValidator
(String validator) void
setAutoCreated
(boolean autocreated) void
setExcluded
(Set<String> set) void
setMandatory
(boolean mandatory) void
setMultiple
(boolean multiple) void
setOrdered
(boolean isOrdered) void
Methods inherited from interface org.hippoecm.frontend.model.event.IObservable
equals, hashCode, setObservationContext, startObservation, stopObservation
-
Method Details
-
getName
String getName()Symbolic name of the field.- Returns:
- the name
-
getTypeDescriptor
ITypeDescriptor getTypeDescriptor()The descriptor of the type of the field.- Returns:
- the type
-
getPath
String getPath()The (JCR) path of the field. This will correspond to the name of the child node or the property.- Returns:
- the path
-
isMultiple
boolean isMultiple()Can multiple instances of this field be created.- Returns:
- true when multiple instances can be created
-
isAutoCreated
boolean isAutoCreated()Will an instance of the field be created automatically for a new instance of the containing type.- Returns:
- will an instance of the field be created
-
isProtected
boolean isProtected()Is the field protected, i.e. can it not be set using the (JCR) api, but is it managed by the system itself.- Returns:
- true when the field is protected
-
isMandatory
boolean isMandatory()When the field is mandatory, it must be present for the (JCR) session to be in a valid state. Note that the use of mandatory fields is discouraged, as the presence of an invalid mandatory field on one node can prevent a wholly different node from being persisted.- Returns:
- whether the field is mandatory
-
isOrdered
boolean isOrdered()When multiple instances of the field can be present, can they be reordered. I.e. do instances behave like a set or a list.- Returns:
- are instances of the field ordered
-
isPrimary
boolean isPrimary()Is this field the primary field of the containing type. Only one field can be the primary field.- Returns:
- whether this field is the primary field
-
getExcluded
For residual field definitions (name is '*'), the excluded names consist of the list of the paths for all other fields in the type.- Returns:
- the excluded names
-
getValidators
The symbolic names for validators associated with this field.- Returns:
- the names of applicable validators
-
setPath
- Throws:
TypeException
-
setMultiple
void setMultiple(boolean multiple) -
setAutoCreated
void setAutoCreated(boolean autocreated) -
setMandatory
void setMandatory(boolean mandatory) -
setOrdered
void setOrdered(boolean isOrdered) -
addValidator
-
setExcluded
-
removeValidator
-