Java EE 5 SDK

com.sun.appserv.management.deploy
Class DeploymentStatusImpl

java.lang.Object
  extended by com.sun.appserv.management.base.MapCapableBase
      extended by com.sun.appserv.management.base.OperationStatusBase
          extended by com.sun.appserv.management.deploy.DeploymentStatusImpl
All Implemented Interfaces:
MapCapable, OperationStatus, DeploymentStatus

public final class DeploymentStatusImpl
extends OperationStatusBase
implements DeploymentStatus

Not for public use. Use DeploymentSupport to create a DeploymentStatus from a Map.


Field Summary
 
Fields inherited from interface com.sun.appserv.management.deploy.DeploymentStatus
ADDITIONAL_STATUS_KEY, DEPLOYMENT_STATUS_CLASS_NAME, MODULE_ID_KEY, PARENT_KEY, STAGE_DESCRIPTION_KEY, STAGE_STATUS_KEY, STAGE_STATUS_MESSAGE_KEY, STAGE_THROWABLE_KEY, STATUS_CODE_NOT_INITIALIZED, SUB_STAGES_KEY
 
Fields inherited from interface com.sun.appserv.management.base.OperationStatus
STATUS_CODE_FAILURE, STATUS_CODE_KEY, STATUS_CODE_SUCCESS, STATUS_CODE_WARNING, THROWABLE_KEY
 
Fields inherited from interface com.sun.appserv.management.base.MapCapable
MAP_CAPABLE_CLASS_NAME_KEY
 
Constructor Summary
DeploymentStatusImpl(DeploymentStatus src)
           
DeploymentStatusImpl(int stageStatus, String stageStatusMessage, String stageDescription, Map<String,T> optional)
          Create a new instance.
DeploymentStatusImpl(Map<String,T> m)
          Create a new instance.
 
Method Summary
 void addSubStage(DeploymentStatus status)
           
protected  Serializable asMapHook(String key, Serializable value)
           
 boolean equals(Object rhs)
           
 Map<String,Serializable> getAdditionalStatus()
           
 DeploymentStatus getParent()
           
 String getStageDescription()
           
 int getStageStatus()
          Legal status codes include: OperationStatus#STATUS_CODE_SUCCESS OperationStatus#STATUS_CODE_FAILURE OperationStatus#STATUS_CODE_WARNING #STATUS_CODE_NOT_INITIALIZED
 String getStageStatusMessage()
           
 Throwable getStageThrowable()
           
 Iterator<Map<String,Serializable>> getSubStages()
          Get the sub stages for this deployment status, each of which has been converted into a Map.
 List<DeploymentStatus> getSubStagesList()
          Get the sub stages for this deployment status.
 void setAdditionalStatus(Map<String,Serializable> additionalStatus)
           
 void setParent(DeploymentStatus parent)
          set the parent status for this status if any
 void setStageDescription(String description)
           
 void setStageStatus(int status)
           
 void setStageStatusMessage(String message)
           
 void setStageThrowable(Throwable t)
           
protected  boolean validate()
          Return true if internal state is valid, false otherwise.
 
Methods inherited from class com.sun.appserv.management.base.OperationStatusBase
getStatusCode, getThrowable, setStatusCode, setThrowable
 
Methods inherited from class com.sun.appserv.management.base.MapCapableBase
asMap, checkInJavaUtil, checkLegalObject, checkLegalObject, checkValidType, getboolean, getBoolean, getByte, getField, getFile, getInteger, getMap, getMapClassName, getObject, getString, getStringArray, hashCode, illegalObject, makeImmutable, putAll, putField, putFieldHook, toString, validateNullOrOfType, validateThrow
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.appserv.management.base.OperationStatus
getStatusCode, getThrowable
 
Methods inherited from interface com.sun.appserv.management.base.MapCapable
asMap, getMapClassName
 

Constructor Detail

DeploymentStatusImpl

public DeploymentStatusImpl(DeploymentStatus src)

DeploymentStatusImpl

public DeploymentStatusImpl(Map<String,T> m)
Create a new instance. The Map must contain the following keyed values: The map may contain values keyed by any of the following:

Parameters:
m - a Map representing a DeploymentStatus

DeploymentStatusImpl

public DeploymentStatusImpl(int stageStatus,
                            String stageStatusMessage,
                            String stageDescription,
                            Map<String,T> optional)
Create a new instance. The 'optional' Map may contain any of the value keys as found in this( Map m ). Values supplied in the Map, if conflicting with other parameters, are overwritten in the resulting new DeploymentStatusImpl.

Parameters:
stageStatus -
stageStatusMessage -
stageDescription -
Method Detail

asMapHook

protected Serializable asMapHook(String key,
                                 Serializable value)
Overrides:
asMapHook in class MapCapableBase

validate

protected boolean validate()
Description copied from class: MapCapableBase
Return true if internal state is valid, false otherwise.

Overrides:
validate in class OperationStatusBase

getStageDescription

public String getStageDescription()
Specified by:
getStageDescription in interface DeploymentStatus
Returns:
a meaningful i18ned stage description

setStageDescription

public void setStageDescription(String description)

getStageStatusMessage

public String getStageStatusMessage()
Specified by:
getStageStatusMessage in interface DeploymentStatus
Returns:
a meaningful i18ned reason for failure or warning

setStageStatusMessage

public void setStageStatusMessage(String message)

getStageStatus

public int getStageStatus()
Description copied from interface: DeploymentStatus
Legal status codes include:

Specified by:
getStageStatus in interface DeploymentStatus
Returns:
the status for this stage (ignoring sub stages status)

setStageStatus

public void setStageStatus(int status)

addSubStage

public void addSubStage(DeploymentStatus status)

getSubStages

public Iterator<Map<String,Serializable>> getSubStages()
Description copied from interface: DeploymentStatus
Get the sub stages for this deployment status, each of which has been converted into a Map. This method is included for backward compatibility; please use DeploymentStatus.getSubStagesList() instead.

Specified by:
getSubStages in interface DeploymentStatus
Returns:
an Iterator for the sub stages

getSubStagesList

public List<DeploymentStatus> getSubStagesList()
Description copied from interface: DeploymentStatus
Get the sub stages for this deployment status. The list may not be modified.

Specified by:
getSubStagesList in interface DeploymentStatus
Returns:
List<DeploymentStatus>

getParent

public DeploymentStatus getParent()
Specified by:
getParent in interface DeploymentStatus
Returns:
the parent status for this status if any

setParent

public void setParent(DeploymentStatus parent)
Description copied from interface: DeploymentStatus
set the parent status for this status if any

Specified by:
setParent in interface DeploymentStatus
Parameters:
parent - DeploymentStatus

getStageThrowable

public Throwable getStageThrowable()
Specified by:
getStageThrowable in interface DeploymentStatus
Returns:
the exception if an exception was thrown during the execution of the stage

setStageThrowable

public void setStageThrowable(Throwable t)

getAdditionalStatus

public Map<String,Serializable> getAdditionalStatus()
Specified by:
getAdditionalStatus in interface DeploymentStatus
Returns:
the map storing additional properties for this status

setAdditionalStatus

public void setAdditionalStatus(Map<String,Serializable> additionalStatus)

equals

public boolean equals(Object rhs)
Overrides:
equals in class MapCapableBase

Java EE 5 SDK

Submit a bug or feature

Copyright 2006 Sun Microsystems, Inc. All rights reserved.