Package de.hybris.platform.jalo.meta
Class MetaInformationManager
java.lang.Object
de.hybris.platform.jalo.Manager
de.hybris.platform.jalo.meta.MetaInformationManager
- All Implemented Interfaces:
ItemLifecycleListener,Serializable
The manager for global informations stored in the hybris Platform ( meta - informations ).
If a hybris Platform user or application wants to store information which does not actually belong to exactly one
item or is meant to be global this is the place to store it.
All informations are stored in global properties, which have qualifier and a value.
MetaInformationManager mm = jaloSession.getMetaInformationManager();
// example: store session count
Long count = (Long)mm.getProperty( "sessionCount");
mm.setProperty( "sessionCount" , new Long( count.longValue() + 1 );
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classNested classes/interfaces inherited from class de.hybris.platform.jalo.Manager
Manager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreator -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckBeforeItemRemoval(SessionContext ctx, Item item) Superclass method overridden to avoid call to EJB layerstatic MetaInformationManagergetProperty(String name) The value of a global property.All global property names.getResourceBundle(String basename, Locale locale) ReturnsHybrisResourceBundleinstance according to the givenLocale.protected voidnotifyItemRemoval(SessionContext ctx, Item item) Superclass method overridden to avoid call to EJB layerremoveProperty(String name) Removes a global property.setProperty(String name, Object value) Sets a global property.voidsetResourceBundle(String basename, HybrisResourceBundle bundle) Sets aHybrisResourceBundleinstance as a global property.Methods inherited from class de.hybris.platform.jalo.Manager
afterItemCreation, beforeItemCreation, destroy, extractNonRequiredRemoteFromItem, extractRequiredRemoteFromItem, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemote, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, init, setAttribute, setTenant, setTransientObject, wrap
-
Field Details
-
BEAN_NAME
- See Also:
-
SYSTEM_PK
- See Also:
-
SYSTEM_NAME
- See Also:
-
LICENCE
- See Also:
-
HMC_RESOURCES
- See Also:
-
-
Constructor Details
-
MetaInformationManager
public MetaInformationManager()
-
-
Method Details
-
getInstance
- Returns:
- instance of this manager
-
getRemoteManagerClass
- Overrides:
getRemoteManagerClassin classManager
-
checkBeforeItemRemoval
protected void checkBeforeItemRemoval(SessionContext ctx, Item item) throws ConsistencyCheckException Superclass method overridden to avoid call to EJB layer- Overrides:
checkBeforeItemRemovalin classManager- Parameters:
ctx- the current session contextitem- the item which should be removed- Throws:
ConsistencyCheckException- thrown to abort removal due to consistency errors- Since:
- 2.10
-
notifyItemRemoval
Superclass method overridden to avoid call to EJB layer- Overrides:
notifyItemRemovalin classManager- Parameters:
ctx- the currency session contextitem- the item which is going to be removed- Since:
- 2.10
-
getPropertyNames
All global property names. -
setProperty
Sets a global property.- Parameters:
name-value-- Returns:
- the previously set property value, or
nullif it has not been set before.
-
getProperty
The value of a global property.- Parameters:
name-- Returns:
- null if no such property was set before
-
removeProperty
Removes a global property.- Parameters:
name-- Returns:
- the old value, or
nullif it has not been set before
-
setResourceBundle
Sets aHybrisResourceBundleinstance as a global property.- Parameters:
basename- a String that is part of the key which the bundle will be stored under (can be name of your application e.g."MyWebAppplication").bundle- theHybrisResourceBundleobject to be set.
-
getResourceBundle
ReturnsHybrisResourceBundleinstance according to the givenLocale. If no bundle is found for the specified locale, the method looks up bundles for the next lesser specialized locales ( if Locale("de","CH") not found, lookup for Locale("de") ).- Parameters:
basename- key the bundles are stored under.locale- ajava.util.Localeobject specifing the bundle.- Returns:
- a
HybrisResourceBundleor null if no corresponding bundle was found.
-
writeReplace
- Specified by:
writeReplacein classManager- Throws:
ObjectStreamException
-