Class ExtensibleItem

All Implemented Interfaces:
Serializable, Comparable
Direct Known Subclasses:
Link, LocalizableItem

public abstract class ExtensibleItem extends Item
Each extensible item can have several additional properties.

See our Jalo extension tutorial for more informations.

The following state chart presents a the life cycle of a stageable property. Please not that only stageable items have stageable properties. Non-stagable properties have only the states does not exist and unchanged.

Note: If you are using Serializable objects as property values, be sure that the declaring class is in the serverside's classpath. This is a restriction in the current release of hybris platform.

See Also:
  • Constructor Details

    • ExtensibleItem

      public ExtensibleItem()
  • Method Details

    • getImplementation

      public ExtensibleItem.ExtensibleItemImpl getImplementation()
      Description copied from class: BridgeAbstraction
      returns the implementation object of this jalo bridge abstraction
      Overrides:
      getImplementation in class Item
      Returns:
      the implementation object of this jalo bridge abstraction
    • createNonClassAccessor

      protected AttributeAccess createNonClassAccessor(AttributeDescriptor fieldDescriptor)
      Overrides:
      createNonClassAccessor in class Item
    • getAllProperties

      public Map getAllProperties()
      Returns all properties as as Map of key/value mappings.

      This method calls getAllProperties(SessionContext) with the current session's SessionContext object. See this method for more details.

      Returns:
      the key/value map of all non localized properties
    • getAllProperties

      public Map getAllProperties(SessionContext ctx)
      Returns all properties as as Map of key/value mappings.

      This method is using the following attributes of the given SessionContext:

      CacheUsage   Language   StagingMethod
      yes   no   yes if used with staged items, no otherwise


      Parameters:
      ctx - a SessionContext object.
      Returns:
      the key/value map of all non localized properties
    • getPropertyNames

      public Set getPropertyNames()
      Returns all used property names (keys) of this item.

      This method calls getPropertyNames(SessionContext) with the current session's SessionContext object. See this method for more details.

      Returns:
      set of property names (Strings)
    • getPropertyNames

      public Set getPropertyNames(SessionContext ctx)
      Returns all used property names (keys) of this item.

      This method is using the following attributes of the given SessionContext:

      CacheUsage   Language   StagingMethod
      yes   no   yes if used with staged items, no otherwise


      Parameters:
      ctx - A SessionContext object
      Returns:
      set of property names (Strings)
    • setProperty

      public Object setProperty(String name, Object value)
      Sets a Property.

      This method calls setProperty(SessionContext, String, Object) with the current session's SessionContext object. See this method for more details.

      Parameters:
      name - the name (key) of the property
      value - the value
      Returns:
      the property that was bound to the name or null if there was no property.
    • setProperty

      public Object setProperty(SessionContext ctx, String name, Object value)
      Sets a Property.

      This method is using the following attributes of the given SessionContext:

      CacheUsage   Language   StagingMethod
      no, this is a setter method.   no   yes if used with staged items, no otherwise


      Parameters:
      ctx - A SessionContext object
      name - the name (key) of the property
      value - the value
      Returns:
      the property that was bound to the name or null if there was no property.
    • getProperty

      public Object getProperty(String name)
      Gets a Property.

      This method calls getProperty(SessionContext, String) with the current session's SessionContext object. See this method for more details.

      Parameters:
      name - the name (key) of the property
      Returns:
      the value bound to the given name.
    • getProperty

      public Object getProperty(SessionContext ctx, String name)
      Gets a Property.

      This method is using the following attributes of the given SessionContext:

      CacheUsage   Language   StagingMethod
      yes   no   yes if used with staged items, no otherwise


      Parameters:
      ctx - A SessionContext object
      name - the name (key) of the property
      Returns:
      the value bound to the given name.
    • removeProperty

      public Object removeProperty(String name)
      Removes a Property.

      This method calls removeProperty(SessionContext, String) with the current session's SessionContext object. See this method for more details.

      Parameters:
      name - the name (key) of the property you want to remove
      Returns:
      the property that was bound to the name before removal or null if there was no property.
    • removeProperty

      public Object removeProperty(SessionContext ctx, String name)
      Removes a Property.

      A call to this method is the same like setting a property to null.

      This method is using the following attributes of the given SessionContext:

      CacheUsage   Language   StagingMethod
      no, this is a setter method.   no   yes if used with staged items, no otherwise


      Parameters:
      ctx - A SessionContext object
      name - the name (key) of the property you want to remove
      Returns:
      the property that was bound to the name before removal or null if there was no property.
    • setAllProperties

      public void setAllProperties(JaloPropertyContainer propertyContainer) throws ConsistencyCheckException
      Set all properties in the property container, using the staging method set in the current session context.
      Parameters:
      propertyContainer - the property container
      Throws:
      ConsistencyCheckException - if the property container contains localized properties and the called item is not localizable
    • setAllProperties

      public void setAllProperties(SessionContext ctx, JaloPropertyContainer propertyContainer) throws ConsistencyCheckException
      Set all properties of the given property container.
      Parameters:
      ctx - determines the staging method, but not the localization of properties
      propertyContainer - the property container
      Throws:
      ConsistencyCheckException - if the property container contains localized properties and the called item is not localizable