Package lumis.portal.deployment
Interface IDeploymentManager
-
- All Known Subinterfaces:
IDeploymentManagerSPI
- All Known Implementing Classes:
DeploymentManager
@StableMinor(version="17.0", sinceVersion="7.1") public interface IDeploymentManager
Handles the deployment of portal resources.All methods in this manager execute in their own transaction.
- Since:
- 4.0.7
- Version:
- $Revision$ $Date$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description IDeploymentExecutionPlan
createModuleDeploymentProcess(java.io.InputStream moduleArchive, boolean reprocessAllComponents)
Creates adeployment execution plan
for deploying the given module.IDeploymentExecutionPlan
createModuleUndeploymentProcess(java.util.List<IModule> modules)
Creates adeployment execution plan
for undeployment of the given modules.IDeploymentExecutionPlan
createPackageDeploymentProcess(java.io.File packageArchive, boolean reprocessAllComponents)
Creates adeployment execution plan
for deploying the given package.ModuleType
detectModuleType(java.io.InputStream moduleArchive)
Detects the module type of an archive, based on its contents.java.lang.Class<?>
getClass(java.lang.String className)
Deprecated.Since 6.0.0 deployed resources or classes should be accessed using the class loader provided bygetClassLoader()
.java.lang.ClassLoader
getClassLoader()
Returns a class loader that provides access to classes and resources in all deployed JAR modules and the portal.IComponent
getComponent(java.lang.String componentId)
Returns the component with the specified identifier.IModule
getModule(java.lang.String moduleId)
Returns the module with the specified identifier.java.util.Collection<IModule>
getModules(ModuleType moduleType)
Returns the currently installed modules of the specified type.IPortalDeployer
getPortalDeployer(DeployConfig deployConfig)
Deprecated.Since 5.0.0 the use ofIPortalDeployer
has been deprecated.void
registerDeployer(IPortalDeployer deployer)
Deprecated.Since 5.0.0 the use ofIPortalDeployer
has been deprecated.java.lang.String
submit(IDeploymentExecutionPlan executionPlan)
Submits theexecution plan
created by this manager and returns the createdprocess
identifier.boolean
unregisterDeployer(IPortalDeployer deployer)
Deprecated.Since 5.0.0 the use ofIPortalDeployer
has been deprecated.
-
-
-
Method Detail
-
registerDeployer
@Deprecated void registerDeployer(IPortalDeployer deployer)
Deprecated.Since 5.0.0 the use ofIPortalDeployer
has been deprecated.Register a deployer that may be used when performing a deployment.- Parameters:
deployer
- the deployer.- Since:
- 4.0.7
-
unregisterDeployer
@Deprecated boolean unregisterDeployer(IPortalDeployer deployer)
Deprecated.Since 5.0.0 the use ofIPortalDeployer
has been deprecated.Unregisters a deployer that may be used when performing a deployment.- Parameters:
deployer
- the deployer.- Returns:
- Since:
- 4.0.7
-
getPortalDeployer
@Deprecated IPortalDeployer getPortalDeployer(DeployConfig deployConfig) throws PortalException
Deprecated.Since 5.0.0 the use ofIPortalDeployer
has been deprecated.Returns the deployer to be used to deploy to the portal.- Parameters:
deployConfig
- the deployment specification.- Returns:
- the deployer.
- Throws:
PortalException
- if there is no deployer that can handle the specified deployment.- Since:
- 4.0.7
-
getClass
@Deprecated java.lang.Class<?> getClass(java.lang.String className) throws java.lang.ClassNotFoundException
Deprecated.Since 6.0.0 deployed resources or classes should be accessed using the class loader provided bygetClassLoader()
. Uses ofIDeploymentManager.getClass(className)
method may be replaced byIDeploymentManager.getClassLoader()
.loadClass(className)
.Returns theClass
object associated with the class or interface with the given string name, within the deployed JAR library modules or the shared level class loader.- Parameters:
className
- the fully qualified name of the desired class.- Returns:
- the
Class
object for the class with the specified name. - Throws:
java.lang.ClassNotFoundException
- if the class cannot be located.- Since:
- 5.0.0
-
getClassLoader
java.lang.ClassLoader getClassLoader()
Returns a class loader that provides access to classes and resources in all deployed JAR modules and the portal.When the returned class loader is used to obtain a class, the search is first done in the currently running modules and then in the portal main class loader.
When the returned class loader is used to obtain a resource, the search is first done in the
lumisdata/def
folder (for backwards compatibility), then in currently running modules and then in the portal main class loader.Main uses are:
ClassLoader.loadClass(String)
: for obtaining aClass
.ClassLoader.getResourceAsStream(String)
,ClassLoader.getResource(String)
orClassLoader.getResources(String)
: for accessing resources.
The returned instance must not be held for long as it may change between deploys. Instead obtain it again using this method.
- Returns:
- the class loader.
- Since:
- 6.0.0
-
detectModuleType
ModuleType detectModuleType(java.io.InputStream moduleArchive) throws java.io.IOException, IllegalModuleArchiveException, PortalException
Detects the module type of an archive, based on its contents.- Parameters:
moduleArchive
- the archive content input stream.- Returns:
- the module type.
- Throws:
java.io.IOException
- if an I/O error occurs.IllegalModuleArchiveException
- if the archive module type could not be recognized.PortalException
- Since:
- 5.0.0
-
createModuleDeploymentProcess
IDeploymentExecutionPlan createModuleDeploymentProcess(java.io.InputStream moduleArchive, boolean reprocessAllComponents) throws IllegalModuleArchiveException, PortalException
Creates adeployment execution plan
for deploying the given module. The returnedProcess
is not yet ready to be executed.- Parameters:
moduleArchive
- the module archive input stream.reprocessAllComponents
- indicates if all components present in the module must be reprocessed.- Returns:
- the deployment plan.
- Throws:
IllegalModuleArchiveException
- if the given archive is not a valid module archive.PortalException
- Since:
- 7.1.0
- See Also:
submit(IDeploymentExecutionPlan)
-
createPackageDeploymentProcess
IDeploymentExecutionPlan createPackageDeploymentProcess(java.io.File packageArchive, boolean reprocessAllComponents) throws IllegalPackageArchiveException, PortalException
Creates adeployment execution plan
for deploying the given package.- Parameters:
packageArchive
- the package file.reprocessAllComponents
- indicates if all components present in the package must be reprocessed.- Returns:
- the deployment plan.
- Throws:
IllegalPackageArchiveException
- if the given archive is not a valid package archive.PortalException
- Since:
- 7.1.0
- See Also:
submit(IDeploymentExecutionPlan)
-
createModuleUndeploymentProcess
IDeploymentExecutionPlan createModuleUndeploymentProcess(java.util.List<IModule> modules) throws PortalException
Creates adeployment execution plan
for undeployment of the given modules.- Parameters:
modules
- the modules to be undeployed.- Returns:
- the deployment plan.
- Throws:
PortalException
- Since:
- 7.1.0
- See Also:
submit(IDeploymentExecutionPlan)
-
submit
java.lang.String submit(IDeploymentExecutionPlan executionPlan) throws PortalException
Submits theexecution plan
created by this manager and returns the createdprocess
identifier.- Parameters:
executionPlan
- the execution plan.- Returns:
- the
process
identifier. - Throws:
PortalException
- Since:
- 7.1.0
-
getModules
java.util.Collection<IModule> getModules(ModuleType moduleType) throws PortalException
Returns the currently installed modules of the specified type.- Parameters:
moduleType
- the module type.- Returns:
- the modules.
- Throws:
PortalException
- Since:
- 5.0.0
-
getModule
IModule getModule(java.lang.String moduleId) throws PortalException
Returns the module with the specified identifier.- Parameters:
moduleId
- the module identifier.- Returns:
- the module.
- Throws:
PortalObjectNotFoundException
- if no module with the given identifier was found.PortalException
- Since:
- 5.0.0
-
getComponent
IComponent getComponent(java.lang.String componentId) throws PortalException
Returns the component with the specified identifier.- Parameters:
componentId
- the component identifier.- Returns:
- the component.
- Throws:
PortalObjectNotFoundException
- if no component with the given identifier was found.PortalException
- Since:
- 7.1.0
-
-