|
||||||||||
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.svc.clicktoconnect.C2CTools
public class C2CTools
This class contains helper API used for managing click to connect operations in Service applications.
C2CConstants
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
EXCEPTION_RESOURCE_NAME
Resource name for log errors and exceptions |
protected boolean |
mCheckFTCallID
|
protected EnvironmentTools |
mEnvironmentTools
|
protected java.lang.String |
mProfileComponentPath
|
protected java.lang.String |
mSecretKeyForHashCompare
|
protected static java.util.ResourceBundle |
sExceptionResourceBundle
Resource bundle for log errors and exceptions |
static java.lang.String |
USER_RESOURCE_NAME
Resource name for user localized messages |
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 | |
---|---|
C2CTools()
|
Method Summary | |
---|---|
boolean |
compareHash(C2CRequestData pC2CRequestData)
Checks that the hash from the request matches the hash generated from the data on the request. |
java.lang.String |
computeHash(java.lang.String clearText)
Computes a hash from a string. |
C2CRequestData |
createClickToCallRequestData(atg.servlet.DynamoHttpServletRequest pRequest)
Initializes a new C2CRequestData data object from the given request |
C2CRequestData |
createClickToCallRequestData(java.lang.String pUserTelephoneNumber)
Creates the C2CRequestData . |
protected C2CRequestData |
createNewClickToCallRequestData()
Creates a new instance of the C2CRequestData object. |
java.lang.String |
generateHashText(C2CRequestData pC2CRequestData)
Returns the string that's used to generate the hash value. |
atg.clicktoconnect.C2CSessionDataManager |
getC2CSessionDataManager()
Get property C2CSessionDataManager |
C2CWebServiceManager |
getC2CWebServiceManager()
Get property C2CWebServiceManager |
EnvironmentTools |
getEnvironmentTools()
|
java.lang.String |
getExceptionMessage(java.lang.String pKey,
java.lang.String[] pMessageArgs)
Returns the message string from the exception resource library. |
java.lang.String |
getHashingAlgorithm()
Returns property SomeProperty |
java.lang.String |
getProfileComponentPath()
Path to the profile component used to determine if the session has been logged in. |
java.lang.String |
getSecretKeyForHashCompare()
Returns the key value that uses to generate the hash value when comparing the hash generated by eStara for the request. |
java.lang.String |
getUserResource(java.lang.String pKey,
java.lang.String[] pMsgArgs,
java.util.Locale pLocale)
Returns a resource from the user resource bundle |
boolean |
isCheckFTCallID()
get CheckFTCallID |
boolean |
isLoggedIn()
Returns true if the current session is logged in |
atg.repository.RepositoryItem |
loadC2CSessionData(java.lang.String pTokenID)
Returns a repository item with the supplied token ID |
void |
setC2CSessionDataManager(atg.clicktoconnect.C2CSessionDataManager pC2CSessionDataManager)
Set property C2CSessionDataManager |
void |
setC2CWebServiceManager(C2CWebServiceManager pC2CWebServiceManager)
Set property C2CWebServiceManager |
void |
setCheckFTCallID(boolean pCheckFTCallID)
If true, the ftcallid supplied on the original request is validated against the ftcallid returned from the estara web service. |
void |
setEnvironmentTools(EnvironmentTools pEnvironmentTools)
|
void |
setHashingAlgorithm(java.lang.String pHashingAlgorithm)
Sets property HashingAlgorithm |
void |
setProfileComponentPath(java.lang.String pProfileComponentPath)
|
void |
setSecretKeyForHashCompare(java.lang.String pSecretKeyForHashCompare)
|
void |
startNewC2CCall(C2CRequestData pC2CRequestData)
Initializes the environment for a new c2c request. |
boolean |
validateFTCallId(C2CRequestData pC2CRequestData)
validateFTCallId Checks that we have a valid eStara ftCallId by comparing the one provided as a request parameter to the one returned from the eStara web service. |
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
public static final java.lang.String EXCEPTION_RESOURCE_NAME
protected static java.util.ResourceBundle sExceptionResourceBundle
public static final java.lang.String USER_RESOURCE_NAME
protected java.lang.String mProfileComponentPath
protected java.lang.String mSecretKeyForHashCompare
protected boolean mCheckFTCallID
protected EnvironmentTools mEnvironmentTools
Constructor Detail |
---|
public C2CTools()
Method Detail |
---|
public java.lang.String getProfileComponentPath()
public void setProfileComponentPath(java.lang.String pProfileComponentPath)
public java.lang.String getSecretKeyForHashCompare()
This value should match the key value provided to eStara.
public void setSecretKeyForHashCompare(java.lang.String pSecretKeyForHashCompare)
public void setCheckFTCallID(boolean pCheckFTCallID)
pCheckFTCallID
- the CheckFTCallIDpublic boolean isCheckFTCallID()
public void setC2CSessionDataManager(atg.clicktoconnect.C2CSessionDataManager pC2CSessionDataManager)
C2CSessionDataManager
pC2CSessionDataManager
- public atg.clicktoconnect.C2CSessionDataManager getC2CSessionDataManager()
C2CSessionDataManager
public void setC2CWebServiceManager(C2CWebServiceManager pC2CWebServiceManager)
C2CWebServiceManager
pC2CWebServiceManager
- public C2CWebServiceManager getC2CWebServiceManager()
C2CWebServiceManager
public void setHashingAlgorithm(java.lang.String pHashingAlgorithm)
pHashingAlgorithm
- an argumentpublic java.lang.String getHashingAlgorithm()
public EnvironmentTools getEnvironmentTools()
public void setEnvironmentTools(EnvironmentTools pEnvironmentTools)
public C2CRequestData createClickToCallRequestData(atg.servlet.DynamoHttpServletRequest pRequest) throws C2CException
C2CRequestData
data object from the given request
This method is executed from the request pipeline to initialize the connect data from an initial request.
pRequest
-
C2CException
public C2CRequestData createClickToCallRequestData(java.lang.String pUserTelephoneNumber) throws C2CException
C2CRequestData
.
Makes a call to webcare using pUserTelephoneNumber
.
Retrieves the ClickToConnect application repository item and sets it in the C2CRequestData.
pUserTelephoneNumber
-
C2CException
protected C2CRequestData createNewClickToCallRequestData()
public java.lang.String getExceptionMessage(java.lang.String pKey, java.lang.String[] pMessageArgs)
pKey
- pMessageArgs
-
public java.lang.String getUserResource(java.lang.String pKey, java.lang.String[] pMsgArgs, java.util.Locale pLocale)
pKey
- pMsgArgs
- msg argumentspLocale
- the locale
public void startNewC2CCall(C2CRequestData pC2CRequestData) throws C2CException
pC2CRequestData
-
C2CException
public java.lang.String computeHash(java.lang.String clearText) throws java.security.NoSuchAlgorithmException
clearText
- an argument
java.security.NoSuchAlgorithmException
public boolean validateFTCallId(C2CRequestData pC2CRequestData)
public java.lang.String generateHashText(C2CRequestData pC2CRequestData)
Consists of username, callerid and secret key. ftCallId is
also included if isCheckFTCallId
returns true
pC2CRequestData
-
public boolean compareHash(C2CRequestData pC2CRequestData)
public boolean isLoggedIn()
public atg.repository.RepositoryItem loadC2CSessionData(java.lang.String pTokenID) throws C2CException
pTokenID
-
C2CException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |