A WLST Deployment Objects

WLST provides deployment objects that enable you to make changes to a deployment plan and to check the status of a deployment command.

WLSTPlan Object

The WLSTPlan object enables you to make changes to an application deployment plan after loading an application using the loadApplication command.

loadApplication in WLST Command Reference for Oracle WebLogic Server describes the command in more detail.

Table A-1 describes the WLSTPlan object methods that you can use to operate on the deployment plan.

Table A-1 WLSTPlan Object Methods

To operate on the... Use this method... To...

Deployment Plan

DeploymentPlanBean getDeploymentPlan()

Return the DeploymentPlanBean for the current application.

Deployment Plan

void save() throws FileNotFoundException, ConfigurationException, IOException

Save the deployment plan to a file from which it was read.

Module Descriptors

ModuleDescriptorBean createModuleDescriptor(String uri, String moduleOverrideName)

Create a ModuleDescriptorBean with the specified uri for the ModuleOverrideBean moduleOverrideName

Module Overrides

ModuleOverrideBean getModuleOverride(String name)

Return the ModuleOverrideBean name.

Module Overrides

ModuleOverrideBean[] getModuleOverrides()

Return all ModuleOverrideBean objects that are available in the deployment plan.

Module Overrides

void showModuleOverrides()

Print all of the ModuleOverrideBean objects that are available in the deployment plan as name/type pairs.

Variables

VariableBean createVariable(String name, String value)

Create a VariableBean name with this specified value that can override the value in the deployment plan.

Variables

void destroyVariable(String name)

Destroy the VariableBean name.

Variables

VariableBean getVariable(String name)

Return the VariableBean name.

Variables

VariableBean[] getVariables()

Return all VariableBean objects that are available in the deployment plan.

Variables

void setVariableValue(String name, String value)

Set the variable name to the specified value.

Variables

void showVariables()

Print all of the VariableBean objects in the deployment plan as name/value pairs.

Variable Assignment

VariableAssignmentBean createVariableAssignment(String name, String moduleOverrideName, String moduleDescriptorUri)

Create a VariableAssignmentBean for the ModuleDescriptorBean moduleDescriptorUri for the ModuleOverrideBean moduleOverrideName.

Variable Assignment

void destroyVariableAssignment(String name, String moduleOverrideName, String moduleDescriptorName)

Destroy the variable assignment named name in the module descriptor identified by moduleDescriptorName, within the module override identified by moduleOverrideName.

Variable Assignment

VariableAssignmentBean getVariableAssignment(String name, String moduleOverrideName, String moduleDescriptorName)

Return the variable assignment named name in the module descriptor identified by moduleDescriptorName, within the module override identified by moduleOverrideName.

WLSTProgress Object

The WLSTProgress object enables you to check the status of an executed deployment command.

The WLSTProgress object is returned by the following commands (refer to the associated command section in WLST Command Reference for Oracle WebLogic Server):

Table A-2 describes the WLSTProgress object methods that you can use to check the status of the current deployment action.

Table A-2 WLSTProgress Object Methods

Use this method... To...

String getCommandType()

Return the deployment CommandType of this event. This command returns one of the following values: distribute, redeploy, start, stop, or undeploy.

String getMessage()

Return information about the status of this event.

ProgressObject getProgressObject()

Return the ProgressObject that is associated with the current deployment action.

String getState()

Return the state of the current deployment action: running, completed, failed, or released. A released state means that deployment progress is no longer available, for example because the deployment-manager connection or deployment task was lost; it does not indicate that the application entered production mode.

boolean isCompleted()

Determine if the current deployment action has been completed.

boolean isFailed()

Determine if the current deployment action has failed.

boolean isRunning()

Determine if the current deployment action is running.

void printStatus()

Print the current status of the deployment action, including the command type, the state, additional messages, and so on.