Class AbstractProperty<T,X extends ModelAwareDataAwareAmetysObject>

Type Parameters:
T - type of the property values
X - type of ametys object supported by this property
All Implemented Interfaces:
Comparable<ModelItem>, Property<T,X>, ElementDefinition<T>, ModelItem, PluginAware, Labelable, ModifiableLabelable
Direct Known Subclasses:
AbstractIndexableProperty, AbstractStaticProperty

public abstract class AbstractProperty<T,X extends ModelAwareDataAwareAmetysObject> extends DefaultElementDefinition<T> implements Property<T,X>, PluginAware
Abstract class for single property
  • Constructor Details

  • Method Details

    • init

      public void init(String availableTypesRole) throws Exception
      Description copied from interface: Property
      Used to do more initialization, checks... needing the role of extension point containing the types available for this property Called by Model parsing when the model items of all models have been initialized.
      Specified by:
      init in interface Property<T,X extends ModelAwareDataAwareAmetysObject>
      Parameters:
      availableTypesRole - the extension point's role for available types
      Throws:
      Exception - if an error occurs or if an additional check fails.
    • setPluginInfo

      public void setPluginInfo(String pluginName, String featureName, String id)
      Description copied from interface: PluginAware
      Sets the plugin info relative to the current component.
      Note : The feature name may be null if the targeted component in declared at plugin level.
      Specified by:
      setPluginInfo in interface PluginAware
      Parameters:
      pluginName - Unique identifier for the plugin hosting the extension
      featureName - Unique feature identifier (unique for a given pluginName)
      id - Unique identifier of this component
    • isEditable

      public boolean isEditable()
      Description copied from interface: ElementDefinition
      Determines if the definition is editable, i.e. if it can be part of a view used for edition
      Specified by:
      isEditable in interface ElementDefinition<T>
      Returns:
      true if the definition is editable, false otherwise
    • getType

      Description copied from interface: ModelItem
      Retrieves the type.
      Specified by:
      getType in interface ElementDefinition<T>
      Specified by:
      getType in interface ModelItem
      Specified by:
      getType in interface Property<T,X extends ModelAwareDataAwareAmetysObject>
      Overrides:
      getType in class DefaultElementDefinition<T>
      Returns:
      the type.
    • getTypeId

      protected abstract String getTypeId()
      Retrieves the id of the property's type
      Returns:
      the id of the property's type