atg.deployment.common
Class Status

java.lang.Object
  extended by atg.deployment.common.Status
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Status
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

A collection of useful information for targets, agents, and deployments. The target status is not too different from its varying sources, but does have some conceptual differences.

When obtained from Target.getStatus(), the Status object represents the merged status from all agents that make up the target. For example, if one of the responsible agents has a null deployed snapshot, the Status will have a null snapshot even though the rest of the agents have a legitimate deployed snapshot. Deployment-specific fields are filled in from the agents rather than the deployment status.

When obtained from AgentRef.getStatus(), the Status object represents the single agent status. State, deployed snapshot, and deployment info are all specific to the one agent.

When obtained from Deployment.getStatus(), the Status object represents the status of the specific deployment. State is set by the deployment process rather than individual agent state.

The typical deployment goes through the following phases:

   lock target
   prepare target
   create manifest
   install manifest
   load manifest
   apply manifest
   activate deployment
 
The basic ordering of phases is standard, though some phases may be skipped. For example, on a first run the Deployment object will go through the create manifest phase but not the load phase. If the deployment is resumed via Deployment.resume(), the create manifest phase will be skipped (if the manifest was created) and instead a load phase will be performed.

Each phase has a pre and post phase state change call of the form ACTIVE_ and DONE_. For example, when entering the prepare phase both deployment and target agents update their status to ACTIVE_PREPARE and then to DONE_PREPARE when the phase is complete. DeploymentEventListeners can listen for these distinct phase changes (though corresponding listener events are defined in DeploymentEvent).

Given this, the typical flow of a deployment on both the server and the agent looks something like this:

Deployment Agent Comment
IDLE the agent is idle when there is no deployment
IDLE a Deployment is created but begin() has not been called
ACTIVE_LOCK Deployment.begin() is called beginning target locking
ACTIVE_LOCK begin locking
DONE_LOCK locking completed successfully
DONE_LOCK all target agents locked successfully
ACTIVE_PREPARE begin target preparation
ACTIVE_PREPARE begin preparation
DONE_PREPARE preparation completed successfully
DONE_PREPARE all target agents prepared successfully
ACTIVE_CREATE this is a new deployment and must create a new manifest
DONE_CREATE manifest creation completed successfully
ACTIVE_INSTALL begin installing the manifest on all target agents
ACTIVE_INSTALL begin installing the manifest
DONE_INSTALL manifest installation completes successfully
ACTIVE_LOAD begin implicit manifest loading
DONE_LOAD manifest loading completed successfully
DONE_INSTALL all targets either had the manifest or received it successfully
ACTIVE_APPLY begin applying the manifest on all target agents
ACTIVE_APPLY begin applying the manifest
ACTIVE_APPLY_COMMITTED manifest application committed the first batch of asset operations
ACTIVE_APPLY_COMMITTED manifest application committed the first batch of asset operations
DONE_APPLY manifest application completed successfully
DONE_APPLY all target manifest applications completed successfully
ACTIVE_ACTIVATE begin activating the deployment on all target agents
ACTIVE_ACTIVATE begin activating the deployment
DONE_ACTIVATE deployment activation completed successfully
DONE_ACTIVATE all target deployment activations completed successfully
DEPLOYMENT_COMPLETE deployment is complete
IDLE the agent returns to an idle state
DEPLOYMENT_COMPLETE deployment is complete
Although most of the information provided in Status is in the form of read-write properties, these properties are not actually writable, as only "safe" copies of the Status are ever returned from the getStatus() calls.

See Also:
Target, AgentRef, Deployment, DeploymentEventListener, Serialized Form

Nested Class Summary
 class Status.FailureMessage
          Inner class used to store failure data from a failed deployment.
 
Field Summary
static int ACTIVE_ACTIVATE
           
static int ACTIVE_ACTIVATE_SWITCH_PREPARED
           
static int ACTIVE_APPLY
           
static int ACTIVE_APPLY_COMMITTED
           
static int ACTIVE_CANCEL
           
static int ACTIVE_CREATE
           
static int ACTIVE_INSTALL
           
static int ACTIVE_LOAD
           
static int ACTIVE_LOCK
           
static int ACTIVE_PREPARE
           
static int ACTIVE_STOP
           
static java.lang.String CLASS_VERSION
          Class version string
static int DEPLOYMENT_COMPLETE
           
static int DEPLOYMENT_DELETED
           
static int DONE_ACTIVATE
           
static int DONE_APPLY
           
static int DONE_CANCEL
           
static int DONE_CREATE
           
static int DONE_INSTALL
           
static int DONE_LOAD
           
static int DONE_LOCK
           
static int DONE_PREPARE
           
static int DONE_STOP
           
static int ERROR
           
static int ERROR_ACTIVATE
           
static int ERROR_APPLY
           
static int ERROR_APPLY_COMMITTED
           
static int ERROR_CANCEL
           
static int ERROR_CREATE
           
static int ERROR_EVENT_INTERRUPT
           
static int ERROR_INSTALL
           
static int ERROR_LOAD
           
static int ERROR_LOAD_INCOMPLETE
           
static int ERROR_LOAD_MISSING
           
static int ERROR_LOCK
           
static int ERROR_PREPARE
           
static int ERROR_STOP
           
static int ERROR_SWITCH
           
static int ERROR_TRANSPORT
           
static int ERROR_TRANSPORT_UNINSTANTIATED
           
static int FIRST_APPLY_STAGE
           
static int IDLE
           
static int MANIFEST_DELETE
           
static int SECOND_APPLY_STAGE
           
static int SET_AGENT_STATUS
           
static int SET_CLUSTER_DESTINATIONS
           
static int SNAPSHOT_INITIALIZE
           
static int SWITCH_DATASTORES
           
static int WAITING_QUEUED
           
static int WAITING_SCHEDULED
           
 
Method Summary
 void addAffectedItemType(java.lang.String pRepository, java.lang.String pItemType)
           
 void addDeploymentAgentSwitchableVFS(java.lang.String pSwitchableVFS)
          Add a switchable VFS to the list of switchable VFSs configured for this agent.
 void addFailureMessage(java.lang.String pMessage, java.lang.String pStackTrace, java.util.Date pFailureTime, java.lang.String pSeverity, java.lang.String pAction, java.lang.String pItemDesc, java.lang.String pItemId, java.lang.String pFilePath, java.lang.String pFileId)
           
protected  java.lang.Object clone()
          Override Object.clone() so that copies may be made.
 java.util.Map getAffectedItemTypes()
          A Map with a key of affected repository path to a Set value of affected item types
 java.util.Map getAssetDestinations()
          Get the list of repository/VFS paths affected by this deployment
 ClusterStatus getClusterStatus()
           
 java.lang.String getDeployedSnapshot()
          The current deployed snapshot of the target or agent.
 long getDeployedSnapshotTimestamp()
          System milliseconds when the deployed snapshot was last set by a deployment.
 java.lang.String getDeploymentAgentInactiveDataStore()
          The name of the inative datastore if the agent is configured for switch deployments.
 int getDeploymentAgentLocalPort()
          The local port used in the FileDeploymentServer for DAF file deployments.
 java.util.Collection getDeploymentAgentSwitchableVFS()
          Returns a Collection of VFSs configured for switch deployments on this agent.
 long getDeploymentBeginTimestamp()
          System milliseconds when the deployment was first started.
 java.util.Date getDeploymentBeginTimestampAsDate()
          Date when the deployment was first started.
 java.lang.String getDeploymentCreateInitiator()
          A generic identifier denoting who or what created/started the deployment.
 java.lang.String getDeploymentCurrentDataStore()
          The current data store if the agent is configured for switch deployments.
 java.lang.String getDeploymentDeleteInitiator()
          A generic identifier denoting who or what deleted the deployment.
 java.lang.String getDeploymentID()
          Current deployment identifier.
 long getDeploymentLastBeginTimestamp()
          System milliseconds when the deployment was last started.
 java.util.Date getDeploymentLastBeginTimestampAsDate()
          Date when the deployment was last started.
 long getDeploymentLastExecutionTime()
          The time in milliseconds the deployment has spent running since it was last started.
 java.lang.String getDeploymentLiveDataStore()
          The live data store at the beginning of this deployment if the agent is configured for switch deployments.
 java.lang.String getDeploymentManifestID()
          The Manifest ID of the manifest currently being deployed.
 int getDeploymentMode()
          The deployment mode, either Constants.MODE_ONLINE or Constants.MODE_SWITCH.
 java.lang.String[] getDeploymentProjectIDs()
          The project IDs being deployed to the target or agent.
 java.lang.String getDeploymentRollbackInitiator()
          A generic identifier for who or what called rollback on the deployment.
 java.lang.String getDeploymentRollbackManifestID()
          The Manifest ID of the rollback manifest for this deployment.
 java.lang.String getDeploymentServer()
          Name of the deployment server performing the current deployment.
 java.lang.String getDeploymentSnapshot()
          The snapshot being deployed to the target or agent.
 java.lang.String getDeploymentStopInitiator()
          A generic identifier denoting who or what stopped/interrupted the deployment.
 int getDeploymentStrictFileOps()
           
 int getDeploymentStrictRepoOps()
           
 long getDeploymentTotalExecutionTime()
          The time in milliseconds the deployment has spent running.
 int getDeploymentType()
          The deployment type, either Constants.TYPE_INCREMENTAL or Constants.TYPE_FULL.
 java.lang.Throwable getErrorCausedByException()
          The Exception that caused the error state, if an Exception did so.
 java.lang.String getErrorMessage()
          A textual description of what caused the error status, if the status is an error state.
 java.lang.String getErrorMessage(java.util.Locale pLocale)
          A textual description of what caused the error status, if the status is an error state.
 java.lang.Object[] getErrorMsgResourceArguments()
          Resource string arguments used to fill in and create the error message.
 java.lang.String getErrorMsgResourceKey()
          The resource look-up key for the error message.
 java.util.Collection getFailureMessages()
           
 int getLastCompletedStage()
           
 java.lang.String getLastDeployedClusterID()
           
 java.lang.String[] getLiveDatastores()
          Live datastore name of each switchable datastore defined in mSwitchablePaths.
 int getPreviousState()
          The previous state of this status.
 int getState()
          The numeric state code indicating the status.
 java.lang.String getStateString()
          Returns the integer state code as a character string identifier.
 long getStateTimestamp()
          Timestamp the state of this status was last changed.
 java.util.Date getStateTimestampAsDate()
          Timestamp the state of this status was last changed.
 java.lang.String[] getSwitchablePaths()
          Array of Nucleus component paths on this agent that implement Switchable.
 java.lang.String getTarget()
          The logical target of the status, either a deployment target or a local agent.
 java.lang.String getTargetSnapshotID()
           
 boolean getUseAgentErrorMsgResourceKey()
          Set this to true during an agent exception and the CA server will use the agent error message resource key and resource arguments when reporting the deployment error.
 java.lang.String getUserStateString()
          Returns the integer state code as a character string identifier which can be shown to the end user.
 java.lang.String getUserStateString(java.util.Locale pLocale)
          Returns the integer state code as a character string identifier which can be shown to the end user.
 boolean isDeploymentCommitted()
          Whether or not this deployment has proceeded past the committed point of no return.
 boolean isDeploymentFirstPass()
          Identifier indicating whether the currently running deployment is on its first or second pass in a switch configured deployment.
 boolean isDeploymentRevert()
          Returns property deploymentRevert.
 boolean isDeploymentRollback()
          Whether or not the deployment has been flagged for rollback.
 boolean isDeploymentSwitched()
          Whether or not this deployment has switched yet, if it is a switch deployment.
 boolean isDeploymentTargetSwitched()
          Whether or not the target deployment datasources have been switched yet, if this is a switch configured deployment.
 boolean isStateActive()
          Returns true if the state denotes the beginning of a phase of deployment, including the beginning of a stop or the beginning of a deployment lock.
 boolean isStateDone()
          Returns true if the state denotes the ending of a phase of deployment, including the ending of a stop and an over-all deployment completion.
 boolean isStateError()
          Returns true if the state code is an error code.
 boolean isStateInterruptable()
          Returns true if the state is interruptable by a deployment event.
 boolean isSwitchable()
          Whether or not the target or agent is configured for switch deployments.
static void main(java.lang.String[] args)
          Debugging and testing main() call.
 void removeAffectedItemTypes(java.lang.String pRepository)
           
 void setAffectedItemTypes(java.util.Map pAffectedItemTypes)
          A Map with a key of affected repository path to a Set value of affected item types
 void setAssetDestinations(java.util.Map pDestinations)
          Set the list of repository/VFS paths affected by this deployment
 void setClusterStatus(ClusterStatus pClusterStatus)
           
 void setDeploymentAgentInactiveDataStore(java.lang.String pInactiveDataStore)
          The name of the inative datastore if the agent is configured for switch deployments.
 void setDeploymentAgentLocalPort(int pDeploymentAgentLocalPort)
          The local port used in the FileDeploymentServer for DAF file deployments.
 void setDeploymentBeginTimestamp(long pDeploymentBeginTimestamp)
          System milliseconds when the deployment was first started.
 void setDeploymentCommitted(boolean pDeploymentCommitted)
          Whether or not this deployment has proceeded past the committed point of no return.
 void setDeploymentCreateInitiator(java.lang.String pDeploymentCreateInitiator)
          A generic identifier denoting who or what created/started the deployment.
 void setDeploymentCurrentDataStore(java.lang.String pDeploymentCurrentDataStore)
          The current data store if the agent is configured for switch deployments.
 void setDeploymentDeleteInitiator(java.lang.String pDeploymentDeleteInitiator)
          A generic identifier denoting who or what deleted the deployment.
 void setDeploymentFirstPass(boolean pDeploymentFirstPass)
          Identifier indicating whether the currently running deployment is on its first or second pass in a switch configured deployment.
 void setDeploymentID(java.lang.String pDeploymentID)
          Current deployment identifier.
 void setDeploymentLastBeginTimestamp(long pDeploymentLastBeginTimestamp)
          System milliseconds when the deployment was last started.
 void setDeploymentLastExecutionTime(long pDeploymentLastExecutionTime)
          The time in milliseconds the deployment has spent running since it was last started.
 void setDeploymentLiveDataStore(java.lang.String pDeploymentLiveDataStore)
          The live data store at the beginning of this deployment if the agent is configured for switch deployments.
 void setDeploymentManifestID(java.lang.String pDeploymentManifestID)
          The Manifest ID of the manifest currently being deployed.
 void setDeploymentMode(int pDeploymentMode)
          The deployment mode, either Constants.MODE_ONLINE or Constants.MODE_SWITCH.
 void setDeploymentRevert(boolean pDeploymentRevert)
          Sets property deploymentRevert.
 void setDeploymentRollback(boolean pDeploymentRollback)
          Whether or not the deployment has been flagged for rollback.
 void setDeploymentRollbackInitiator(java.lang.String pDeploymentRollbackInitiator)
          A generic identifier for who or what called rollback on the deployment.
 void setDeploymentRollbackManifestID(java.lang.String pDeploymentRollbackManifestID)
          The Manifest ID of the rollback manifest for this deployment.
 void setDeploymentServer(java.lang.String pDeploymentServer)
          Name of the deployment server performing the current deployment.
 void setDeploymentStopInitiator(java.lang.String pDeploymentStopInitiator)
          A generic identifier denoting who or what stopped/interrupted the deployment.
 void setDeploymentStrictFileOps(int pDeploymentStrictFileOps)
           
 void setDeploymentStrictRepoOps(int pDeploymentStrictRepoOps)
           
 void setDeploymentSwitched(boolean pDeploymentSwitched)
          Whether or not this deployment has switched yet, if it is a switch deployment.
 void setDeploymentTargetSwitched(boolean pDeploymentTargetSwitched)
          Whether or not the target deployment datasources have been switched yet, if this is a switch configured deployment.
 void setDeploymentTotalExecutionTime(long pDeploymentTotalExecutionTime)
          The time in milliseconds the deployment has spent running.
 void setDeploymentType(int pDeploymentType)
          The deployment type, either Constants.TYPE_INCREMENTAL or Constants.TYPE_FULL.
 void setErrorCausedByException(java.lang.Throwable pErrorCausedByException)
          The Exception that caused the error state, if an Exception did so.
 void setErrorMsgResourceArguments(java.lang.Object pArg1)
          A convenience method for setting/creating the error message resource arguments array.
 void setErrorMsgResourceArguments(java.lang.Object[] pErrorMsgResourceArguments)
          Resource string arguments used to fill in and create the error message.
 void setErrorMsgResourceArguments(java.lang.Object pArg1, java.lang.Object pArg2)
          A convenience method for setting/creating the error message resource arguments array.
 void setErrorMsgResourceArguments(java.lang.Object pArg1, java.lang.Object pArg2, java.lang.Object pArg3)
          A convenience method for setting/creating the error message resource arguments array.
 void setErrorMsgResourceArguments(java.lang.Object pArg1, java.lang.Object pArg2, java.lang.Object pArg3, java.lang.Object pArg4)
          A convenience method for setting/creating the error message resource arguments array.
 void setErrorMsgResourceArguments(java.lang.Object pArg1, java.lang.Object pArg2, java.lang.Object pArg3, java.lang.Object pArg4, java.lang.Object pArg5)
          A convenience method for setting/creating the error message resource arguments array.
 void setErrorMsgResourceKey(java.lang.String pErrorMsgResourceKey)
          The resource look-up key for the error message.
 void setFailureMessages(java.util.Collection pFailureMessages)
           
 void setLastCompletedStage(int pLastCompletedStage)
           
 void setLastDeployedClusterID(java.lang.String pLastDeployedClusterID)
          N.B.
 void setLiveDatastores(java.lang.String[] pLiveDatastores)
          Live datastore name of each switchable datastore defined in mSwitchablePaths.
 void setState(int pState)
          The numeric state code indicating the status.
 void setSwitchable(boolean pSwitchable)
          Whether or not the target or agent is configured for switch deployments.
 void setSwitchablePaths(java.lang.String[] pSwitchablePaths)
          Array of Nucleus component paths on this agent that implement Switchable.
 void setTarget(java.lang.String pTarget)
          The logical target of the status, either a deployment target or a local agent.
 void setTargetSnapshotID(java.lang.String pTargetSnapshotID)
           
 void setUseAgentErrorMsgResourceKey(boolean pUseAgentErrorMsgResourceKey)
          Set this to true during an agent exception and the CA server will use the agent error message resource key and resource arguments when reporting the deployment error.
static java.lang.String stateToString(int pStateCode)
          Returns a string form of the state code.
static java.lang.String stateToString(int pStateCode, java.util.Locale pLocale)
          Returns a string form of the state code for the given locale.
 java.lang.String toString()
          Returns this Status as a String.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


IDLE

public static final int IDLE
See Also:
Constant Field Values

DEPLOYMENT_COMPLETE

public static final int DEPLOYMENT_COMPLETE
See Also:
Constant Field Values

ERROR

public static final int ERROR
See Also:
Constant Field Values

ERROR_TRANSPORT

public static final int ERROR_TRANSPORT
See Also:
Constant Field Values

ERROR_TRANSPORT_UNINSTANTIATED

public static final int ERROR_TRANSPORT_UNINSTANTIATED
See Also:
Constant Field Values

ERROR_EVENT_INTERRUPT

public static final int ERROR_EVENT_INTERRUPT
See Also:
Constant Field Values

DEPLOYMENT_DELETED

public static final int DEPLOYMENT_DELETED
See Also:
Constant Field Values

SNAPSHOT_INITIALIZE

public static final int SNAPSHOT_INITIALIZE
See Also:
Constant Field Values

MANIFEST_DELETE

public static final int MANIFEST_DELETE
See Also:
Constant Field Values

WAITING_QUEUED

public static final int WAITING_QUEUED
See Also:
Constant Field Values

WAITING_SCHEDULED

public static final int WAITING_SCHEDULED
See Also:
Constant Field Values

ACTIVE_LOCK

public static final int ACTIVE_LOCK
See Also:
Constant Field Values

DONE_LOCK

public static final int DONE_LOCK
See Also:
Constant Field Values

ERROR_LOCK

public static final int ERROR_LOCK
See Also:
Constant Field Values

ACTIVE_PREPARE

public static final int ACTIVE_PREPARE
See Also:
Constant Field Values

DONE_PREPARE

public static final int DONE_PREPARE
See Also:
Constant Field Values

ERROR_PREPARE

public static final int ERROR_PREPARE
See Also:
Constant Field Values

ACTIVE_CREATE

public static final int ACTIVE_CREATE
See Also:
Constant Field Values

DONE_CREATE

public static final int DONE_CREATE
See Also:
Constant Field Values

ERROR_CREATE

public static final int ERROR_CREATE
See Also:
Constant Field Values

ACTIVE_INSTALL

public static final int ACTIVE_INSTALL
See Also:
Constant Field Values

DONE_INSTALL

public static final int DONE_INSTALL
See Also:
Constant Field Values

ERROR_INSTALL

public static final int ERROR_INSTALL
See Also:
Constant Field Values

ACTIVE_LOAD

public static final int ACTIVE_LOAD
See Also:
Constant Field Values

DONE_LOAD

public static final int DONE_LOAD
See Also:
Constant Field Values

ERROR_LOAD

public static final int ERROR_LOAD
See Also:
Constant Field Values

ERROR_LOAD_MISSING

public static final int ERROR_LOAD_MISSING
See Also:
Constant Field Values

ERROR_LOAD_INCOMPLETE

public static final int ERROR_LOAD_INCOMPLETE
See Also:
Constant Field Values

ACTIVE_APPLY

public static final int ACTIVE_APPLY
See Also:
Constant Field Values

ACTIVE_APPLY_COMMITTED

public static final int ACTIVE_APPLY_COMMITTED
See Also:
Constant Field Values

DONE_APPLY

public static final int DONE_APPLY
See Also:
Constant Field Values

ERROR_APPLY

public static final int ERROR_APPLY
See Also:
Constant Field Values

ERROR_APPLY_COMMITTED

public static final int ERROR_APPLY_COMMITTED
See Also:
Constant Field Values

ACTIVE_ACTIVATE

public static final int ACTIVE_ACTIVATE
See Also:
Constant Field Values

ACTIVE_ACTIVATE_SWITCH_PREPARED

public static final int ACTIVE_ACTIVATE_SWITCH_PREPARED
See Also:
Constant Field Values

DONE_ACTIVATE

public static final int DONE_ACTIVATE
See Also:
Constant Field Values

ERROR_ACTIVATE

public static final int ERROR_ACTIVATE
See Also:
Constant Field Values

ACTIVE_STOP

public static final int ACTIVE_STOP
See Also:
Constant Field Values

DONE_STOP

public static final int DONE_STOP
See Also:
Constant Field Values

ERROR_STOP

public static final int ERROR_STOP
See Also:
Constant Field Values

ACTIVE_CANCEL

public static final int ACTIVE_CANCEL
See Also:
Constant Field Values

DONE_CANCEL

public static final int DONE_CANCEL
See Also:
Constant Field Values

ERROR_CANCEL

public static final int ERROR_CANCEL
See Also:
Constant Field Values

SET_AGENT_STATUS

public static final int SET_AGENT_STATUS
See Also:
Constant Field Values

SET_CLUSTER_DESTINATIONS

public static final int SET_CLUSTER_DESTINATIONS
See Also:
Constant Field Values

SWITCH_DATASTORES

public static final int SWITCH_DATASTORES
See Also:
Constant Field Values

ERROR_SWITCH

public static final int ERROR_SWITCH
See Also:
Constant Field Values

FIRST_APPLY_STAGE

public static final int FIRST_APPLY_STAGE
See Also:
Constant Field Values

SECOND_APPLY_STAGE

public static final int SECOND_APPLY_STAGE
See Also:
Constant Field Values
Method Detail

setClusterStatus

public void setClusterStatus(ClusterStatus pClusterStatus)
Parameters:
pClusterStatus -

getClusterStatus

public ClusterStatus getClusterStatus()
Returns:

setLastDeployedClusterID

public void setLastDeployedClusterID(java.lang.String pLastDeployedClusterID)
N.B. Last _successful_ deployment cluster TODO dlee: determine if we really need this

Parameters:
pLastDeployedClusterID -

getLastDeployedClusterID

public java.lang.String getLastDeployedClusterID()
Returns:

setTarget

public void setTarget(java.lang.String pTarget)
The logical target of the status, either a deployment target or a local agent.

Parameters:
pTarget - new value to set

getTarget

public java.lang.String getTarget()
The logical target of the status, either a deployment target or a local agent.

Returns:
String

setSwitchable

public void setSwitchable(boolean pSwitchable)
Whether or not the target or agent is configured for switch deployments.

Parameters:
pSwitchable - new value to set

isSwitchable

public boolean isSwitchable()
Whether or not the target or agent is configured for switch deployments.

Returns:
boolean

setSwitchablePaths

public void setSwitchablePaths(java.lang.String[] pSwitchablePaths)
Array of Nucleus component paths on this agent that implement Switchable.

Parameters:
pSwitchablePaths - new value to set

getSwitchablePaths

public java.lang.String[] getSwitchablePaths()
Array of Nucleus component paths on this agent that implement Switchable.

Returns:

setLiveDatastores

public void setLiveDatastores(java.lang.String[] pLiveDatastores)
Live datastore name of each switchable datastore defined in mSwitchablePaths.

Parameters:
pLiveDatastores - new value to set

getLiveDatastores

public java.lang.String[] getLiveDatastores()
Live datastore name of each switchable datastore defined in mSwitchablePaths.

Returns:

setState

public void setState(int pState)
The numeric state code indicating the status.

Parameters:
pState - new value to set

getState

public int getState()
The numeric state code indicating the status.

Returns:
int

getStateString

public java.lang.String getStateString()
Returns the integer state code as a character string identifier. The string identifier is the same as the constant name, which may not be desirable for a UI.

Returns:
String

getUserStateString

public java.lang.String getUserStateString(java.util.Locale pLocale)
Returns the integer state code as a character string identifier which can be shown to the end user.

Returns:
String

getUserStateString

public java.lang.String getUserStateString()
Returns the integer state code as a character string identifier which can be shown to the end user. Assuming this application is running as a Dynamo application.

Returns:
String

getStateTimestamp

public long getStateTimestamp()
Timestamp the state of this status was last changed.

Returns:
long

getStateTimestampAsDate

public java.util.Date getStateTimestampAsDate()
Timestamp the state of this status was last changed.

Returns:
java.util.Date

getPreviousState

public int getPreviousState()
The previous state of this status.

Returns:
int

setAssetDestinations

public void setAssetDestinations(java.util.Map pDestinations)
Set the list of repository/VFS paths affected by this deployment


getAssetDestinations

public java.util.Map getAssetDestinations()
Get the list of repository/VFS paths affected by this deployment


getFailureMessages

public java.util.Collection getFailureMessages()

setFailureMessages

public void setFailureMessages(java.util.Collection pFailureMessages)

addFailureMessage

public void addFailureMessage(java.lang.String pMessage,
                              java.lang.String pStackTrace,
                              java.util.Date pFailureTime,
                              java.lang.String pSeverity,
                              java.lang.String pAction,
                              java.lang.String pItemDesc,
                              java.lang.String pItemId,
                              java.lang.String pFilePath,
                              java.lang.String pFileId)

getErrorMessage

public java.lang.String getErrorMessage()
A textual description of what caused the error status, if the status is an error state.

Returns:
String

getErrorMessage

public java.lang.String getErrorMessage(java.util.Locale pLocale)
A textual description of what caused the error status, if the status is an error state.

Returns:
String

setErrorMsgResourceKey

public void setErrorMsgResourceKey(java.lang.String pErrorMsgResourceKey)
The resource look-up key for the error message.

All of deployment uses the same ResouceBundle and so no bundle is ever specified here.

Parameters:
pErrorMsgResourceKey - new value to set

getErrorMsgResourceKey

public java.lang.String getErrorMsgResourceKey()
The resource look-up key for the error message.

All of deployment uses the same ResouceBundle and so no bundle is ever specified here.

Returns:
String

setErrorMsgResourceArguments

public void setErrorMsgResourceArguments(java.lang.Object[] pErrorMsgResourceArguments)
Resource string arguments used to fill in and create the error message.

Parameters:
pErrorMsgResourceArguments - new value to set

setErrorMsgResourceArguments

public void setErrorMsgResourceArguments(java.lang.Object pArg1)
A convenience method for setting/creating the error message resource arguments array.


setErrorMsgResourceArguments

public void setErrorMsgResourceArguments(java.lang.Object pArg1,
                                         java.lang.Object pArg2)
A convenience method for setting/creating the error message resource arguments array.


setErrorMsgResourceArguments

public void setErrorMsgResourceArguments(java.lang.Object pArg1,
                                         java.lang.Object pArg2,
                                         java.lang.Object pArg3)
A convenience method for setting/creating the error message resource arguments array.


setErrorMsgResourceArguments

public void setErrorMsgResourceArguments(java.lang.Object pArg1,
                                         java.lang.Object pArg2,
                                         java.lang.Object pArg3,
                                         java.lang.Object pArg4)
A convenience method for setting/creating the error message resource arguments array.


setErrorMsgResourceArguments

public void setErrorMsgResourceArguments(java.lang.Object pArg1,
                                         java.lang.Object pArg2,
                                         java.lang.Object pArg3,
                                         java.lang.Object pArg4,
                                         java.lang.Object pArg5)
A convenience method for setting/creating the error message resource arguments array.


getErrorMsgResourceArguments

public java.lang.Object[] getErrorMsgResourceArguments()
Resource string arguments used to fill in and create the error message.

Returns:
Object[]

setErrorCausedByException

public void setErrorCausedByException(java.lang.Throwable pErrorCausedByException)
The Exception that caused the error state, if an Exception did so. Note that this Exception may have been thrown on an agent rather than locally on the server.

Parameters:
pErrorCausedByException - new value to set

getErrorCausedByException

public java.lang.Throwable getErrorCausedByException()
The Exception that caused the error state, if an Exception did so. Note that this Exception may have been thrown on an agent rather than locally on the server.

Returns:
Exception

setUseAgentErrorMsgResourceKey

public void setUseAgentErrorMsgResourceKey(boolean pUseAgentErrorMsgResourceKey)
Set this to true during an agent exception and the CA server will use the agent error message resource key and resource arguments when reporting the deployment error.

Parameters:
pUseAgentErrorMsgResourceKey -

getUseAgentErrorMsgResourceKey

public boolean getUseAgentErrorMsgResourceKey()
Set this to true during an agent exception and the CA server will use the agent error message resource key and resource arguments when reporting the deployment error.

Returns:

setAffectedItemTypes

public void setAffectedItemTypes(java.util.Map pAffectedItemTypes)
A Map with a key of affected repository path to a Set value of affected item types


getAffectedItemTypes

public java.util.Map getAffectedItemTypes()
A Map with a key of affected repository path to a Set value of affected item types


addAffectedItemType

public void addAffectedItemType(java.lang.String pRepository,
                                java.lang.String pItemType)

removeAffectedItemTypes

public void removeAffectedItemTypes(java.lang.String pRepository)

setDeploymentID

public void setDeploymentID(java.lang.String pDeploymentID)
Current deployment identifier.

Parameters:
pDeploymentID - new value to set

getDeploymentID

public java.lang.String getDeploymentID()
Current deployment identifier.

Returns:
String

setDeploymentBeginTimestamp

public void setDeploymentBeginTimestamp(long pDeploymentBeginTimestamp)
System milliseconds when the deployment was first started.

Parameters:
pDeploymentBeginTimestamp - new value to set

getDeploymentBeginTimestamp

public long getDeploymentBeginTimestamp()
System milliseconds when the deployment was first started.

Returns:
long

getDeploymentBeginTimestampAsDate

public java.util.Date getDeploymentBeginTimestampAsDate()
Date when the deployment was first started. Returns null if the deployment has not been started yet (or if the timstamp has been set to zero or less).

Returns:
long

setDeploymentLastBeginTimestamp

public void setDeploymentLastBeginTimestamp(long pDeploymentLastBeginTimestamp)
System milliseconds when the deployment was last started.

Parameters:
pDeploymentLastBeginTimestamp - new value to set

getDeploymentLastBeginTimestamp

public long getDeploymentLastBeginTimestamp()
System milliseconds when the deployment was last started.

Returns:
long

getDeploymentLastBeginTimestampAsDate

public java.util.Date getDeploymentLastBeginTimestampAsDate()
Date when the deployment was last started. Returns null if the deployment has not been started yet (or if the timstamp has been set to zero or less).

Returns:
long

setDeploymentLastExecutionTime

public void setDeploymentLastExecutionTime(long pDeploymentLastExecutionTime)
The time in milliseconds the deployment has spent running since it was last started. Note that deployment stop automatically on errors.

Parameters:
pDeploymentLastExecutionTime - new value to set

getDeploymentLastExecutionTime

public long getDeploymentLastExecutionTime()
The time in milliseconds the deployment has spent running since it was last started. Note that deployment stop automatically on errors.

Returns:
long

setDeploymentTotalExecutionTime

public void setDeploymentTotalExecutionTime(long pDeploymentTotalExecutionTime)
The time in milliseconds the deployment has spent running. Note that deployment stop automatically on errors.

Parameters:
pDeploymentTotalExecutionTime - new value to set

getDeploymentTotalExecutionTime

public long getDeploymentTotalExecutionTime()
The time in milliseconds the deployment has spent running. Note that deployment stop automatically on errors.

Returns:
long

setDeploymentType

public void setDeploymentType(int pDeploymentType)
The deployment type, either Constants.TYPE_INCREMENTAL or Constants.TYPE_FULL.

Parameters:
pDeploymentType - new value to set

getDeploymentType

public int getDeploymentType()
The deployment type, either Constants.TYPE_INCREMENTAL or Constants.TYPE_FULL.

Returns:
int

setDeploymentMode

public void setDeploymentMode(int pDeploymentMode)
The deployment mode, either Constants.MODE_ONLINE or Constants.MODE_SWITCH.

Parameters:
pDeploymentMode - new value to set

getDeploymentMode

public int getDeploymentMode()
The deployment mode, either Constants.MODE_ONLINE or Constants.MODE_SWITCH.

Returns:
int

setDeploymentRevert

public void setDeploymentRevert(boolean pDeploymentRevert)
Sets property deploymentRevert.
Whether or not this is a special deployment reverting an open Project off of the Target.

Parameters:
pDeploymentRevert - new value to set

isDeploymentRevert

public boolean isDeploymentRevert()
Returns property deploymentRevert.
Whether or not this is a special deployment reverting an open Project off of the Target.

Returns:
boolean

setDeploymentServer

public void setDeploymentServer(java.lang.String pDeploymentServer)
Name of the deployment server performing the current deployment.

Parameters:
pDeploymentServer - new value to set

getDeploymentServer

public java.lang.String getDeploymentServer()
Name of the deployment server performing the current deployment.

Returns:
String

setDeploymentCreateInitiator

public void setDeploymentCreateInitiator(java.lang.String pDeploymentCreateInitiator)
A generic identifier denoting who or what created/started the deployment.

Parameters:
pDeploymentCreateInitiator - new value to set

getDeploymentCreateInitiator

public java.lang.String getDeploymentCreateInitiator()
A generic identifier denoting who or what created/started the deployment.

Returns:
String

setDeploymentStopInitiator

public void setDeploymentStopInitiator(java.lang.String pDeploymentStopInitiator)
A generic identifier denoting who or what stopped/interrupted the deployment.

Parameters:
pDeploymentStopInitiator - new value to set

getDeploymentStopInitiator

public java.lang.String getDeploymentStopInitiator()
A generic identifier denoting who or what stopped/interrupted the deployment.

Returns:
String

setDeploymentDeleteInitiator

public void setDeploymentDeleteInitiator(java.lang.String pDeploymentDeleteInitiator)
A generic identifier denoting who or what deleted the deployment.

Parameters:
pDeploymentDeleteInitiator - new value to set

getDeploymentDeleteInitiator

public java.lang.String getDeploymentDeleteInitiator()
A generic identifier denoting who or what deleted the deployment.

Returns:
String

setDeploymentLiveDataStore

public void setDeploymentLiveDataStore(java.lang.String pDeploymentLiveDataStore)
The live data store at the beginning of this deployment if the agent is configured for switch deployments.

Parameters:
pDeploymentLiveDataStore - new value to set

getDeploymentLiveDataStore

public java.lang.String getDeploymentLiveDataStore()
The live data store at the beginning of this deployment if the agent is configured for switch deployments.

Returns:
String

setDeploymentCurrentDataStore

public void setDeploymentCurrentDataStore(java.lang.String pDeploymentCurrentDataStore)
The current data store if the agent is configured for switch deployments.

Parameters:
pDeploymentCurrentDataStore - new value to set

getDeploymentCurrentDataStore

public java.lang.String getDeploymentCurrentDataStore()
The current data store if the agent is configured for switch deployments.

Returns:
String

setDeploymentAgentInactiveDataStore

public void setDeploymentAgentInactiveDataStore(java.lang.String pInactiveDataStore)
The name of the inative datastore if the agent is configured for switch deployments. This property is updated during a switch deployment.

Parameters:
pInactiveDataStore - The name of the inactive datastore

getDeploymentAgentInactiveDataStore

public java.lang.String getDeploymentAgentInactiveDataStore()
The name of the inative datastore if the agent is configured for switch deployments. This property is updated during a switch deployment.

Returns:
The name of the inactive datastore

setDeploymentManifestID

public void setDeploymentManifestID(java.lang.String pDeploymentManifestID)
The Manifest ID of the manifest currently being deployed.

Parameters:
pDeploymentManifestID - new value to set

getDeploymentManifestID

public java.lang.String getDeploymentManifestID()
The Manifest ID of the manifest currently being deployed.

Returns:
String

setDeploymentCommitted

public void setDeploymentCommitted(boolean pDeploymentCommitted)
Whether or not this deployment has proceeded past the committed point of no return. Resume and rollback may still be possible, but this flag denotes the point at which a stop will render the deployed snapshot indeterminate.

Parameters:
pDeploymentCommitted - new value to set

isDeploymentCommitted

public boolean isDeploymentCommitted()
Whether or not this deployment has proceeded past the committed point of no return. Resume and rollback may still be possible, but this flag denotes the point at which a stop will render the deployed snapshot indeterminate.

Returns:
boolean

setDeploymentSwitched

public void setDeploymentSwitched(boolean pDeploymentSwitched)
Whether or not this deployment has switched yet, if it is a switch deployment.

Parameters:
pDeploymentSwitched - new value to set

isDeploymentSwitched

public boolean isDeploymentSwitched()
Whether or not this deployment has switched yet, if it is a switch deployment.

Returns:
boolean

setDeploymentTargetSwitched

public void setDeploymentTargetSwitched(boolean pDeploymentTargetSwitched)
Whether or not the target deployment datasources have been switched yet, if this is a switch configured deployment.


isDeploymentTargetSwitched

public boolean isDeploymentTargetSwitched()
Whether or not the target deployment datasources have been switched yet, if this is a switch configured deployment.


setDeploymentRollback

public void setDeploymentRollback(boolean pDeploymentRollback)
Whether or not the deployment has been flagged for rollback.

Parameters:
pDeploymentRollback - new value to set

isDeploymentRollback

public boolean isDeploymentRollback()
Whether or not the deployment has been flagged for rollback.

Returns:
boolean

setDeploymentRollbackInitiator

public void setDeploymentRollbackInitiator(java.lang.String pDeploymentRollbackInitiator)
A generic identifier for who or what called rollback on the deployment.

Parameters:
pDeploymentRollbackInitiator - new value to set

getDeploymentRollbackInitiator

public java.lang.String getDeploymentRollbackInitiator()
A generic identifier for who or what called rollback on the deployment.

Returns:
String

setDeploymentRollbackManifestID

public void setDeploymentRollbackManifestID(java.lang.String pDeploymentRollbackManifestID)
The Manifest ID of the rollback manifest for this deployment. (if applicable)

Parameters:
pDeploymentRollbackManifestID - new value to set

getDeploymentRollbackManifestID

public java.lang.String getDeploymentRollbackManifestID()
The Manifest ID of the rollback manifest for this deployment. (if applicable)

Returns:
String

setDeploymentFirstPass

public void setDeploymentFirstPass(boolean pDeploymentFirstPass)
Identifier indicating whether the currently running deployment is on its first or second pass in a switch configured deployment.


isDeploymentFirstPass

public boolean isDeploymentFirstPass()
Identifier indicating whether the currently running deployment is on its first or second pass in a switch configured deployment.


getDeploymentAgentLocalPort

public int getDeploymentAgentLocalPort()
The local port used in the FileDeploymentServer for DAF file deployments.

Returns:
Returns the agent's FileDeploymentServer local port

setDeploymentAgentLocalPort

public void setDeploymentAgentLocalPort(int pDeploymentAgentLocalPort)
The local port used in the FileDeploymentServer for DAF file deployments.

Parameters:
deploymentAgentLocalPort - The agent's FileDeploymentServer local port

addDeploymentAgentSwitchableVFS

public void addDeploymentAgentSwitchableVFS(java.lang.String pSwitchableVFS)
Add a switchable VFS to the list of switchable VFSs configured for this agent.

Parameters:
pSwitchableVFS - A switchable VFS

getDeploymentAgentSwitchableVFS

public java.util.Collection getDeploymentAgentSwitchableVFS()
Returns a Collection of VFSs configured for switch deployments on this agent.

Returns:
Collection of switchable VFSs

getDeploymentStrictFileOps

public int getDeploymentStrictFileOps()

setDeploymentStrictFileOps

public void setDeploymentStrictFileOps(int pDeploymentStrictFileOps)

getDeploymentStrictRepoOps

public int getDeploymentStrictRepoOps()

setDeploymentStrictRepoOps

public void setDeploymentStrictRepoOps(int pDeploymentStrictRepoOps)

getLastCompletedStage

public int getLastCompletedStage()

setLastCompletedStage

public void setLastCompletedStage(int pLastCompletedStage)

getTargetSnapshotID

public java.lang.String getTargetSnapshotID()

setTargetSnapshotID

public void setTargetSnapshotID(java.lang.String pTargetSnapshotID)

getDeploymentSnapshot

public java.lang.String getDeploymentSnapshot()
The snapshot being deployed to the target or agent.

Returns:
String

getDeploymentProjectIDs

public java.lang.String[] getDeploymentProjectIDs()
The project IDs being deployed to the target or agent.

Returns:
String[]

getDeployedSnapshot

public java.lang.String getDeployedSnapshot()
The current deployed snapshot of the target or agent.

Returns:
String

getDeployedSnapshotTimestamp

public long getDeployedSnapshotTimestamp()
System milliseconds when the deployed snapshot was last set by a deployment.

Returns:
long

isStateError

public boolean isStateError()
Returns true if the state code is an error code.


isStateActive

public boolean isStateActive()
Returns true if the state denotes the beginning of a phase of deployment, including the beginning of a stop or the beginning of a deployment lock.


isStateDone

public boolean isStateDone()
Returns true if the state denotes the ending of a phase of deployment, including the ending of a stop and an over-all deployment completion.


isStateInterruptable

public boolean isStateInterruptable()
Returns true if the state is interruptable by a deployment event.

A deployment can only be interrupted if the deployment is in certain states, e.g. a deployment that is in an error state cannot be interrupted by an event.


toString

public java.lang.String toString()
Returns this Status as a String. The string form contains (almost) every property in the Status. If a small string representation of the status is desired, try getStateString() instead. This form is not small.

Overrides:
toString in class java.lang.Object

stateToString

public static java.lang.String stateToString(int pStateCode)
Returns a string form of the state code.


stateToString

public static java.lang.String stateToString(int pStateCode,
                                             java.util.Locale pLocale)
Returns a string form of the state code for the given locale.


main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Debugging and testing main() call. Prints out status objects found in the specified directory and optionally filtering for only status objects for a given target name. usage: [target name]

Throws:
java.lang.Exception

clone

protected java.lang.Object clone()
                          throws java.lang.CloneNotSupportedException
Override Object.clone() so that copies may be made.

Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException