BEA Systems, Inc.

WebLogic Server 8.1 API Reference

weblogic.management.deploy
Class DeploymentData

java.lang.Object
  |
  +--weblogic.management.deploy.DeploymentData

public class DeploymentData
extends java.lang.Object
implements java.io.Serializable

Describes the targets involved in an application deployment. DeploymentData objects are used when invoking deployments via the DeployerRuntimeMBean methods. The object defines the list of target servers, clusters and virtual hosts that apply to a specific deployment request, and may also be used to identify specific files to refresh as part of the deployment.

Author:
Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
See Also:
Serialized Form

Field Summary
static int CLUSTER
          Target is a Cluster
static int SERVER
          Target is a Server
static int UNKNOWN
          Target type is unknown either because it has not been set or is not available.
static int VIRTUALHOST
          Target is a Virtual Host
 
Constructor Summary
DeploymentData()
          Creates empty DeploymentData object, one with no targets defined and no file list.
DeploymentData(java.lang.String[] files)
          Creates DeploymentData object, with no targets defined and a file list.
 
Method Summary
 void addModuleToTarget(java.lang.String target, java.lang.String module)
          Adds a module name to an existing target in this object.
 void addTarget(java.lang.String target, java.lang.String[] modules)
          Adds a target name to this object.
 void addTargetsForComponent(ApplicationMBean mbean, java.lang.String compName)
          Creates target/module list based on application configuration.
 java.lang.String getAltDescriptorPath()
           
 java.lang.String getAltWLSDescriptorPath()
           
 boolean getClusterConstraints()
           
 boolean getDelete()
           
 java.lang.String[] getFiles()
          Returns the files specific to this deployment
 java.lang.String[] getModules()
          Returns list of all modules, regardless of target.
 java.lang.String[] getModulesForTarget(java.lang.String target)
          Returns list of modules for a particular target defined in this object.
 java.lang.String[] getTargets()
          Returns a list of targets (server, web server, virtual hosts and cluster names) An empty array indicates no targets, whereas a null return value implies all configured targets.
 java.util.Set getTargetsForModule(java.lang.String module)
          Returns list of target names associated with a specific module.
 int getTargetType(java.lang.String target)
          Specifies the type of target involved.
 int getTimeOut()
          Timeout value (in milliseconds) used for 2 phase deployments.
 boolean iActionFromDeployer()
          exclude
 void setActionFromDeployer(boolean isDeployer)
           
 void setAltDescriptorPath(java.lang.String dd)
           
 void setAltWLSDescriptorPath(java.lang.String dd)
           
 void setClusterConstraints(boolean clusterConstraints)
          Sets the attribute indicating if strict cluster constraints need to be enforced on clustered deployments.
 void setDelete(boolean deleteFlag)
           
 void setFile(java.lang.String[] files)
          Indicates whether to add or remove files from the application's staging area.
 void setTargetType(java.lang.String target, int type)
          Specifies the type of target involved.
 void setTimeOut(int timeInMillis)
          Overrides deployment timeout value.
 java.lang.String toString()
          Constructs a String representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN

public static final int UNKNOWN
Target type is unknown either because it has not been set or is not available.

CLUSTER

public static final int CLUSTER
Target is a Cluster

SERVER

public static final int SERVER
Target is a Server

VIRTUALHOST

public static final int VIRTUALHOST
Target is a Virtual Host
Constructor Detail

DeploymentData

public DeploymentData()
Creates empty DeploymentData object, one with no targets defined and no file list.

DeploymentData

public DeploymentData(java.lang.String[] files)
Creates DeploymentData object, with no targets defined and a file list.

Parameters:
files - is a list of file names to be deployed. This defines a partial deployment, one where individual files are distributed instead of entire applications. This is only valid for redeployments. The files in the list are relative to the root of the application. This argument may be null.
Method Detail

setFile

public void setFile(java.lang.String[] files)
Indicates whether to add or remove files from the application's staging area. This only applies when a file list is included.

Parameters:
deleteFlag, - if true, will result in the listed files being removed from the staging and active areas, and only if they were staged to those locations. The default is false.

setDelete

public void setDelete(boolean deleteFlag)


getDelete

public boolean getDelete()


setClusterConstraints

public void setClusterConstraints(boolean clusterConstraints)
Sets the attribute indicating if strict cluster constraints need to be enforced on clustered deployments. If this attribute is set to 'true', any cluster that may be a target of a deployment needs to have all its servers be running for the deployment to succeed. Setting the attribute to 'false' will result in the deployment being attempted only on the servers that are reachable at the time of deployment from the Admin server. Any servers that have been shut down or are temporarily partitioned from the Admin server will retrieve the deployment during server startup or shortly after the the network partition is resolved.


getClusterConstraints

public boolean getClusterConstraints()


getTimeOut

public int getTimeOut()
Timeout value (in milliseconds) used for 2 phase deployments. This value defaults to ApplicationMBean.DEPLOYMENT_TIMEOUT, but can be overriden with setTimeOut(int) method. Deployment tasks that remain running for more than this time are automatically cancelled, with their state becoming failed. For cluster deployments, this will result in a rollback of the entire deployment.


setTimeOut

public void setTimeOut(int timeInMillis)
Overrides deployment timeout value.

See Also:
getTimeOut()

addTarget

public void addTarget(java.lang.String target,
                      java.lang.String[] modules)
Adds a target name to this object. The name must be the name of a server, cluster, web server or virtual host. Any number of targets may be added. Each target may be further qualified with module names via the modules parameter. If no modules are specified the deployment applies to all modules. e.g. for an activation, all modules in the application are deployed to the target. If modules are included, then the activation applies only to those modules for the specified target.

Modules may also be added using the addModuleToTarget(java.lang.String, java.lang.String) method.

Parameters:
target - is the name of a server, cluster or virtual host. Virtual hosts are only valid for web deployments.
modules - is an optional list of module names which are specifically targetted to the named target. A null value indicates all modules. An empty array implies no modules.

getModulesForTarget

public java.lang.String[] getModulesForTarget(java.lang.String target)
Returns list of modules for a particular target defined in this object. A null is returned if all modules configured in the associated application are to be involved in the deployment. An empty list implies that no modules are to be involved in the deployment to the target.


setAltDescriptorPath

public void setAltDescriptorPath(java.lang.String dd)


getAltDescriptorPath

public java.lang.String getAltDescriptorPath()


setAltWLSDescriptorPath

public void setAltWLSDescriptorPath(java.lang.String dd)


getAltWLSDescriptorPath

public java.lang.String getAltWLSDescriptorPath()


addModuleToTarget

public void addModuleToTarget(java.lang.String target,
                              java.lang.String module)
Adds a module name to an existing target in this object. The target name must already have been added to this object. If it is desired that all modules be involved in the deployment to the target, then there is no need to add module names as qualifiers to the target.

Parameters:
target - is the server, cluster, web server or virtual host to receive the module.
module - is the name of the module to be deployed to this target.

addTargetsForComponent

public void addTargetsForComponent(ApplicationMBean mbean,
                                   java.lang.String compName)
                            throws java.lang.IllegalArgumentException
Creates target/module list based on application configuration. This is a convenience method for the case where the user has access to the configured application, the ApplicationMBean, and wants to create a target list based on the existing configuration. The compName parameter identifies the specific module in the application, and the configured targets for that module are used to populate the targets for this object.

Parameters:
mbean - is the application containing the component
compName - is the component whose targets will be added to this object

getTargetsForModule

public java.util.Set getTargetsForModule(java.lang.String module)
Returns list of target names associated with a specific module. Targets may be servers, clusters or virtual hosts. An empty list is returned if a module has no targets for this deployment. The Set object returned is capable of remove operations.


getModules

public java.lang.String[] getModules()
Returns list of all modules, regardless of target. The list returned is based on what has been defined for this object and does not represent any configured state of an application.


getTargets

public java.lang.String[] getTargets()
Returns a list of targets (server, web server, virtual hosts and cluster names) An empty array indicates no targets, whereas a null return value implies all configured targets.


getFiles

public java.lang.String[] getFiles()
Returns the files specific to this deployment


getTargetType

public int getTargetType(java.lang.String target)
Specifies the type of target involved. Can be a cluster, server, web server or virtual host

Parameters:
target - is the name of the target being checked.

setTargetType

public void setTargetType(java.lang.String target,
                          int type)
Specifies the type of target involved. Can be a cluster, server, web server or virtual host

Parameters:
target - is the name of the target being updated.
type - the type of the target.

toString

public java.lang.String toString()
Constructs a String representation of the object.

Overrides:
toString in class java.lang.Object

iActionFromDeployer

public boolean iActionFromDeployer()
exclude


setActionFromDeployer

public void setActionFromDeployer(boolean isDeployer)


Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs81