Package org.ametys.cms.model.properties
Interface Property<T,X extends ModelAwareDataAwareAmetysObject>
- Type Parameters:
T
- type of the property valuesX
- type of ametys object supported by this property
- All Superinterfaces:
Comparable<ModelItem>
,ElementDefinition<T>
,Labelable
,ModelItem
,ModifiableLabelable
- All Known Subinterfaces:
IndexationAwareSystemProperty<T,
,X> ReferencingProperty<T,
,X> SystemProperty<T,
X>
- All Known Implementing Classes:
AbstractDateTimeIndexableSystemProperty
,AbstractDateTimeSystemProperty
,AbstractElementsReferencingProperty
,AbstractIndexableContentProperty
,AbstractIndexableProperty
,AbstractIndexableStaticProperty
,AbstractIndexableSystemProperty
,AbstractMultiTypedValuesProperty
,AbstractMultiValuesProperty
,AbstractProperty
,AbstractStaticProperty
,AbstractSystemProperty
,AbstractUserIndexableSystemProperty
,AbstractUserSystemProperty
,CollectionsSystemProperty
,CommentsSystemProperty
,ComputedStepHolderProperty
,ContainerMCCWorkflowStatusProperty
,ContentElementReferencingProperty
,ContentIdSystemProperty
,ContentPrivacySystemProperty
,ContentTypeSystemProperty
,ContributorSystemProperty
,CreationDateSystemProperty
,CreatorSystemProperty
,DegreeOrderProperty
,DegreeTypeProperty
,DisplayCodeProperty
,ElementReferencingProperty
,FirstValidationSystemProperty
,FirstValidatorSystemProperty
,FulltextSystemProperty
,HasLiveVersionSystemProperty
,InvalidContainerDataProperty
,LanguageSystemProperty
,LastMajorValidationSystemProperty
,LastMajorValidatorSystemProperty
,LastModifiedSystemProperty
,LastSynchronizationSystemProperty
,LastSynchronizationUserSystemProperty
,LastValidationSystemProperty
,LastValidatorSystemProperty
,MemberProjectProperty
,MultiContentValuesProperty
,MultiStringValuesProperty
,NearestOrgUnitsProperty
,ODFPrimaryContentTypeProperty
,OrgUnitAncestorProperty
,OrphanSystemProperty
,OverridenThematicsProperty
,PagesSystemProperty
,ParentContentSystemProperty
,ParentProgramsProperty
,ParentSubProgramsProperty
,PinProperty
,ProfiledGroupsTagsSystemProperty
,ProgramMCCWorkflowStatusProperty
,SemanticAnnotationSystemProperty
,SharedProperty
,SharedSystemProperty
,SiteSystemProperty
,SiteTypeSystemProperty
,SubProgramParentProgramProperty
,TagsSystemProperty
,TagsSystemProperty
,TrashElementSiteProperty
,ViewBasedFullTextSystemProperty
,WorkflowNameSystemProperty
,WorkflowStepSystemProperty
,WorkflowStepSystemProperty
Interface for a property
-
Field Summary
Fields inherited from interface org.ametys.runtime.model.ElementDefinition
CONFIG_DEFAULT_VALUE_TYPE
Fields inherited from interface org.ametys.runtime.model.ModelItem
ITEM_PATH_SEPARATOR
-
Method Summary
Modifier and TypeMethodDescriptiongetType()
Retrieves the type.Get the property's valuevoid
Used to do more initialization, checks...default Object
valueToJSON
(X ametysObject, DataContext context) Convert the property into a JSON objectdefault void
valueToSAX
(ContentHandler contentHandler, X ametysObject, DataContext context) Generates SAX events for the propertyMethods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.ametys.runtime.model.ElementDefinition
getCustomEnumerator, getCustomValidator, getDefaultValue, getEnumerator, getEnumeratorConfiguration, getParsedDefaultValues, getValidator, getValidatorConfiguration, isEditable, isMultiple, setCustomEnumerator, setCustomValidator, setDefaultValue, setEnumerator, setEnumeratorConfiguration, setMultiple, setParsedDefaultValues, setValidator, setValidatorConfiguration
Methods inherited from interface org.ametys.runtime.util.Labelable
getDescription, getLabel, getName
Methods inherited from interface org.ametys.runtime.model.ModelItem
addItemChecker, getDisableConditions, getItemCheckers, getModel, getParent, getPath, getPluginName, getWidget, getWidgetParameters, setDisableConditions, setModel, setParent, setPluginName, setType, setWidget, setWidgetParameters, toJSON, toSAX
Methods inherited from interface org.ametys.runtime.util.ModifiableLabelable
setDescription, setLabel, setName
-
Method Details
-
init
Used to do more initialization, checks... needing the role of extension point containing the types available for this property Called byModel
parsing when the model items of all models have been initialized.- Parameters:
availableTypesRole
- the extension point's role for available types- Throws:
Exception
- if an error occurs or if an additional check fails.
-
getType
Description copied from interface:ModelItem
Retrieves the type.- Specified by:
getType
in interfaceElementDefinition<T>
- Specified by:
getType
in interfaceModelItem
- Returns:
- the type.
-
getValue
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
- theContentHandler
that will receive the SAX eventsametysObject
- 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
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
-