atg.deployment.common.event
Class DeploymentEvent

java.lang.Object
  extended by atg.deployment.common.event.DeploymentEvent
All Implemented Interfaces:
atg.deployment.common.Constants, atg.deployment.DeploymentConstants

public class DeploymentEvent
extends java.lang.Object
implements atg.deployment.common.Constants

A deployment event denoting the change in state of a deployment or a deployment agent.

Deployment events are generic in structure and are keyed off of a set of state codes defined as constants in the event. Each time a deployment or deployment agent changes state, a deployment event is fired with relevant information.

DeploymentEvents also provide the ability to interrupt the deployment process. If a DeploymentEventListener receives a deployment event and needs to halt the deployment process, the listener can call interrupt() on the deployment event. Interrupted deployments are treated the same as if an error occurred during the deployment process.

See Also:
DeploymentEventSender, DeploymentEventListener

Field Summary
static int ACTIVE_ACTIVATE
           
static int ACTIVE_APPLY
          begin applying the deployment data to target databases
static int ACTIVE_APPLY_COMMITTED
          Deployment system has committed the first batch of asset operations.
static int ACTIVE_CREATE
          -- Create Phase States -- Assets which need to get deployed are calculated and data structures required to be passed to deployment adapter are created.
static int ACTIVE_INSTALL
          -- Install Phase States -- These states are not used any more.
static int ACTIVE_LOAD
          -- Load Phase States -- These states are not used any more.
static int ACTIVE_LOCK
          -- Lock Phase States -- All the agents in a site must be locked for a deployment to proceed futher.
static int ACTIVE_PREPARE
          -- Prepare Phase States -- PREPARE phase can mean a variety of things depending on the type of deployment.
static int ACTIVE_STOP
           
static int BEGIN_APPLY
           
static int BEGIN_APPLY_COMMITTED
           
static int BEGIN_CREATE
           
static int BEGIN_INSTALL
           
static int BEGIN_LOAD
           
static int BEGIN_LOCK
           
static int BEGIN_PREPARE
           
static java.lang.String CLASS_VERSION
          Class version string
static int DEPLOYMENT_COMPLETE
          Deployment has finished successfully but has not been deleted yet.
static int DEPLOYMENT_DELETED
          A deployment has either been canceled or it has finished successfully and now has a been deleted so that next deployment in the queue can proceed.
static int DONE_ACTIVATE
           
static int DONE_APPLY
          This phase signals that application of data has finished successfully.
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
          Deployment is in an error state.
static int ERROR_ACTIVATE
           
static int ERROR_APPLY
          There was an error applying data.
static int ERROR_APPLY_COMMITTED
          An error has occurred during apply phase after some data was committed.
static int ERROR_CREATE
           
static int ERROR_INSTALL
           
static int ERROR_LOAD
           
static int ERROR_LOCK
           
static int ERROR_PREPARE
           
static int ERROR_STOP
           
static int EVENT_INTERRUPT
          A deployment event has caused the deployment to halt.
static int IDLE
           
 
Fields inherited from interface atg.deployment.common.Constants
ACCEPTED_FOR_TARGET, APPLY_TRANSACTION_SIZE, APPROVED_FOR_TARGET, DEPLOYED_TO_TARGET, DEPLOYMENT_PROTOCOL_VERSION, DEPLOYMENT_TYPE_BACK_DEPLOY, DEPLOYMENT_TYPE_DEPLOY_TO_INITIAL, DEPLOYMENT_TYPE_INIT_TARGET, DEPLOYMENT_TYPE_ONE_OFF_DEPLOY, DEPLOYMENT_TYPE_REVERT_DEPLOY, DEPLOYMENT_TYPE_STANDARD_DEPLOY, DPLY_CMD_ACTIVE_APPLY_COMMITTED, DPLY_CMD_AFFECTED_TYPES, DPLY_CMD_ASSET_DESTINATIONS, DPLY_CMD_CLUSTER_ID, DPLY_CMD_COMMAND, DPLY_CMD_DATASTORES_TO_SWITCH, DPLY_CMD_DEPLOYMENT_END_TIME, DPLY_CMD_DEPLOYMENT_ID, DPLY_CMD_DEPLOYMENT_START_TIME, DPLY_CMD_EXCLUDE_ASSET, DPLY_CMD_FIRST_APPLY, DPLY_CMD_FROM_SNAPSHOT, DPLY_CMD_INCLUDE_ASSET, DPLY_CMD_INSTALL_BYTES, DPLY_CMD_INSTALL_NUM_BYTES, DPLY_CMD_MODE, DPLY_CMD_ONEOFF, DPLY_CMD_PRINCIPAL, DPLY_CMD_PROJECTS, DPLY_CMD_PROTOCOL_VERSION, DPLY_CMD_RECOVERING, DPLY_CMD_REFRESH_REPOSITORIES, DPLY_CMD_RESUME, DPLY_CMD_ROLLBACK, DPLY_CMD_SCIEVENTS, DPLY_CMD_SERVER_NAME, DPLY_CMD_SET_AGENT_STATUS, DPLY_CMD_SWITCH_FIRST, DPLY_CMD_SWITCH_LIVE, DPLY_CMD_TO_SNAPSHOT, DPLY_CMD_TYPE, DPLY_CMD_USER_ID, DPLY_CMD_VERIFY_FILE_CHECKSUM, DPLY_CMD_VERIFY_FILE_COMPONENT_PATH, DPLY_CMD_VERIFY_FILE_LAST_MODIFIED, DPLY_CMD_VERIFY_FILE_PATH, DPLY_CMD_VERIFY_FILE_SIZE, DPLY_CMD_VFS_ORDER, HIDDEN_FROM_TARGET, INIT_BRANCH_LOCK_NAME, ONE_OFF, REMOTE_SWITCH_EXCEPTION, REMOTE_SWITCH_SUCCESS, RENOUNCED_FOR_TARGET, ROLLBACK_DEPLOYMENT_FAILURE, STRICT_OP_DEFAULT, STRICT_OP_OVERRIDE_FALSE, STRICT_OP_OVERRIDE_TRUE, TARGET_INITIAL_STATE_PROJECT_ID, TOPOLOGY_AGENT_PRINCIPAL_ALL, TOPOLOGY_AGENT_PRINCIPAL_NONE, TOPOLOGY_AGENT_PRINCIPAL_REPOSITORY, TOPOLOGY_AGENT_PRINCIPAL_VFS, TOPOLOGY_DEPLOY_TYPE_ONE_OFF, TOPOLOGY_DEPLOY_TYPE_WORKFLOW, TOPOLOGY_TRANSPORT_JNDI, TOPOLOGY_TRANSPORT_RMI, WORKFLOW
 
Fields inherited from interface atg.deployment.DeploymentConstants
DEPLOYABLE_ATTRIBUTE_NAME, DEPLOYMENT_SYSTEM_VERSION, JAR_ATTR_MAN_FILE, JAR_ATTR_MAN_ID, JAR_ATTR_VERSION, MODE_ONLINE, MODE_SWITCH, PM_DEP, REFERENCES_ATTRIBUTE_NAME, TYPE_FULL, TYPE_INCREMENTAL
 
Constructor Summary
DeploymentEvent(DeploymentEventSender pSender, ApplicationLogging pLog)
          Constructs an uninitialized event.
 
Method Summary
 java.util.Map getAffectedItemTypes()
           
 java.util.Set getAffectedRepositories()
           
 long getDeploymentBeginTimestamp()
          System milliseconds when the deployment was first started.
 java.lang.String getDeploymentCreateInitiator()
          A generic identifier denoting who or what created/started the deployment.
 java.lang.String getDeploymentDeleteInitiator()
          A generic identifier denoting who or what deleted the deployment.
 java.lang.String getDeploymentID()
          The ID of the current deployment, if there is a current deployment.
 long getDeploymentLastBeginTimestamp()
          System milliseconds when the deployment was last started.
 long getDeploymentLastExecutionTime()
          The time in milliseconds the deployment has spent running since it was last started.
 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 getDeploymentServer()
          Name of the deployment server performing the current deployment.
 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 state 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.lang.Boolean getFirstApply()
          Get property firstApply
 java.lang.String getInterruptCaller()
          Who is interrupting this event, if it is interrupted.
 java.lang.String getInterruptReason()
          Why this event is being interrupted, if it is being interrupted.
 int getNewState()
          The new state that caused this event to fire.
 long getNewStateTimestamp()
          System milliseconds when the new state was set.
 int getOldState()
          The old state before this event was fired.
 java.lang.String getTarget()
          The logical target associated with the event, either a deployment target or an individual target agent.
 boolean interrupt(java.lang.String pCaller, java.lang.String pReason)
          Deployment events get sent on every state change during deployment.
 boolean isDeploymentRevert()
          Returns property deploymentRevert.
 boolean isDeploymentRollback()
          Whether or not the deployment has been flagged for rollback.
 boolean isDeploymentScheduled()
          Whether or not this deployment was kicked off automatically from a schedule.
 boolean isInterruptable()
          Whether or not the new state causing this event can be interrupted.
 boolean isInterrupted()
          Whether or not this event has been interrupted.
 boolean isSwitchFirstApply()
          Whether or not the first apply of a switch deployment.
 void prepareForFiring()
          Prepares the event for firing.
 void setAffectedItemTypes(java.util.Map pAffectedItemTypes)
           
 void setAffectedRepositories(java.util.Set pAffectedRepositories)
           
 void setDeploymentBeginTimestamp(long pDeploymentBeginTimestamp)
          System milliseconds when the deployment was first started.
 void setDeploymentCreateInitiator(java.lang.String pDeploymentCreateInitiator)
          A generic identifier denoting who or what created/started the deployment.
 void setDeploymentDeleteInitiator(java.lang.String pDeploymentDeleteInitiator)
          A generic identifier denoting who or what deleted the deployment.
 void setDeploymentID(java.lang.String pDeploymentID)
          The ID of the current deployment, if there is a current deployment.
 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 setDeploymentMode(int pDeploymentMode)
          The deployment mode, either Constants.MODE_ONLINE or Constants.MODE_SWITCH.
 void setDeploymentProjectIDs(java.lang.String[] pDeploymentProjectIDs)
          The project IDs being deployed to the target or agent.
 void setDeploymentRevert(boolean pDeploymentRevert)
          Sets property deploymentRevert.
 void setDeploymentRollback(boolean pDeploymentRollback)
          Whether or not the deployment has been flagged for rollback.
 void setDeploymentScheduled(boolean pDeploymentScheduled)
          Whether or not this deployment was kicked off automatically from a schedule.
 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 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[] pErrorMsgResourceArguments)
          Resource string arguments used to fill in and create the error message.
 void setErrorMsgResourceKey(java.lang.String pErrorMsgResourceKey)
          The resource look-up key for the error message.
 void setFirstApply(java.lang.Boolean pFirstApply)
          Whether or not the first apply of a switch deployment.
 void setInterruptable(boolean pInterruptable)
          Whether or not the new state causing this event can be interrupted.
 void setInterruptCaller(java.lang.String pInterruptCaller)
          Who is interrupting this event, if it is interrupted.
 void setInterrupted(boolean pInterrupted)
          Whether or not this event has been interrupted.
 void setInterruptReason(java.lang.String pInterruptReason)
          Why this event is being interrupted, if it is being interrupted.
 void setNewState(int pNewState)
          The new state that caused this event to fire.
 void setNewStateTimestamp(long pNewStateTimestamp)
          System milliseconds when the new state was set.
 void setOldState(int pOldState)
          The old state before this event was fired.
 void setTarget(java.lang.String pTarget)
          The logical target associated with the event, either a deployment target or an individual target agent.
static java.lang.String stateToString(int pStateCode)
          Returns a string form of the state code, useful for listeners who may want to turn the event into a customized, readable format.
static int stringToState(java.lang.String pStateString)
          Returns a int form of the state string, useful for listeners who may want to take a string input instead of an integer which can be easily misconfigured.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, 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
Deployment has finished successfully but has not been deleted yet.

See Also:
Constant Field Values

DEPLOYMENT_DELETED

public static final int DEPLOYMENT_DELETED
A deployment has either been canceled or it has finished successfully and now has a been deleted so that next deployment in the queue can proceed.

See Also:
Constant Field Values

EVENT_INTERRUPT

public static final int EVENT_INTERRUPT
A deployment event has caused the deployment to halt.

See Also:
Constant Field Values

ERROR

public static final int ERROR
Deployment is in an error state.

See Also:
Constant Field Values

ACTIVE_LOCK

public static final int ACTIVE_LOCK
-- Lock Phase States -- All the agents in a site must be locked for a deployment to proceed futher. This phase makes sure we have locked all agents. (Non responsible agents can be allowed to be absent at this time if property DeploymentServer.allowMissingNonEssentialAgents is set to true at this time.

See Also:
Constant Field Values

BEGIN_LOCK

public static final int BEGIN_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
-- Prepare Phase States -- PREPARE phase can mean a variety of things depending on the type of deployment.
  • Initial Deployment: Site has an initial versioning snapshot created for it, which will act as its initial set of data forming the basis of coming incremental deployment.
  • Full Deployment: A full deployment is done based on a snapshot. Each projects deployed to a target has a snapshot associated with it. This snapshot is used as a basis of a full deployment. A snapshots indicates a set of data frozen in time. if a snashot was created at noon yesterday, it represents the data as it existed at noon yesterday. ignoring any changes that may have been done between noon of yesterday and now.
  • Incremental Deployment: Incremental deployments are based off of differences between two snapshots. One of them (the from snapshot ) is the always the last deployed snapshot. In most general terms PREPARE phase makes sure that all versioning development lines need for a deployment have been created. Most application will not need to do anything in PREPARE phase.

    See Also:
    Constant Field Values

  • BEGIN_PREPARE

    public static final int BEGIN_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
    -- Create Phase States -- Assets which need to get deployed are calculated and data structures required to be passed to deployment adapter are created.

    See Also:
    Constant Field Values

    BEGIN_CREATE

    public static final int BEGIN_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
    -- Install Phase States -- These states are not used any more. They are here for backward compatibility.

    See Also:
    Constant Field Values

    BEGIN_INSTALL

    public static final int BEGIN_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
    -- Load Phase States -- These states are not used any more. They are here for backward compatibility.

    See Also:
    Constant Field Values

    BEGIN_LOAD

    public static final int BEGIN_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

    ACTIVE_APPLY

    public static final int ACTIVE_APPLY
    begin applying the deployment data to target databases

    See Also:
    Constant Field Values

    BEGIN_APPLY

    public static final int BEGIN_APPLY
    See Also:
    Constant Field Values

    ACTIVE_APPLY_COMMITTED

    public static final int ACTIVE_APPLY_COMMITTED
    Deployment system has committed the first batch of asset operations. If DeploymentServer.autoRollbackDeploymentOnFailure is set to false, a rollback or a resume of this deployment is required if snapshot is to be preserved on the target. Once a snapshot is lost there is not other option but to do a full deployment.

    See Also:
    Constant Field Values

    BEGIN_APPLY_COMMITTED

    public static final int BEGIN_APPLY_COMMITTED
    See Also:
    Constant Field Values

    DONE_APPLY

    public static final int DONE_APPLY
    This phase signals that application of data has finished successfully.

    See Also:
    Constant Field Values

    ERROR_APPLY

    public static final int ERROR_APPLY
    There was an error applying data.

    See Also:
    Constant Field Values

    ERROR_APPLY_COMMITTED

    public static final int ERROR_APPLY_COMMITTED
    An error has occurred during apply phase after some data was committed.

    See Also:
    Constant Field Values

    ACTIVE_ACTIVATE

    public static final int ACTIVE_ACTIVATE
    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
    Constructor Detail

    DeploymentEvent

    public DeploymentEvent(DeploymentEventSender pSender,
                           ApplicationLogging pLog)
    Constructs an uninitialized event. A logging interface must be included when the event is created however.

    Method Detail

    setOldState

    public void setOldState(int pOldState)
    The old state before this event was fired.


    getOldState

    public int getOldState()
    The old state before this event was fired.

    Returns:
    int

    setNewState

    public void setNewState(int pNewState)
    The new state that caused this event to fire.


    getNewState

    public int getNewState()
    The new state that caused this event to fire.

    Returns:
    int

    setNewStateTimestamp

    public void setNewStateTimestamp(long pNewStateTimestamp)
    System milliseconds when the new state was set.


    getNewStateTimestamp

    public long getNewStateTimestamp()
    System milliseconds when the new state was set.

    Returns:
    long

    getErrorMessage

    public java.lang.String getErrorMessage()
    A textual description of what caused the error status, if the state 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.


    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.


    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.


    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

    setFirstApply

    public void setFirstApply(java.lang.Boolean pFirstApply)
    Whether or not the first apply of a switch deployment.

    Parameters:
    pFirstApply - Whether or not the first apply of a switch deployment.

    getFirstApply

    public java.lang.Boolean getFirstApply()
    Get property firstApply

    Returns:
    property firstApply

    isSwitchFirstApply

    public boolean isSwitchFirstApply()
    Whether or not the first apply of a switch deployment.

    Returns:
    property firstApply

    setInterruptable

    public void setInterruptable(boolean pInterruptable)
    Whether or not the new state causing this event can be interrupted.


    isInterruptable

    public boolean isInterruptable()
    Whether or not the new state causing this event can be interrupted.

    Returns:
    boolean

    setInterrupted

    public void setInterrupted(boolean pInterrupted)
    Whether or not this event has been interrupted.


    isInterrupted

    public boolean isInterrupted()
    Whether or not this event has been interrupted.

    Returns:
    boolean

    setInterruptCaller

    public void setInterruptCaller(java.lang.String pInterruptCaller)
    Who is interrupting this event, if it is interrupted.


    getInterruptCaller

    public java.lang.String getInterruptCaller()
    Who is interrupting this event, if it is interrupted.

    Returns:
    String

    setInterruptReason

    public void setInterruptReason(java.lang.String pInterruptReason)
    Why this event is being interrupted, if it is being interrupted.


    getInterruptReason

    public java.lang.String getInterruptReason()
    Why this event is being interrupted, if it is being interrupted.

    Returns:
    String

    setTarget

    public void setTarget(java.lang.String pTarget)
    The logical target associated with the event, either a deployment target or an individual target agent.


    getTarget

    public java.lang.String getTarget()
    The logical target associated with the event, either a deployment target or an individual target agent.

    Returns:
    String

    setDeploymentID

    public void setDeploymentID(java.lang.String pDeploymentID)
    The ID of the current deployment, if there is a current deployment.


    getDeploymentID

    public java.lang.String getDeploymentID()
    The ID of the current deployment, if there is a current deployment.

    Returns:
    String

    setDeploymentBeginTimestamp

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


    getDeploymentBeginTimestamp

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


    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

    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

    setDeploymentProjectIDs

    public void setDeploymentProjectIDs(java.lang.String[] pDeploymentProjectIDs)
    The project IDs being deployed to the target or agent. All events fired by the deployment server will have this value. Only events fired by the deployment agent after the prepare phase will have this value.


    getDeploymentProjectIDs

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

    Returns:
    String[]

    setDeploymentType

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


    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.


    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.


    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

    setDeploymentRollback

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


    isDeploymentRollback

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

    Returns:
    boolean

    setDeploymentServer

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


    getDeploymentServer

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

    Returns:
    String

    setDeploymentScheduled

    public void setDeploymentScheduled(boolean pDeploymentScheduled)
    Whether or not this deployment was kicked off automatically from a schedule.


    isDeploymentScheduled

    public boolean isDeploymentScheduled()
    Whether or not this deployment was kicked off automatically from a schedule.

    Returns:
    boolean

    setDeploymentCreateInitiator

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


    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.


    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.


    getDeploymentDeleteInitiator

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

    Returns:
    String

    getDeploymentStrictFileOps

    public int getDeploymentStrictFileOps()

    setDeploymentStrictFileOps

    public void setDeploymentStrictFileOps(int pDeploymentStrictFileOps)

    getDeploymentStrictRepoOps

    public int getDeploymentStrictRepoOps()

    setDeploymentStrictRepoOps

    public void setDeploymentStrictRepoOps(int pDeploymentStrictRepoOps)

    getAffectedItemTypes

    public java.util.Map getAffectedItemTypes()

    setAffectedItemTypes

    public void setAffectedItemTypes(java.util.Map pAffectedItemTypes)

    setAffectedRepositories

    public void setAffectedRepositories(java.util.Set pAffectedRepositories)

    getAffectedRepositories

    public java.util.Set getAffectedRepositories()

    toString

    public java.lang.String toString()
    Overrides:
    toString in class java.lang.Object

    prepareForFiring

    public void prepareForFiring()
    Prepares the event for firing.

    Fired events are shared amongst event listeners and are therefore made immutable so that listeners cannot change the information the events hold.


    interrupt

    public boolean interrupt(java.lang.String pCaller,
                             java.lang.String pReason)
    Deployment events get sent on every state change during deployment. If a DeploymentEventListener needs to stop the deployment for any reason, interrupt() should be called on the event. This interrupt will stop the deployment.

    However, the deployment cannot be interrupted if either the deployment has advanced past the point of interruption or is entering an uninterruptable state, such as an error state. The property 'isInterruptable' can be checked to see if the current event can interrupt the deployment. Calling interrupt() when isInterruptable() returns false will result in no interrupt and the interrupt() method returning false.

    Parameters:
    pCaller - an identifier for who is interrupting the deployment
    pReason - a description of why the deployment is being interrupted
    Returns:
    true if the deployment will be interrupted
    false if the deployment cannot be interrupted

    stateToString

    public static java.lang.String stateToString(int pStateCode)
    Returns a string form of the state code, useful for listeners who may want to turn the event into a customized, readable format.

    Parameters:
    pStateCode - one of the constant state codes in DeploymentEvent
    Returns:
    String form of constant state code name

    stringToState

    public static int stringToState(java.lang.String pStateString)
    Returns a int form of the state string, useful for listeners who may want to take a string input instead of an integer which can be easily misconfigured.

    Parameters:
    pStateString - one of the constant state codes in DeploymentEvent
    Returns:
    String form of constant state code name