Class ExtensionManager
java.lang.Object
de.hybris.platform.jalo.Manager
de.hybris.platform.jalo.extension.ExtensionManager
- All Implemented Interfaces:
ItemLifecycleListener,Serializable
The manager for handling hybris Platform extensions.
- 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) Delegates call toManager.checkBeforeItemRemoval(SessionContext, Item)to allextensions.getExtension(String extName) Finds an extension by its name.The list of all installed extensions
Note This method will not check, if the extensions are properly installed, thus usinggetExtension(String)with on of the returned Extension names can throw an Exception.Return all extensions.static ExtensionManagerreturns an instance of the ExtensionManagerbooleanisExtensionInstalled(String name) Checks whether a given extension is installed in the system.protected voidnotifyItemRemoval(SessionContext ctx, Item item) Delegates call toManager.notifyItemRemoval(SessionContext, Item)to allextensions.voidCalls for each extension theExtension.onFirstSessionCreation()once at startup.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:
-
-
Constructor Details
-
ExtensionManager
public ExtensionManager()
-
-
Method Details
-
getRemoteManagerClass
- Overrides:
getRemoteManagerClassin classManager
-
getInstance
returns an instance of the ExtensionManager- Returns:
- instance of this manager
-
checkBeforeItemRemoval
protected void checkBeforeItemRemoval(SessionContext ctx, Item item) throws ConsistencyCheckException Delegates call toManager.checkBeforeItemRemoval(SessionContext, Item)to allextensions.- 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
Delegates call toManager.notifyItemRemoval(SessionContext, Item)to allextensions.- Overrides:
notifyItemRemovalin classManager- Parameters:
ctx- the currency session contextitem- the item which is going to be removed- Since:
- 2.10
-
getExtension
Finds an extension by its name.
Sample:
Search search = (Search)ExtensionManager.getInstance().getExtension("search"); SearchResult res = search.searchProducts( ... );- Parameters:
extName- the name of the extension, must not benull- Returns:
- The
Extensionobject.nullis never returned by this method. - Throws:
ExtensionNotFoundException- if the extension cannot be found.
-
getExtensionNames
The list of all installed extensions
Note This method will not check, if the extensions are properly installed, thus usinggetExtension(String)with on of the returned Extension names can throw an Exception.- Returns:
- a Collection of Strings with all extensionnames.
-
getExtensions
Return all extensions.If one or more extensions which are configured but not properly installed (e.g. missing jar file), this method will not throw an exception. it simply removes the extension from the result.
You can be sure that you can use all extensions you get from this method.- Returns:
- a Collection of
Extensionobjects.
-
loadAllExtensions
-
isExtensionInstalled
Checks whether a given extension is installed in the system.- Parameters:
name- - the name of the extension- Returns:
- true, if the extension is installed, false otherwise
- Since:
- 2.3
-
notifyOnFirstSessionCreation
public void notifyOnFirstSessionCreation()Calls for each extension theExtension.onFirstSessionCreation()once at startup. -
writeReplace
- Specified by:
writeReplacein classManager- Throws:
ObjectStreamException
-