lumis.portal.deployment
Class DeploymentManager

Package class diagram package DeploymentManager
java.lang.Object
  extended by lumis.portal.deployment.DeploymentManager
All Implemented Interfaces:
IDeploymentManager

public class DeploymentManager
extends Object
implements IDeploymentManager

Handles the deployment of portal resources.

Since:
4.0.7

Constructor Summary
DeploymentManager()
           
 
Method Summary
 ModuleType detectModuleType(InputStream moduleArchive)
          Detects the module type of an archive, based on its contents.
 IModule distribute(String moduleId, InputStream moduleArchive)
          Distributes a module archive to the portal servers.
 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.
 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.
 void registerDeployer(IPortalDeployer deployer)
          Deprecated. 
 void start(IModule module)
          Starts the execution of a module.
 void stop(IModule module)
          Stops the execution of a module.
 void undeploy(IModule module)
          Undeploys a module from the portal servers.
 boolean unregisterDeployer(IPortalDeployer deployer)
          Deprecated. 
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeploymentManager

public DeploymentManager()
Method Detail

registerDeployer

@Deprecated
public void registerDeployer(IPortalDeployer deployer)
Deprecated. 

Description copied from interface: IDeploymentManager
Register a deployer that may be used when performing a deployment.

Specified by:
registerDeployer in interface IDeploymentManager
Parameters:
deployer - the deployer.

unregisterDeployer

@Deprecated
public boolean unregisterDeployer(IPortalDeployer deployer)
Deprecated. 

Description copied from interface: IDeploymentManager
Unregisters a deployer that may be used when performing a deployment.

Specified by:
unregisterDeployer in interface IDeploymentManager
Parameters:
deployer - the deployer.
Returns:

getPortalDeployer

@Deprecated
public IPortalDeployer getPortalDeployer(DeployConfig deployConfig)
                                  throws PortalException
Deprecated. 

Description copied from interface: IDeploymentManager
Returns the deployer to be used to deploy to the portal.

Specified by:
getPortalDeployer in interface IDeploymentManager
Parameters:
deployConfig - the deployment specification.
Returns:
the deployer.
Throws:
PortalException - if there is no deployer that can handle the specified deployment.

init

public void init()
Initializes the deployment manager. This method initializes the deployed modules and starts the monitoring of deployments.

Since:
5.0.0

getClass

@Deprecated
public Class<?> getClass(String className)
                  throws ClassNotFoundException
Deprecated. 

Description copied from interface: IDeploymentManager
Returns the 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.

Specified by:
getClass in interface IDeploymentManager
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.
See Also:
Class#forName(String)}

getClassLoader

public ClassLoader getClassLoader()
Description copied from interface: IDeploymentManager
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:

Specified by:
getClassLoader in interface IDeploymentManager
Returns:
the class loader.

detectModuleType

public ModuleType detectModuleType(InputStream moduleArchive)
                            throws IOException,
                                   IllegalModuleArchiveException
Description copied from interface: IDeploymentManager
Detects the module type of an archive, based on its contents.

Specified by:
detectModuleType in interface IDeploymentManager
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.

distribute

public IModule distribute(String moduleId,
                          InputStream moduleArchive)
                   throws IOException,
                          IllegalModuleArchiveException,
                          PortalException
Description copied from interface: IDeploymentManager
Distributes a module archive to the portal servers. This operation validates the archive, generates all container specific classes and interfaces, and moves the resulting archive to all portal server nodes.

Specified by:
distribute in interface IDeploymentManager
Parameters:
moduleId - the identifier for the module being deployed.
moduleArchive - the module archive input stream.
Returns:
the deployed module object.
Throws:
IOException - if an I/O error occurs.
IllegalModuleArchiveException - if the archive module type could not be recognized.
PortalException

start

public void start(IModule module)
           throws PortalException
Description copied from interface: IDeploymentManager
Starts the execution of a module. If the module is already running it is not affected.

Specified by:
start in interface IDeploymentManager
Parameters:
module - the module.
Throws:
PortalException

stop

public void stop(IModule module)
          throws PortalException
Description copied from interface: IDeploymentManager
Stops the execution of a module. If the module is not running it is not affected.

Specified by:
stop in interface IDeploymentManager
Parameters:
module - the module.
Throws:
PortalException

undeploy

public void undeploy(IModule module)
              throws PortalException
Description copied from interface: IDeploymentManager
Undeploys a module from the portal servers.

Specified by:
undeploy in interface IDeploymentManager
Parameters:
module - the module to be undeployed.
Throws:
PortalException

getModules

public Collection<IModule> getModules(ModuleType moduleType)
                               throws PortalException
Description copied from interface: IDeploymentManager
Returns the currently installed modules of the specified type.

Specified by:
getModules in interface IDeploymentManager
Parameters:
moduleType - the module type.
Returns:
the modules.
Throws:
PortalException

getModule

public IModule getModule(String moduleId)
                  throws PortalException
Description copied from interface: IDeploymentManager
Returns the module with the specified identifier.

Specified by:
getModule in interface IDeploymentManager
Parameters:
moduleId - the module identifier.
Returns:
the module.
Throws:
PortalObjectNotFoundException - if no module with the given identifier was found.
PortalException


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.