Interface Property<T,X extends ModelAwareDataAwareAmetysObject>

Type Parameters:
T - type of the property values
X - type of ametys object supported by this property
All Superinterfaces:
Comparable<ModelItem>, ElementDefinition<T>, Labelable, ModelItem, ModifiableLabelable
All Known Subinterfaces:
SystemProperty<T,X>
All Known Implementing Classes:
AbstractContentProperty, AbstractDateTimeSystemProperty, AbstractMultiTypedValuesProperty, AbstractMultiValuesProperty, AbstractProperty, AbstractSystemProperty, AbstractUserSystemProperty, CollectionsSystemProperty, CommentsSystemProperty, ContainerMCCWorkflowStatusProperty, ContentIdSystemProperty, ContentPrivacySystemProperty, ContentTypeSystemProperty, ContributorSystemProperty, CreationDateSystemProperty, CreatorSystemProperty, DegreeOrderProperty, DegreeTypeProperty, ElementRefProperty, FirstValidationSystemProperty, FirstValidatorSystemProperty, FulltextSystemProperty, HasLiveVersionSystemProperty, LanguageSystemProperty, LastMajorValidationSystemProperty, LastMajorValidatorSystemProperty, LastModifiedSystemProperty, LastSynchronizationSystemProperty, LastSynchronizationUserSystemProperty, LastValidationSystemProperty, LastValidatorSystemProperty, MemberProjectProperty, MultiContentValuesProperty, MultiStringValuesProperty, ODFPrimaryContentTypeProperty, OrgUnitAncestorProperty, OrphanSystemProperty, OverridenThematicsProperty, PagesSystemProperty, ParentContentSystemProperty, ParentProgramsProperty, ParentSubProgramsProperty, PinProperty, ProfiledGroupsTagsSystemProperty, ProgramSkillsProperty, SelfAndParentOrgUnitsProperty, SemanticAnnotationSystemProperty, SharedProperty, SharedSystemProperty, SiteSystemProperty, SiteTypeSystemProperty, SubProgramParentProgramProperty, TagsSystemProperty, TagsSystemProperty, ViewBasedFullTextSystemProperty, WorkflowNameSystemProperty, WorkflowStepSystemProperty, WorkflowStepSystemProperty

public interface Property<T,X extends ModelAwareDataAwareAmetysObject> extends ElementDefinition<T>
Interface for a property
  • Method Details

    • getType

      Description copied from interface: ModelItem
      Retrieves the type.
      Specified by:
      getType in interface ElementDefinition<T>
      Specified by:
      getType in interface ModelItem
      Returns:
      the type.
    • setAvailableTypeExtensionPoint

      void setAvailableTypeExtensionPoint(ExtensionPoint<ModelItemType> availableTypesExtensionPoint)
      Set the extension point containing the types available for this property
      Parameters:
      availableTypesExtensionPoint - the extension point to set
    • getValue

      Object getValue(X ametysObject)
      Get the property's value
      Parameters:
      ametysObject - the ametysObject containing the property
      Returns:
      the values to index.
    • valueToSAX

      default void valueToSAX(ContentHandler contentHandler, X ametysObject, DataContext context) throws SAXException
      Generates SAX events for the property
      Parameters:
      contentHandler - the ContentHandler that will receive the SAX events
      ametysObject - the ametysObject containing the property to SAX.
      context - the context of the data to SAX. Can not be null.
      Throws:
      SAXException - if an error occurs during the SAX events generation
    • valueToJSON

      default Object valueToJSON(X ametysObject, DataContext context)
      Convert the property into a JSON object
      Parameters:
      ametysObject - the ametysObject containing the property to convert.
      context - the context of the data to convert. Can not be null.
      Returns:
      The property as JSON
    • indexValue

      default void indexValue(org.apache.solr.common.SolrInputDocument document, X ametysObject, IndexableDataContext context)
      Index the property in a solr document.
      Parameters:
      document - the solr document to index into.
      ametysObject - the ametysObject containing the property to index.
      context - the context of the data to index. Can not be null.
    • getCriterionWidget

      Description copied from interface: ModelItem
      Get the default widget to use when rendering this item as a criterion.
      Specified by:
      getCriterionWidget in interface ModelItem
      Returns:
      The default widget to use, or null if no specific widget is necessary.
    • getCriterionWidgetParameters

      Description copied from interface: ModelItem
      Get the widget parameters to use when rendering this item as a criterion.
      Specified by:
      getCriterionWidgetParameters in interface ModelItem
      Parameters:
      configuration - The widget parameters configuration
      Returns:
      The default widget parameters to use, or an empty Map if no specific widget parameters are necessary.