Class JavaFieldDescriptor

java.lang.Object
org.hippoecm.frontend.types.JavaFieldDescriptor
All Implemented Interfaces:
Serializable, org.apache.wicket.model.IDetachable, org.apache.wicket.util.io.IClusterable, IObservable, IFieldDescriptor

public class JavaFieldDescriptor extends Object implements IFieldDescriptor, org.apache.wicket.model.IDetachable
Bean implementation of the IFieldDescriptor interface.
See Also:
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Description copied from interface: IFieldDescriptor
      Symbolic name of the field.
      Specified by:
      getName in interface IFieldDescriptor
      Returns:
      the name
    • setName

      public void setName(String name)
    • getType

      public String getType()
    • getTypeDescriptor

      public ITypeDescriptor getTypeDescriptor()
      Description copied from interface: IFieldDescriptor
      The descriptor of the type of the field.
      Specified by:
      getTypeDescriptor in interface IFieldDescriptor
      Returns:
      the type
    • getPath

      public String getPath()
      Description copied from interface: IFieldDescriptor
      The (JCR) path of the field. This will correspond to the name of the child node or the property.
      Specified by:
      getPath in interface IFieldDescriptor
      Returns:
      the path
    • setPath

      public void setPath(String path)
      Specified by:
      setPath in interface IFieldDescriptor
    • isMultiple

      public boolean isMultiple()
      Description copied from interface: IFieldDescriptor
      Can multiple instances of this field be created.
      Specified by:
      isMultiple in interface IFieldDescriptor
      Returns:
      true when multiple instances can be created
    • setMultiple

      public void setMultiple(boolean multiple)
      Specified by:
      setMultiple in interface IFieldDescriptor
    • isAutoCreated

      public boolean isAutoCreated()
      Description copied from interface: IFieldDescriptor
      Will an instance of the field be created automatically for a new instance of the containing type.
      Specified by:
      isAutoCreated in interface IFieldDescriptor
      Returns:
      will an instance of the field be created
    • setAutoCreated

      public void setAutoCreated(boolean autocreated)
      Specified by:
      setAutoCreated in interface IFieldDescriptor
    • isProtected

      public boolean isProtected()
      Description copied from interface: IFieldDescriptor
      Is the field protected, i.e. can it not be set using the (JCR) api, but is it managed by the system itself.
      Specified by:
      isProtected in interface IFieldDescriptor
      Returns:
      true when the field is protected
    • setProtected

      public void setProtected(boolean protect)
    • isMandatory

      public boolean isMandatory()
      Description copied from interface: IFieldDescriptor
      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.
      Specified by:
      isMandatory in interface IFieldDescriptor
      Returns:
      whether the field is mandatory
    • setMandatory

      public void setMandatory(boolean mandatory)
      Specified by:
      setMandatory in interface IFieldDescriptor
    • isOrdered

      public boolean isOrdered()
      Description copied from interface: IFieldDescriptor
      When multiple instances of the field can be present, can they be reordered. I.e. do instances behave like a set or a list.
      Specified by:
      isOrdered in interface IFieldDescriptor
      Returns:
      are instances of the field ordered
    • setOrdered

      public void setOrdered(boolean isOrdered)
      Specified by:
      setOrdered in interface IFieldDescriptor
    • isPrimary

      public boolean isPrimary()
      Description copied from interface: IFieldDescriptor
      Is this field the primary field of the containing type. Only one field can be the primary field.
      Specified by:
      isPrimary in interface IFieldDescriptor
      Returns:
      whether this field is the primary field
    • getExcluded

      public Set<String> getExcluded()
      Description copied from interface: IFieldDescriptor
      For residual field definitions (name is '*'), the excluded names consist of the list of the paths for all other fields in the type.
      Specified by:
      getExcluded in interface IFieldDescriptor
      Returns:
      the excluded names
    • setExcluded

      public void setExcluded(Set<String> set)
      Specified by:
      setExcluded in interface IFieldDescriptor
    • setObservationContext

      public void setObservationContext(IObservationContext context)
      Description copied from interface: IObservable
      Before observation is started on the observable, an observation context is injected by the observer registry. This context can be used to notify listeners.
      Specified by:
      setObservationContext in interface IObservable
    • startObservation

      public void startObservation()
      Description copied from interface: IObservable
      When the first IObserver of this observable is registered with the observer registry, observation is started. Implementations must notify observers until observation is stopped.

      An implementation should register listeners with external data sources, when appropriate. It is possible for an observable to register as an observer for another observable.

      Specified by:
      startObservation in interface IObservable
    • stopObservation

      public void stopObservation()
      Description copied from interface: IObservable
      When the last IObserver unregisters, observation is stopped. Any listeners or observers registered by the observable must be unregistered by the implementation.
      Specified by:
      stopObservation in interface IObservable
    • getValidators

      public Set<String> getValidators()
      Description copied from interface: IFieldDescriptor
      The symbolic names for validators associated with this field.
      Specified by:
      getValidators in interface IFieldDescriptor
      Returns:
      the names of applicable validators
    • addValidator

      public void addValidator(String validator)
      Specified by:
      addValidator in interface IFieldDescriptor
    • removeValidator

      public void removeValidator(String validator)
      Specified by:
      removeValidator in interface IFieldDescriptor
    • detach

      public void detach()
      Specified by:
      detach in interface org.apache.wicket.model.IDetachable