Class CockpitRemoteLibraryHandler
- java.lang.Object
-
- com.hybris.cockpitng.modules.impl.CockpitRemoteLibraryHandler
-
- All Implemented Interfaces:
LibraryFetcher,LibraryHandler<java.lang.Object>
public class CockpitRemoteLibraryHandler extends java.lang.Object implements LibraryHandler<java.lang.Object>, LibraryFetcher
LibraryHandler capable of downloading cockpit modules as jarfiles from an url.
-
-
Constructor Summary
Constructors Constructor Description CockpitRemoteLibraryHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterDeploy(CockpitModuleInfo moduleInfo, java.lang.String libdir)Called after all cockpit modules have been deployed, in module order, i.e.voidafterDeployReverseOrder(CockpitModuleInfo moduleInfo, java.lang.String libDir)Called after all cockpit modules have been deployed and afterLibraryHandler.afterDeploy(CockpitModuleInfo, String)of all modules, in reverse module order, i.e.booleancanFetchLibrary(ModuleInfo moduleInfo)Checks if specified module can be fetched by this fetcher.voidfetchLibrary(ModuleInfo moduleInfo, java.io.File file)Fetches provided module into specified archive.voidfetchLibrary(CockpitModuleInfo moduleInfo, java.io.File archiveFile)voidinitialize(ModuleInfo moduleInfo, java.lang.Object o)Initializes a module with provided info object.java.lang.Objectprepare(ModuleInfo moduleInfo)Prepares an info object for specified module.
-
-
-
Method Detail
-
canFetchLibrary
public boolean canFetchLibrary(ModuleInfo moduleInfo)
Description copied from interface:LibraryFetcherChecks if specified module can be fetched by this fetcher.There are some modules that are i.e. injected directly into classpath and does not need any additional fetching. Such modules should still be handled by system, yet not fetched (as they are in fact already fetched). For such situations fetcher should return
false.- Specified by:
canFetchLibraryin interfaceLibraryFetcher- Specified by:
canFetchLibraryin interfaceLibraryHandler<java.lang.Object>- Parameters:
moduleInfo- module to be fetched- Returns:
trueif module is not yet fetched and requires fetching
-
fetchLibrary
public void fetchLibrary(ModuleInfo moduleInfo, java.io.File file) throws CockpitModuleDeploymentException
Description copied from interface:LibraryFetcherFetches provided module into specified archive.- Specified by:
fetchLibraryin interfaceLibraryFetcher- Parameters:
moduleInfo- module informationfile- destination file- Throws:
CockpitModuleDeploymentException
-
fetchLibrary
public void fetchLibrary(CockpitModuleInfo moduleInfo, java.io.File archiveFile) throws CockpitModuleDeploymentException
- Specified by:
fetchLibraryin interfaceLibraryHandler<java.lang.Object>- Throws:
CockpitModuleDeploymentException
-
afterDeploy
public void afterDeploy(CockpitModuleInfo moduleInfo, java.lang.String libdir)
Description copied from interface:LibraryHandlerCalled after all cockpit modules have been deployed, in module order, i.e. first module first.- Specified by:
afterDeployin interfaceLibraryHandler<java.lang.Object>
-
afterDeployReverseOrder
public void afterDeployReverseOrder(CockpitModuleInfo moduleInfo, java.lang.String libDir)
Description copied from interface:LibraryHandlerCalled after all cockpit modules have been deployed and afterLibraryHandler.afterDeploy(CockpitModuleInfo, String)of all modules, in reverse module order, i.e. last module first.- Specified by:
afterDeployReverseOrderin interfaceLibraryHandler<java.lang.Object>
-
prepare
public java.lang.Object prepare(ModuleInfo moduleInfo)
Description copied from interface:LibraryHandlerPrepares an info object for specified module.Method is called for each module loaded in order of modules loading.
- Specified by:
preparein interfaceLibraryHandler<java.lang.Object>- Parameters:
moduleInfo- information about loaded module- See Also:
LibraryHandler.initialize(ModuleInfo, Object)
-
initialize
public void initialize(ModuleInfo moduleInfo, java.lang.Object o)
Description copied from interface:LibraryHandlerInitializes a module with provided info object.Method is called for each module loaded in reversed order of modules loading.
- Specified by:
initializein interfaceLibraryHandler<java.lang.Object>- Parameters:
moduleInfo- information about loaded moduleo- info object prepared inLibraryHandler.prepare(ModuleInfo)method
-
-