Package lumis.portal.deployment
Interface IDeploymentManager
-
- All Known Subinterfaces:
IDeploymentManagerSPI
- All Known Implementing Classes:
DeploymentManager
@StableMinor(version="14.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: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description IDeploymentExecutionPlan
createModuleDeploymentProcess(InputStream moduleArchive, boolean reprocessAllComponents)
Creates adeployment execution plan
for deploying the given module.IDeploymentExecutionPlan
createModuleUndeploymentProcess(List<IModule> modules)
Creates adeployment execution plan
for undeployment of the given modules.IDeploymentExecutionPlan
createPackageDeploymentProcess(File packageArchive, boolean reprocessAllComponents)
Creates adeployment execution plan
for deploying the given package.ModuleType
detectModuleType(InputStream moduleArchive)
Detects the module type of an archive, based on its contents.Class<?>
getClass(String className)
Deprecated.Since 6.0.0 deployed resources or classes should be accessed using the class loader provided bygetClassLoader()
.ClassLoader
getClassLoader()
Returns a class loader that provides access to classes and resources in all deployed JAR modules and the portal.IComponent
getComponent(String componentId)
Returns the component with the specified identifier.IModule
getModule(String moduleId)
Returns the module with the specified identifier.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.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 Class<?> getClass(String className) throws 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:
ClassNotFoundException
- if the class cannot be located.- Since:
- 5.0.0
-
getClassLoader
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(InputStream moduleArchive) throws 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:
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(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(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(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
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
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(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(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
-
-