Class ExtensibleItem
- java.lang.Object
-
- de.hybris.platform.util.BridgeAbstraction
-
- de.hybris.platform.jalo.Item
-
- de.hybris.platform.jalo.ExtensibleItem
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ExtensibleItem.ExtensibleItemImpl
internal use only!-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.Item
Item.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.jalo.Item
_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, HJMPTS, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPE
-
Fields inherited from class de.hybris.platform.util.BridgeAbstraction
impl, tenant
-
-
Constructor Summary
Constructors Constructor Description ExtensibleItem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AttributeAccess
createNonClassAccessor(AttributeDescriptor fieldDescriptor)
java.util.Map
getAllProperties()
Returns all properties as as Map of key/value mappings.java.util.Map
getAllProperties(SessionContext ctx)
Returns all properties as as Map of key/value mappings.ExtensibleItem.ExtensibleItemImpl
getImplementation()
returns the implementation object of this jalo bridge abstractionjava.lang.Object
getProperty(SessionContext ctx, java.lang.String name)
Gets a Property.java.lang.Object
getProperty(java.lang.String name)
Gets a Property.java.util.Set
getPropertyNames()
Returns all used property names (keys) of this item.java.util.Set
getPropertyNames(SessionContext ctx)
Returns all used property names (keys) of this item.java.lang.Object
removeProperty(SessionContext ctx, java.lang.String name)
Removes a Property.java.lang.Object
removeProperty(java.lang.String name)
Removes a Property.void
setAllProperties(SessionContext ctx, JaloPropertyContainer propertyContainer)
Set all properties of the given property container.void
setAllProperties(JaloPropertyContainer propertyContainer)
Set all properties in the property container, using the staging method set in the current session context.java.lang.Object
setProperty(SessionContext ctx, java.lang.String name, java.lang.Object value)
Sets a Property.java.lang.Object
setProperty(java.lang.String name, java.lang.Object value)
Sets a Property.-
Methods inherited from class de.hybris.platform.jalo.Item
addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, checkItemPermission, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, checkRemovable, clearPermission, compareTo, createItem, ctx, doAfterRemove, doBeforeRemove, equals, getAccessorFor, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributesInternal, getAllLinkedItems, getAndCheckCacheBoundItem, getAttribute, getAttribute, getCacheBoundItem, getComposedType, getComposedTypePK, getCreationTime, getCurrentlyRemovingCount, getDefaultAttributeModes, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItemsCount, getLinkedItemsCount, getLinkedItemsCount, getModificationTime, getNegativePermissions, getNonInitialAttributes, getOwner, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRelatedItems, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isMarkModifiedDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, notifyManagerAboutItemRemoval, readResolve, registerAccessFor, registerAccessFor, registerJaloInvalidationListeners, remove, remove, removeItemCollection, removeItemCollection, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinks, removePartOfItems, removePartOfItems, setAllAttributes, setAllAttributes, setAllAttributesInternal, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAttribute, setAttribute, setAttributeFromString, setAttributeFromString, setCacheBound, setComposedType, setCreationTime, setImplementation, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setModificationTime, setNonInitialAttributes, setOwner, setPermissionsByMap, setRelatedItems, setTransientObject, setUseTA, toString, useTA, writeReplace
-
Methods inherited from class de.hybris.platform.util.BridgeAbstraction
setTenant
-
-
-
-
Method Detail
-
getImplementation
public ExtensibleItem.ExtensibleItemImpl getImplementation()
Description copied from class:BridgeAbstraction
returns the implementation object of this jalo bridge abstraction- Overrides:
getImplementation
in classItem
- Returns:
- the implementation object of this jalo bridge abstraction
-
createNonClassAccessor
protected AttributeAccess createNonClassAccessor(AttributeDescriptor fieldDescriptor)
- Overrides:
createNonClassAccessor
in classItem
-
getAllProperties
public java.util.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 java.util.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 java.util.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 java.util.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 java.lang.Object setProperty(java.lang.String name, java.lang.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 propertyvalue
- the value- Returns:
- the property that was bound to the name or
null
if there was no property.
-
setProperty
public java.lang.Object setProperty(SessionContext ctx, java.lang.String name, java.lang.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 objectname
- the name (key) of the propertyvalue
- the value- Returns:
- the property that was bound to the name or
null
if there was no property.
-
getProperty
public java.lang.Object getProperty(java.lang.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 java.lang.Object getProperty(SessionContext ctx, java.lang.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 objectname
- the name (key) of the property- Returns:
- the value bound to the given name.
-
removeProperty
public java.lang.Object removeProperty(java.lang.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 java.lang.Object removeProperty(SessionContext ctx, java.lang.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 objectname
- 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 propertiespropertyContainer
- the property container- Throws:
ConsistencyCheckException
- if the property container contains localized properties and the called item is not localizable
-
-