|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.svc.agent.environment.EnvironmentChangeState
public class EnvironmentChangeState
This object contains state information related to a change in the agent's environment.
It provides the following:
Access to all the EnvironmentChangeDetails that detail the changes made to the environment.
API for adding new EnvironemtChangeDetails.
Access to the input parameters for the environment change.
Access to the disposition options used to process the active ticket before a change is applied.
There's also an api for storing and retrieving random objects related to the environment change.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected java.util.List |
mAllWarnings
|
protected java.lang.String |
mApplicationName
|
protected java.lang.Throwable |
mApplyException
|
protected java.lang.String |
mChangeFormHandlerPath
|
protected java.util.Map |
mEnvironmentChangeDetails
|
protected java.lang.String |
mEnvironmentChangeKey
|
protected java.util.Map |
mInputParameters
|
protected boolean |
mProcessActiveTicketDisposition
|
protected java.util.Map |
mStateData
|
protected TicketDispositionOptions |
mTicketDispositionOptions
|
Constructor Summary | |
---|---|
EnvironmentChangeState()
|
|
EnvironmentChangeState(java.lang.String pEnvironmentChangeKey)
|
Method Summary | |
---|---|
void |
addChangeDetail(EnvironmentChangeDetail pEnvironmentChangeDetail)
Adds a new EnvironmentChangeDetail . |
void |
addStateData(java.lang.Object pStateDataKey,
java.lang.Object pStateDataObject)
Adds the extra data object keyed by the given object |
void |
addWarning(java.lang.String pWarning)
Adds a new warning to the list of warnings in the state |
void |
addWarnings(java.util.List pWarnings)
Adds a list of warnings to the warnings in the state |
EnvironmentChangeDetail |
getActiveCustomerDetail()
returns the active customer EnvironmentChangeDetail, if there is one in the state. |
EnvironmentChangeDetail |
getActiveTicketDetail()
returns the active ticket EnvironmentChangeDetail, if there is one in the state. |
java.util.List |
getAllWarnings()
Returns the list of warnings in the state |
java.lang.String |
getApplicationName()
The application name that initiated the change |
java.lang.Throwable |
getApplyException()
Returns the exception that was thrown during the apply process |
java.lang.String |
getChangeFormHandlerPath()
Returns the nucleus path of the EnvironmentChangeFormHandler that initiated the environment change. |
EnvironmentChangeDetail |
getEnvironmentChangeDetail(java.lang.String pEnvironmentObjectName)
|
java.lang.String |
getEnvironmentChangeDetailNewId(java.lang.String pEnvironmentObjectName)
Returns the newObjectId property for the EnvironmentChangeDetail object
under the given name. |
protected java.util.Map |
getEnvironmentChangeDetails()
Returns the map of EnvironmentChangeDetail objects that
detail the changes to the environment. |
EnvironmentChangeFormHandler |
getEnvironmentChangeFormHandler()
This property contains the original instance of the form handler that initiated the change |
java.lang.String |
getEnvironmentChangeKey()
|
java.util.List |
getEnvironmentChanges()
Returns a read only List view of the EnvironmentChangeDetails currently in the state. |
java.lang.Object |
getInputParameter(java.lang.String pParameterName)
returns the input parameter with the given name. |
java.util.Map |
getInputParameters()
Returns the change input parameter map |
java.lang.String |
getNewActiveCustomerId()
Convenience method for returning the profile id of the new active customer that will be loaded as the part of this change. |
java.lang.String |
getNewActiveTicketId()
Convenience method for returning the ticket id of the ticket that will be loaded as part of the change. |
java.lang.Object |
getStateData(java.lang.Object pStateDataKey)
Returns the extra data object keyed by the given object |
protected java.util.Map |
getStateDataMap()
Returns the extra data map. |
TicketDispositionOptions |
getTicketDispositionOptions()
This method will lazily create an instance of TicketDispositionOptions
if one doesn't already exist. |
void |
initialize(java.lang.String pApplicationName,
java.lang.String pEnvironmentChangeKey,
java.util.Map pInputParameters)
Initializes the state with the given change key and input parameters. |
void |
initialize(java.lang.String pApplicationName,
java.lang.String pEnvironmentChangeKey,
java.util.Map pInputParameters,
TicketDispositionOptions pTicketDispositionOptions)
Initializes the state with the given change key,input parameters and ticket disposition options |
boolean |
isActiveCustomerChanging()
Returns true in the state contains a change detail for the active customer. |
boolean |
isActiveTicketChanging()
Returns true in the state contains a change detail for the active ticket. |
boolean |
isChangeDetail(java.lang.String pObjectName)
returns true if there's a change detail for the given object name |
boolean |
isNewActiveCustomerDetail()
Convenience method for determining if the environment change includes a brand new active customer. |
boolean |
isNewActiveTicketDetail()
Convenience method for determining if the environment change includes a brand new ticket item. |
boolean |
isNewObjectEnvironmentChangeDetail(java.lang.String pEnvironmentObjectName)
Determines if the EnvironmentChangeDetail object for the given
object name has its newObjectRequired property set to true. |
boolean |
isProcessActiveTicketDisposition()
This flag determines if the active ticket will be processed using the ticket disposition options before the change is applied. |
boolean |
isWarnings()
Determines if there are warnings in the state |
void |
removeStateData(java.lang.Object pStateDataKey)
Removes the extra data object keyed by the given object |
void |
setApplicationName(java.lang.String pApplicationName)
Sets the application name that initiated the change |
void |
setApplyException(java.lang.Throwable pApplyException)
|
void |
setChangeFormHandlerPath(java.lang.String pChangeFormHandlerPath)
|
void |
setEnvironmentChangeFormHandler(EnvironmentChangeFormHandler pEnvironmentChangeFormHandler)
|
void |
setEnvironmentChangeKey(java.lang.String pEnvironmentChangeKey)
|
void |
setInputParameters(java.util.Map pInputParameters)
|
void |
setProcessActiveTicketDisposition(boolean pProcessActiveTicketDisposition)
|
void |
setTicketDispositionOptions(TicketDispositionOptions pTicketDispositionOptions)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
protected java.lang.String mApplicationName
protected java.util.Map mStateData
protected java.util.Map mInputParameters
protected java.lang.String mEnvironmentChangeKey
protected java.util.Map mEnvironmentChangeDetails
protected java.lang.String mChangeFormHandlerPath
protected java.util.List mAllWarnings
protected TicketDispositionOptions mTicketDispositionOptions
protected boolean mProcessActiveTicketDisposition
protected java.lang.Throwable mApplyException
Constructor Detail |
---|
public EnvironmentChangeState()
public EnvironmentChangeState(java.lang.String pEnvironmentChangeKey)
Method Detail |
---|
public void initialize(java.lang.String pApplicationName, java.lang.String pEnvironmentChangeKey, java.util.Map pInputParameters)
pApplicationName
- public void initialize(java.lang.String pApplicationName, java.lang.String pEnvironmentChangeKey, java.util.Map pInputParameters, TicketDispositionOptions pTicketDispositionOptions)
public java.lang.String getApplicationName()
public void setApplicationName(java.lang.String pApplicationName)
protected java.util.Map getStateDataMap()
public java.lang.Object getStateData(java.lang.Object pStateDataKey)
pStateDataKey
-
public void addStateData(java.lang.Object pStateDataKey, java.lang.Object pStateDataObject)
pStateDataKey
- pStateDataObject
- public void removeStateData(java.lang.Object pStateDataKey)
pStateDataKey
- public java.util.Map getInputParameters()
public void setInputParameters(java.util.Map pInputParameters)
public java.lang.Object getInputParameter(java.lang.String pParameterName)
pParameterName
-
public java.lang.String getEnvironmentChangeKey()
public void setEnvironmentChangeKey(java.lang.String pEnvironmentChangeKey)
protected java.util.Map getEnvironmentChangeDetails()
EnvironmentChangeDetail
objects that
detail the changes to the environment.
public void addChangeDetail(EnvironmentChangeDetail pEnvironmentChangeDetail) throws atg.svc.agent.environment.EnvironmentChangeDetailConflict, EnvironmentException
EnvironmentChangeDetail
.
If a change detail alerady exists for its name and that detail is equal to the new one, the new one is ignored.
If the the new detail conflicts with the existing detail, a EnvironmentChangeDetailConflict
is thrown.
pEnvironmentChangeDetail
-
atg.svc.agent.environment.EnvironmentChangeDetailConflict
EnvironmentException
public EnvironmentChangeDetail getEnvironmentChangeDetail(java.lang.String pEnvironmentObjectName)
pEnvironmentObjectName
- the name of the for which to return the change detail.
public java.util.List getEnvironmentChanges()
public boolean isNewObjectEnvironmentChangeDetail(java.lang.String pEnvironmentObjectName)
EnvironmentChangeDetail
object for the given
object name has its newObjectRequired
property set to true.
If the detail object cannot be found for the given name, the return is false.
pEnvironmentObjectName
-
public java.lang.String getEnvironmentChangeDetailNewId(java.lang.String pEnvironmentObjectName)
newObjectId
property for the EnvironmentChangeDetail
object
under the given name.
pEnvironmentObjectName
-
public java.lang.String getChangeFormHandlerPath()
public void setChangeFormHandlerPath(java.lang.String pChangeFormHandlerPath)
public EnvironmentChangeFormHandler getEnvironmentChangeFormHandler()
public void setEnvironmentChangeFormHandler(EnvironmentChangeFormHandler pEnvironmentChangeFormHandler)
public boolean isNewActiveCustomerDetail()
public java.lang.String getNewActiveCustomerId()
public boolean isNewActiveTicketDetail()
public java.lang.String getNewActiveTicketId()
public boolean isActiveTicketChanging()
public EnvironmentChangeDetail getActiveTicketDetail()
public EnvironmentChangeDetail getActiveCustomerDetail()
public boolean isChangeDetail(java.lang.String pObjectName)
pObjectName
-
public boolean isActiveCustomerChanging()
public java.util.List getAllWarnings()
public void addWarning(java.lang.String pWarning)
pWarning
- public void addWarnings(java.util.List pWarnings)
pWarnings
- public boolean isWarnings()
public TicketDispositionOptions getTicketDispositionOptions()
TicketDispositionOptions
if one doesn't already exist.
public void setTicketDispositionOptions(TicketDispositionOptions pTicketDispositionOptions)
pTicketDispositionOptions
- the TicketDispositionOptions holds the
ticket disposition options.public boolean isProcessActiveTicketDisposition()
public void setProcessActiveTicketDisposition(boolean pProcessActiveTicketDisposition)
public java.lang.Throwable getApplyException()
public void setApplyException(java.lang.Throwable pApplyException)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |