public class ExtensionManager extends Manager
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ExtensionManager.ExtensionManagerSerializableDTO |
Manager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreator| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BEAN_NAME |
| Constructor and Description |
|---|
ExtensionManager() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkBeforeItemRemoval(SessionContext ctx,
Item item)
Delegates call to
Manager.checkBeforeItemRemoval(SessionContext, Item) to all extensions
. |
Extension |
getExtension(java.lang.String extName)
Finds an extension by its name.
|
java.util.Collection |
getExtensionNames()
The list of all installed extensions
Note This method will not check, if the extensions are properly installed, thus using getExtension(String) with on of the returned Extension names can throw an Exception. |
java.util.List<? extends Extension> |
getExtensions()
Return all extensions.
|
static ExtensionManager |
getInstance()
returns an instance of the ExtensionManager
|
java.lang.Class |
getRemoteManagerClass() |
boolean |
isExtensionInstalled(java.lang.String name)
Checks whether a given extension is installed in the system.
|
protected java.util.List<? extends Extension> |
loadAllExtensions() |
protected void |
notifyItemRemoval(SessionContext ctx,
Item item)
Delegates call to
Manager.notifyItemRemoval(SessionContext, Item) to all extensions. |
void |
notifyOnFirstSessionCreation()
Calls for each extension the
Extension.onFirstSessionCreation() once at startup. |
java.lang.Object |
writeReplace() |
afterItemCreation, beforeItemCreation, destroy, extractNonRequiredRemoteFromItem, extractRequiredRemoteFromItem, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemote, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, init, setAttribute, setTenant, setTransientObject, wrappublic static final java.lang.String BEAN_NAME
public java.lang.Class getRemoteManagerClass()
getRemoteManagerClass in class Managerpublic static ExtensionManager getInstance()
protected void checkBeforeItemRemoval(SessionContext ctx, Item item) throws ConsistencyCheckException
Manager.checkBeforeItemRemoval(SessionContext, Item) to all extensions
.checkBeforeItemRemoval in class Managerctx - the current session contextitem - the item which should be removedConsistencyCheckException - thrown to abort removal due to consistency errorsprotected void notifyItemRemoval(SessionContext ctx, Item item)
Manager.notifyItemRemoval(SessionContext, Item) to all extensions.notifyItemRemoval in class Managerctx - the currency session contextitem - the item which is going to be removedpublic Extension getExtension(java.lang.String extName) throws ExtensionNotFoundException
Search search = (Search)ExtensionManager.getInstance().getExtension("search");
SearchResult res = search.searchProducts( ... );
extName - the name of the extension, must not be nullExtension object. null is never returned by this method.ExtensionNotFoundException - if the extension cannot be found.public java.util.Collection getExtensionNames()
getExtension(String) with on of the returned Extension names can throw an Exception.public java.util.List<? extends Extension> getExtensions()
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.
Extension objects.protected java.util.List<? extends Extension> loadAllExtensions()
public boolean isExtensionInstalled(java.lang.String name)
name - - the name of the extensionpublic void notifyOnFirstSessionCreation()
Extension.onFirstSessionCreation() once at startup.public java.lang.Object writeReplace()
throws java.io.ObjectStreamException
writeReplace in class Managerjava.io.ObjectStreamExceptionCopyright © 2018 SAP SE. All Rights Reserved.