public class DeploymentManager extends Object implements IDeploymentManagerSPI
Constructor and Description |
---|
DeploymentManager() |
Modifier and Type | Method and Description |
---|---|
void |
changeComponentResolved(String componentId,
ITransaction transaction)
Changes the resolved value of the component based on the given component
identifier.
|
void |
changeComponentSignal(String componentId,
ITransaction transaction)
Changes the signal value of the component based on the given component
identifier.
|
void |
changeModuleResolved(String moduleId,
ITransaction transaction)
Changes the resolved value of the module based on the given module
identifier.
|
void |
changeModuleSignal(String moduleId,
ITransaction transaction)
Changes the signal value of the module based on the given module
identifier.
|
IDeploymentExecutionPlan |
createModuleDeploymentExecutionPlan(File moduleFolder,
boolean forceReprocess,
boolean syncStructure)
Creates, validates and returns a module deployment execution plan.
|
IDeploymentExecutionPlan |
createModuleDeploymentProcess(InputStream moduleArchive,
boolean reprocessAllComponents)
Creates a
deployment execution plan for
deploying the given module. |
IDeploymentExecutionPlan |
createModuleUndeploymentProcess(List<IModule> modules)
Creates a
deployment execution plan for
undeployment of the given modules. |
IDeploymentExecutionPlan |
createPackageDeploymentExecutionPlan(File packageFolder,
boolean forceReprocess,
String packageId)
Creates, validates and returns a deployment execution plan.
|
IDeploymentExecutionPlan |
createPackageDeploymentExecutionPlan(File packageFolder,
boolean forceReprocess,
String packageId,
boolean syncStructure)
Creates, validates and returns a package deployment execution plan.
|
IDeploymentExecutionPlan |
createPackageDeploymentProcess(File packageArchive,
boolean reprocessAllComponents)
Creates a
deployment execution plan for
deploying the given package. |
void |
deploy(IModule module) |
ModuleType |
detectModuleType(InputStream moduleArchive)
Detects the module type of an archive, based on its contents.
|
Class<?> |
getClass(String className)
Deprecated.
|
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.
|
List<IComponent> |
getComponents()
Returns the list of all installed components.
|
String |
getLastDeployInstallationId()
Returns the Last Deploy Installation 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.
|
void |
init()
Initializes the deployment manager.
|
boolean |
isInstallInProgress()
Returns whether a deploy installation is in progress.
|
void |
registerDeployer(IPortalDeployer deployer)
Deprecated.
|
String |
submit(IDeploymentExecutionPlan executionPlan)
Submits the
execution plan created by
this manager and returns the created process identifier. |
void |
undeploy(IModule module) |
boolean |
unregisterDeployer(IPortalDeployer deployer)
Deprecated.
|
void |
updateChannelId(String componentId,
String channelId)
Updates the channelId of the given component.
|
@Deprecated public void registerDeployer(IPortalDeployer deployer)
IDeploymentManager
registerDeployer
in interface IDeploymentManager
deployer
- the deployer.@Deprecated public boolean unregisterDeployer(IPortalDeployer deployer)
IDeploymentManager
unregisterDeployer
in interface IDeploymentManager
deployer
- the deployer.@Deprecated public IPortalDeployer getPortalDeployer(DeployConfig deployConfig) throws PortalException
IDeploymentManager
getPortalDeployer
in interface IDeploymentManager
deployConfig
- the deployment specification.PortalException
- if there is no deployer that can handle the
specified deployment.public void init()
@Deprecated public Class<?> getClass(String className) throws ClassNotFoundException
IDeploymentManager
Class
object associated with the class or
interface with the given string name, within the deployed JAR library
modules or the shared level class loader.getClass
in interface IDeploymentManager
className
- the fully qualified name of the desired class.Class
object for the class with the specified name.ClassNotFoundException
- if the class cannot be located.Class#forName(String)}
public ClassLoader getClassLoader()
IDeploymentManager
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 a Class
.ClassLoader.getResourceAsStream(String)
, ClassLoader.getResource(String)
or ClassLoader.getResources(String)
:
for accessing resources.getClassLoader
in interface IDeploymentManager
public ModuleType detectModuleType(InputStream moduleArchive) throws IOException, IllegalModuleArchiveException
IDeploymentManager
detectModuleType
in interface IDeploymentManager
moduleArchive
- the archive content input stream.IOException
- if an I/O error occurs.IllegalModuleArchiveException
- if the archive module type
could not be recognized.public void undeploy(IModule module) throws PortalException
PortalException
public void deploy(IModule module) throws PortalException
PortalException
public Collection<IModule> getModules(ModuleType moduleType) throws PortalException
IDeploymentManager
getModules
in interface IDeploymentManager
moduleType
- the module type.PortalException
public IModule getModule(String moduleId) throws PortalException
IDeploymentManager
getModule
in interface IDeploymentManager
moduleId
- the module identifier.PortalObjectNotFoundException
- if no module with the given
identifier was found.PortalException
public IDeploymentExecutionPlan createModuleDeploymentProcess(InputStream moduleArchive, boolean reprocessAllComponents) throws IllegalModuleArchiveException, PortalException
IDeploymentManager
deployment execution plan
for
deploying the given module. The returned Process
is not
yet ready to be executed.createModuleDeploymentProcess
in interface IDeploymentManager
moduleArchive
- the module archive input stream.reprocessAllComponents
- indicates if all components present in the module must be
reprocessed.IllegalModuleArchiveException
- if the given archive is not a valid module archive.PortalException
IDeploymentManager.submit(IDeploymentExecutionPlan)
public IDeploymentExecutionPlan createPackageDeploymentProcess(File packageArchive, boolean reprocessAllComponents) throws IllegalPackageArchiveException, PortalException
IDeploymentManager
deployment execution plan
for
deploying the given package.createPackageDeploymentProcess
in interface IDeploymentManager
packageArchive
- the package file.reprocessAllComponents
- indicates if all components present in the package must be
reprocessed.IllegalPackageArchiveException
- if the given archive is not a valid package archive.PortalException
IDeploymentManager.submit(IDeploymentExecutionPlan)
public IDeploymentExecutionPlan createModuleUndeploymentProcess(List<IModule> modules) throws PortalException
IDeploymentManager
deployment execution plan
for
undeployment of the given modules.createModuleUndeploymentProcess
in interface IDeploymentManager
modules
- the modules to be undeployed.PortalException
IDeploymentManager.submit(IDeploymentExecutionPlan)
public String submit(IDeploymentExecutionPlan executionPlan) throws PortalException
IDeploymentManager
execution plan
created by
this manager and returns the created process
identifier.submit
in interface IDeploymentManager
executionPlan
- the execution plan.process
identifier.PortalException
public String getLastDeployInstallationId() throws PortalException
IDeploymentManagerSPI
getLastDeployInstallationId
in interface IDeploymentManagerSPI
PortalException
- if any error occurs during the process.public boolean isInstallInProgress() throws PortalException
IDeploymentManagerSPI
isInstallInProgress
in interface IDeploymentManagerSPI
PortalException
- if any error occurs during the process.public List<IComponent> getComponents() throws PortalException
IDeploymentManagerSPI
getComponents
in interface IDeploymentManagerSPI
PortalException
- if any error occurs during the process.public IDeploymentExecutionPlan createPackageDeploymentExecutionPlan(File packageFolder, boolean forceReprocess, String packageId) throws PortalException
IDeploymentManagerSPI
createPackageDeploymentExecutionPlan
in interface IDeploymentManagerSPI
packageFolder
- the folder that contains the jar modules and package
definition.forceReprocess
- indicates if must reprocess all modules and components
involved in the package.packageId
- package identifier. This parameter is optional and it value is
the package file name.PortalException
- if any error occurs during the process.public IComponent getComponent(String componentId) throws PortalException
IDeploymentManager
getComponent
in interface IDeploymentManager
componentId
- the component identifier.PortalObjectNotFoundException
- if no component with the given
identifier was found.PortalException
public void changeComponentSignal(String componentId, ITransaction transaction) throws PortalException
IDeploymentManagerSPI
changeComponentSignal
in interface IDeploymentManagerSPI
componentId
- the component identifier to be changes the signal value.transaction
- the transaction to be used to change the component signal
value.PortalException
- if any error occurs during the process.PortalObjectNotFoundException
- if the component cannot be located.public void changeModuleSignal(String moduleId, ITransaction transaction) throws PortalException
IDeploymentManagerSPI
changeModuleSignal
in interface IDeploymentManagerSPI
moduleId
- the module identifier to be changes the signal value.transaction
- the transaction to be used to change the module signal value.PortalException
- if any error occurs during the process.PortalObjectNotFoundException
- if the module cannot be located.public void changeComponentResolved(String componentId, ITransaction transaction) throws PortalException
IDeploymentManagerSPI
changeComponentResolved
in interface IDeploymentManagerSPI
componentId
- the component identifier to be changes the signal value.transaction
- the transaction to be used to change the component signal
value.PortalException
- if any error occurs during the process.PortalObjectNotFoundException
- if the component cannot be located.public void changeModuleResolved(String moduleId, ITransaction transaction) throws PortalException
IDeploymentManagerSPI
changeModuleResolved
in interface IDeploymentManagerSPI
moduleId
- the module identifier to be changes the signal value.transaction
- the transaction to be used to change the module signal value.PortalException
- if any error occurs during the process.PortalObjectNotFoundException
- if the module cannot be located.public void updateChannelId(String componentId, String channelId) throws PortalException
IDeploymentManagerSPI
PortalException
will be
raised.updateChannelId
in interface IDeploymentManagerSPI
componentId
- the component identifier to be updated.channelId
- the channelId to be assigned.PortalException
- if any error occurs during the process.public IDeploymentExecutionPlan createModuleDeploymentExecutionPlan(File moduleFolder, boolean forceReprocess, boolean syncStructure) throws PortalException
IDeploymentManagerSPI
createModuleDeploymentExecutionPlan
in interface IDeploymentManagerSPI
moduleFolder
- the folder that corresponds to the module root.forceReprocess
- indicates if must reprocess the module and its components.syncStructure
- indicates whether the components structures will be
synchronized.PortalException
- if any error occurs during the process.public IDeploymentExecutionPlan createPackageDeploymentExecutionPlan(File packageFolder, boolean forceReprocess, String packageId, boolean syncStructure) throws PortalException
IDeploymentManagerSPI
createPackageDeploymentExecutionPlan
in interface IDeploymentManagerSPI
packageFolder
- the folder that contains the jar modules and package
definition.forceReprocess
- indicates if must reprocess all modules and components
involved in the package.packageId
- package identifier. This parameter is optional and it value is
the package file name.syncStructure
- indicates whether the components structures will be
synchronized.PortalException
- if any error occurs during the process.Lumisportal 7.1.1.140331 - Copyright © 2006–2014 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.