Package org.hippoecm.frontend.types
Interface IFieldDescriptor
-
- All Superinterfaces:
org.apache.wicket.util.io.IClusterable
,IObservable
,Serializable
- All Known Implementing Classes:
JavaFieldDescriptor
public interface IFieldDescriptor extends org.apache.wicket.util.io.IClusterable, IObservable
The field descriptor contains the meta information of a field in a type.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addValidator(String validator)
Set<String>
getExcluded()
For residual field definitions (name is '*'), the excluded names consist of the list of the paths for all other fields in the type.String
getName()
Symbolic name of the field.String
getPath()
The (JCR) path of the field.ITypeDescriptor
getTypeDescriptor()
The descriptor of the type of the field.Set<String>
getValidators()
The symbolic names for validators associated with this field.boolean
isAutoCreated()
Will an instance of the field be created automatically for a new instance of the containing type.boolean
isMandatory()
When the field is mandatory, it must be present for the (JCR) session to be in a valid state.boolean
isMultiple()
Can multiple instances of this field be created.boolean
isOrdered()
When multiple instances of the field can be present, can they be reordered.boolean
isPrimary()
Is this field the primary field of the containing type.boolean
isProtected()
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
setPath(String path)
-
Methods inherited from interface org.hippoecm.frontend.model.event.IObservable
equals, hashCode, setObservationContext, startObservation, stopObservation
-
-
-
-
Method Detail
-
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
Set<String> 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
Set<String> getValidators()
The symbolic names for validators associated with this field.- Returns:
- the names of applicable validators
-
setPath
void setPath(String path) throws TypeException
- Throws:
TypeException
-
setMultiple
void setMultiple(boolean multiple)
-
setAutoCreated
void setAutoCreated(boolean autocreated)
-
setMandatory
void setMandatory(boolean mandatory)
-
setOrdered
void setOrdered(boolean isOrdered)
-
addValidator
void addValidator(String validator)
-
removeValidator
void removeValidator(String validator)
-
-