Interface ElementDefinition<T>

Type Parameters:
T - Type of the element value
All Superinterfaces:
Comparable<ModelItem>, Labelable, ModelItem, ModifiableLabelable
All Known Subinterfaces:
ContentElementDefinition, Property<T,X>, SystemProperty<T,X>
All Known Implementing Classes:
AbstractContentProperty, AbstractDateTimeSystemProperty, AbstractMultiTypedValuesProperty, AbstractMultiValuesProperty, AbstractProperty, AbstractSystemProperty, AbstractUserSystemProperty, AttributeDefinition, CollectionsSystemProperty, CommentsSystemProperty, ContentAttributeDefinition, ContentPrivacySystemProperty, ContentTypeSystemProperty, ContributorSystemProperty, CreationDateSystemProperty, CreatorSystemProperty, DefaultContentElementDefinition, DefaultElementDefinition, DegreeOrderProperty, DegreeTypeProperty, ElementRefProperty, FirstValidationSystemProperty, FirstValidatorSystemProperty, FulltextSystemProperty, HasLiveVersionSystemProperty, LanguageSystemProperty, LastMajorValidationSystemProperty, LastMajorValidatorSystemProperty, LastModifiedSystemProperty, LastValidationSystemProperty, LastValidatorSystemProperty, MemberProjectProperty, MultiContentValuesProperty, MultiStringValuesProperty, OrgUnitAncestorProperty, OrphanSystemProperty, PagesSystemProperty, ParentContentSystemProperty, ParentProgramsProperty, ParentSubProgramsProperty, PinProperty, ProfiledGroupsTagsSystemProperty, ProgramSkillsProperty, RichTextAttributeDefinition, SemanticAnnotationSystemProperty, ServiceParameter, SharedSystemProperty, SiteSystemProperty, SiteTypeSystemProperty, SubProgramParentProgramProperty, TagsSystemProperty, TagsSystemProperty, ViewBasedFullTextSystemProperty, ViewParameter, WorkflowStepSystemProperty, WorkflowStepSystemProperty

public interface ElementDefinition<T> extends ModelItem
Interface of the definition of a single model item (parameter, attribute)
  • Field Details

  • Method Details

    • getType

      Description copied from interface: ModelItem
      Retrieves the type.
      Specified by:
      getType in interface ModelItem
      Returns:
      the type.
    • getEnumerator

      Retrieves the enumerator.
      Returns:
      the enumerator or null if none is defined.
    • setEnumerator

      void setEnumerator(Enumerator<T> enumerator)
      Set the enumerator.
      Parameters:
      enumerator - the enumerator.
    • getCustomEnumerator

      Retrieves the custom enumerator's class name
      Returns:
      the custom enumerator's class name
    • setCustomEnumerator

      void setCustomEnumerator(String customEnumerator)
      Set the custom enumerator's class name
      Parameters:
      customEnumerator - the custom enumerator's class name
    • getEnumeratorConfiguration

      Retrieves the custom enumerator's configuration
      Returns:
      the custom enumerator's configuration
    • setEnumeratorConfiguration

      void setEnumeratorConfiguration(Configuration enumeratorConfiguration)
      Set the custom enumerator's configuration
      Parameters:
      enumeratorConfiguration - the custom enumerator's configuration
    • getCriterionEnumerator

      Get the enumerator to use when rendering this element as a criterion
      Parameters:
      configuration - The enumerator configuration.
      enumeratorManager - ComponentManager for the criterion's Enumerator
      Returns:
      The enumerator or null if the element'critérion is not enumerated.
      Throws:
      ConfigurationException - If an error occurs while initializing the enumerator
    • getValidator

      Retrieves the validator.
      Returns:
      the validator or null if none is defined.
    • setValidator

      void setValidator(Validator validator)
      Set the validator.
      Parameters:
      validator - the validator.
    • getCustomValidator

      Retrieves the custom validator's class name
      Returns:
      the custom validator's class name
    • setCustomValidator

      void setCustomValidator(String customValidator)
      Set the custom validator's class name
      Parameters:
      customValidator - the custom validator's class name
    • getValidatorConfiguration

      Retrieves the custom validator's configuraiton
      Returns:
      the custom validator's configuration
    • setValidatorConfiguration

      void setValidatorConfiguration(Configuration validatorConfiguration)
      Set the custom validator's configuration
      Parameters:
      validatorConfiguration - the custom validator's configuration
    • getDefaultValue

      <X> X getDefaultValue()
      Retrieves the default value, as an object corresponding to the definition's type and cardinality Retrieves null if no default value is defined for this definition
      Type Parameters:
      X - The type of the default value
      Returns:
      the default value.
    • setParsedDefaultValues

      void setParsedDefaultValues(List<Pair<String,Object>> parsedDefaultValues)
      Set the parsed default values. If the definition is not multiple, the list should contain only one element A parsed default value is described by its type and an object depending on the type
      Parameters:
      parsedDefaultValues - the parsed default values.
    • setDefaultValue

      void setDefaultValue(T defaultValue)
      Set a default value to the definition The default value is single, classic default value
      Parameters:
      defaultValue - the default value to set
    • _getParsedDefaultValues

      Retrieves the parsed default values
      Returns:
      the parsed default values
    • isMultiple

      boolean isMultiple()
      Test if the element is multiple.
      Returns:
      true if the metadata is multiple.
    • setMultiple

      void setMultiple(boolean isMultiple)
      Set the element multiple status.
      Parameters:
      isMultiple - the element multiple status.
    • isEditable

      default boolean isEditable()
      Determines if the definition is editable, i.e. if it can be part of a view used for edition
      Returns:
      true if the definition is editable, false otherwise