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,java.io.Serializable
public class MetaInformationManager extends Manager
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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classMetaInformationManager.MetaInformationManagerSerializableDTO-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.Manager
Manager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreator
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBEAN_NAMEstatic java.lang.StringHMC_RESOURCESstatic java.lang.StringLICENCEstatic java.lang.StringSYSTEM_NAMEstatic java.lang.StringSYSTEM_PK
-
Constructor Summary
Constructors Constructor Description MetaInformationManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckBeforeItemRemoval(SessionContext ctx, Item item)Superclass method overridden to avoid call to EJB layerstatic MetaInformationManagergetInstance()java.lang.ObjectgetProperty(java.lang.String name)The value of a global property.java.util.SetgetPropertyNames()All global property names.java.lang.ClassgetRemoteManagerClass()HybrisResourceBundlegetResourceBundle(java.lang.String basename, java.util.Locale locale)ReturnsHybrisResourceBundleinstance according to the givenLocale.protected voidnotifyItemRemoval(SessionContext ctx, Item item)Superclass method overridden to avoid call to EJB layerjava.lang.ObjectremoveProperty(java.lang.String name)Removes a global property.java.lang.ObjectsetProperty(java.lang.String name, java.lang.Object value)Sets a global property.voidsetResourceBundle(java.lang.String basename, HybrisResourceBundle bundle)Sets aHybrisResourceBundleinstance as a global property.java.lang.ObjectwriteReplace()-
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 Detail
-
BEAN_NAME
public static final java.lang.String BEAN_NAME
- See Also:
- Constant Field Values
-
SYSTEM_PK
public static final java.lang.String SYSTEM_PK
- See Also:
- Constant Field Values
-
SYSTEM_NAME
public static final java.lang.String SYSTEM_NAME
- See Also:
- Constant Field Values
-
LICENCE
public static final java.lang.String LICENCE
- See Also:
- Constant Field Values
-
HMC_RESOURCES
public static final java.lang.String HMC_RESOURCES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static MetaInformationManager getInstance()
- Returns:
- instance of this manager
-
getRemoteManagerClass
public java.lang.Class 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
protected void notifyItemRemoval(SessionContext ctx, Item item)
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
public java.util.Set getPropertyNames()
All global property names.
-
setProperty
public java.lang.Object setProperty(java.lang.String name, java.lang.Object value)Sets a global property.- Parameters:
name-value-- Returns:
- the previously set property value, or
nullif it has not been set before.
-
getProperty
public java.lang.Object getProperty(java.lang.String name)
The value of a global property.- Parameters:
name-- Returns:
- null if no such property was set before
-
removeProperty
public java.lang.Object removeProperty(java.lang.String name)
Removes a global property.- Parameters:
name-- Returns:
- the old value, or
nullif it has not been set before
-
setResourceBundle
public void setResourceBundle(java.lang.String basename, HybrisResourceBundle bundle)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
public HybrisResourceBundle getResourceBundle(java.lang.String basename, java.util.Locale locale)
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
public java.lang.Object writeReplace() throws java.io.ObjectStreamException- Specified by:
writeReplacein classManager- Throws:
java.io.ObjectStreamException
-
-