|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.droplet.EmptyFormHandler
atg.droplet.GenericFormHandler
atg.svc.agent.environment.EnvironmentChangeFormHandler
public class EnvironmentChangeFormHandler
Based form handler class for Agent gestures that perform environment changes.
This form handler is designed to provide a specific flow when the agent uses gestures that change the environment.
The flow consist of: start change w/agent UI gesture -> warnings/ticket disposition confirmation page -> complete change.
Changes in the environment can be monitored by all Service applications, which can apply their own related implicit changes. Service applications can generate warnings related to the change that the agent must confirm before proceeding. Also, if the change includes a ticket change, the agent may also have to decide the dispostion of the current ticket before proceeding.
When the ticket is changing, processing the current ticket's dispostion is made up of two steps. First, the agent is prompted with a form in which they can set the disposition options. Secondly, the current ticket disposition is modified based on the ticket disposition options. Ticket disposition options are either supplied by the agent through prompting or by a default set of options. The prompting of the agent for disposition options is optional, but modifiying the current ticket's disposition is not. Whenever the ticket changes as a result of an environment change, the current ticket's disposition is modified based on the supplied options.
Also, as part of the environment change process, warnings can be generated by the Service applications. The agent must confirm the warnings before the change is applied. Displaying warning confirmations is optional by configuration, but disabling them should be used with caution since they are likely to give the agent insight into the possible reprecussions of their requested change. A property configuration determines if warning confirmation is displayed to the agent.
Form handler properpties:
EnvironmentChangeState
object.
preChangeEnvironment
preChangeEnvironment
Field Summary | |
---|---|
protected static java.lang.String |
AGENTRESOURCES
Resources file |
protected static java.lang.String |
AGENTUSERRESOURCES
|
static java.lang.String |
CLASS_VERSION
Class version string |
protected java.lang.String |
mApplicationName
|
protected boolean |
mDoTicketDispositionPrompt
|
protected boolean |
mDoWarnings
|
protected java.lang.String |
mEnvironmentChangeKey
|
protected EnvironmentChangeState |
mEnvironmentChangeState
|
protected EnvironmentTools |
mEnvironmentTools
|
protected boolean |
mInitChangeState
|
protected java.util.Map |
mInputParameters
|
protected atg.web.messaging.MessageTools |
mMessageTools
|
protected TicketDispositionOptions |
mTicketDispositionOptions
|
protected TicketingTools |
mTicketingTools
|
protected javax.transaction.TransactionManager |
mTransactionManager
|
protected java.util.ResourceBundle |
sBundle
|
Fields inherited from class atg.droplet.GenericFormHandler |
---|
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
EnvironmentChangeFormHandler()
|
Method Summary | |
---|---|
protected boolean |
changeEnvironment(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Applies the changes to the environment. |
java.lang.String |
getApplicationName()
|
java.lang.String |
getConfirmPromptURL()
Returns property ConfirmURL |
java.lang.String |
getConfirmURL()
Returns property ConfirmURL |
java.lang.String |
getEnvironmentChangeKey()
The change key for the environment change. |
EnvironmentChangeState |
getEnvironmentChangeState()
Contains state information related to the environment change. |
EnvironmentTools |
getEnvironmentTools()
|
java.lang.String |
getErrorURL()
Returns property ErrorURL |
java.util.Map |
getInputParameters()
Returns the input parameters to the environment change. |
atg.web.messaging.MessageTools |
getMessageTools()
Returns the MessageTools component |
java.lang.String |
getSuccessURL()
Returns property SuccessURL |
TicketDispositionOptions |
getTicketDispositionOptions()
This method will lazily create an instance of TicketDispositionOptions
if one doesn't already exist. |
TicketingTools |
getTicketingTools()
Returns the agent TicketingTools component |
javax.transaction.TransactionManager |
getTransactionManager()
Returns the transaction manager |
protected java.util.Locale |
getUserLocale()
This method gets the current Locale |
protected java.lang.String |
getUserMessage(java.lang.String pBundleName,
java.lang.String pKey,
java.lang.Object[] pMsgArgs)
Returns a resource string using the given user message resource bundle name and the user locale. |
protected java.lang.String |
getUserMessage(java.lang.String pBundleName,
java.lang.String pKey,
java.lang.String[] pMsgArgs)
Deprecated. |
boolean |
handleChangeEnvironment(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Handler for changing the environment. |
protected void |
initChangeState(java.lang.String pEnvironmentChangeKey,
java.util.Map pInputParameters,
TicketDispositionOptions pTicketDispositionOptions,
boolean pDoWarnings)
Initializes the state using the form handler's environmentChangeKey and inputParameters. |
boolean |
isDoTicketDispositionPrompt()
Returns if the ticket disposition prompting should be included for this change. |
boolean |
isDoWarnings()
determines if warnings should be generated for the change. |
boolean |
isInitChangeState()
Determines if the EnvironmentChangeState |
boolean |
isShowDispositionPrompt()
Determines if the ticket disposition prompt is necessary for the current change. |
protected boolean |
postChangeEnvironment(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Post environment change processing. |
protected boolean |
preChangeEnvironment(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Pre change environment process. |
void |
setApplicationName(java.lang.String pApplicationName)
|
void |
setConfirmPromptURL(java.lang.String pConfirmPromptURL)
Sets property ConfirmPromptURL |
void |
setConfirmURL(java.lang.String pConfirmURL)
Sets property ConfirmURL |
void |
setDoTicketDispositionPrompt(boolean pDoTicketDispositionPrompt)
|
void |
setDoWarnings(boolean pDoWarnings)
|
void |
setEnvironmentChangeKey(java.lang.String pEnvironmentChangeKey)
|
void |
setEnvironmentChangeState(EnvironmentChangeState pEnvironmentChangeState)
|
void |
setEnvironmentTools(EnvironmentTools pEnvironmentTools)
|
void |
setErrorURL(java.lang.String pErrorURL)
Sets property ErrorURL. |
void |
setInitChangeState(boolean pInitChangeState)
|
void |
setInputParameters(java.util.Map pInputParameters)
|
void |
setMessageTools(atg.web.messaging.MessageTools pMessageTools)
|
void |
setSuccessURL(java.lang.String pSuccessURL)
Sets property SuccessURL |
void |
setTicketDispositionOptions(TicketDispositionOptions pTicketDispositionOptions)
|
void |
setTicketingTools(TicketingTools pTicketingTools)
|
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Sets the Transaction Manager |
Methods inherited from class atg.droplet.GenericFormHandler |
---|
addFormException, addUncheckedFormException, afterSet, beforeSet, checkFormRedirect, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards |
Methods inherited from class atg.droplet.EmptyFormHandler |
---|
afterGet, beforeGet |
Methods inherited from class atg.nucleus.GenericService |
---|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
protected static final java.lang.String AGENTRESOURCES
protected final java.util.ResourceBundle sBundle
protected static final java.lang.String AGENTUSERRESOURCES
protected java.lang.String mApplicationName
protected atg.web.messaging.MessageTools mMessageTools
protected TicketingTools mTicketingTools
protected TicketDispositionOptions mTicketDispositionOptions
protected boolean mDoTicketDispositionPrompt
protected boolean mDoWarnings
protected javax.transaction.TransactionManager mTransactionManager
protected EnvironmentTools mEnvironmentTools
protected java.lang.String mEnvironmentChangeKey
protected java.util.Map mInputParameters
protected EnvironmentChangeState mEnvironmentChangeState
protected boolean mInitChangeState
Constructor Detail |
---|
public EnvironmentChangeFormHandler()
Method Detail |
---|
public java.lang.String getApplicationName()
public void setApplicationName(java.lang.String pApplicationName)
public atg.web.messaging.MessageTools getMessageTools()
public void setMessageTools(atg.web.messaging.MessageTools pMessageTools)
public TicketingTools getTicketingTools()
public void setTicketingTools(TicketingTools pTicketingTools)
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 isDoTicketDispositionPrompt()
public void setDoTicketDispositionPrompt(boolean pDoTicketDispositionPrompt)
public boolean isDoWarnings()
public void setDoWarnings(boolean pDoWarnings)
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
pTransactionManager
- public javax.transaction.TransactionManager getTransactionManager()
public void setErrorURL(java.lang.String pErrorURL)
This property can be set by request parameter using the name defined by ERROR_URL
.This
makes it possible to pass the parameter using an anchor tag.
pErrorURL
- a String
valuepublic java.lang.String getErrorURL()
String
valuepublic void setSuccessURL(java.lang.String pSuccessURL)
This property can be set by request parameter using the name defined by SUCCESS_URL
. This
makes it possible to pass the parameter using an anchor tag.
pSuccessURL
- a String
valuepublic java.lang.String getSuccessURL()
String
valuepublic void setConfirmURL(java.lang.String pConfirmURL)
This property can be set by request parameter using the name defined by SUCCESS_URL
. This
makes it possible to pass the parameter using an anchor tag.
pConfirmURL
- a String
valuepublic java.lang.String getConfirmURL()
String
valuepublic void setConfirmPromptURL(java.lang.String pConfirmPromptURL)
This property defines the url location of the contents of the ticket disposition prompt dialog.
pConfirmPromptURL
- a String
valuepublic java.lang.String getConfirmPromptURL()
String
valuepublic EnvironmentTools getEnvironmentTools()
public void setEnvironmentTools(EnvironmentTools pEnvironmentTools)
protected void initChangeState(java.lang.String pEnvironmentChangeKey, java.util.Map pInputParameters, TicketDispositionOptions pTicketDispositionOptions, boolean pDoWarnings) throws EnvironmentException
pEnvironmentChangeKey
- pInputParameters
- pTicketDispositionOptions
- pDoWarnings
-
EnvironmentException
protected boolean preChangeEnvironment(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- pResponse
-
javax.servlet.ServletException
java.io.IOException
protected boolean changeEnvironment(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- pResponse
-
javax.servlet.ServletException
java.io.IOException
EnvironmentTools.applyChanges(EnvironmentChangeState)
public boolean handleChangeEnvironment(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- pResponse
-
javax.servlet.ServletException
java.io.IOException
protected boolean postChangeEnvironment(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- pResponse
-
javax.servlet.ServletException
java.io.IOException
public java.lang.String getEnvironmentChangeKey()
public void setEnvironmentChangeKey(java.lang.String pEnvironmentChangeKey)
public java.util.Map getInputParameters()
public void setInputParameters(java.util.Map pInputParameters)
public EnvironmentChangeState getEnvironmentChangeState()
EnvironmentChangeState
public void setEnvironmentChangeState(EnvironmentChangeState pEnvironmentChangeState)
public boolean isInitChangeState()
EnvironmentChangeState is
re-initialized. The default is true. This parameter
should be set to false on the confirmation page.
- Returns:
- true if the environment change state should be initialized.
public void setInitChangeState(boolean pInitChangeState)
public boolean isShowDispositionPrompt()
protected java.util.Locale getUserLocale()
protected java.lang.String getUserMessage(java.lang.String pBundleName, java.lang.String pKey, java.lang.String[] pMsgArgs)
pKey
- pMsgArgs
-
protected java.lang.String getUserMessage(java.lang.String pBundleName, java.lang.String pKey, java.lang.Object[] pMsgArgs)
pKey
- pMsgArgs
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |