com.ibm.commerce.collaboration.livehelp.beans
Class LiveHelpConfiguration

java.lang.Object
  |
  +--com.ibm.commerce.collaboration.livehelp.beans.LiveHelpConfiguration

public class LiveHelpConfiguration
extends java.lang.Object

Configuration databean for Customer Care


Field Summary
static java.lang.String CLASSNAME
          Class name
static java.lang.String COPYRIGHT
          IBM copyright info
 
Constructor Summary
LiveHelpConfiguration( CommandContext aCommandContext)
          Constructs a LiveHelpConfiguration object.
 
Method Summary
static java.lang.String doubleQuoteString(java.lang.String sString)
          Quotes a String with double quotes
protected static void entry(java.lang.String methodName)
          Simplifies tracing method entry.
static java.lang.String escapeString(java.lang.String result)
          Takes an input string and replaces the problem characters for an html input attribute value.
protected static void exit(java.lang.String methodName)
          Simplifies tracing method exit.
 boolean fulfills(java.lang.Long member, java.lang.String relationship)
          Determines if a given member fulfills a given relationship with the resource.
static java.lang.String getAppletCodeBaseURL()
          Returns the Customer Care Applet CodeBase URL as it is defined in the WCS configuration file.
 java.lang.String getAuthentication( CommandContext aCommandContext)
          Returns authentication string for a given user Id in Command Context
 java.lang.String getAuthentication(java.lang.String aUserId)
          Returns authentication string for a given user Id
static java.lang.String getCloseTagString(java.lang.String sTag)
          Format a Close Tag string
  CommandContext getCommandContext()
          Gets the CommandContext.
protected static  ConfigProperties getConfigProperties()
          Returns Configuration Properties from the instance.xml file
static java.lang.String getCSRElementString(java.lang.String CSRId, java.lang.String CSRName)
          Returns a CSR element string with format <CSR ID="xxxx" NAME="xxxx" >
 com.ibm.commerce.security.Protectable getDelegate()
          Gets Delegate
static java.lang.String getHelpSessionLimit()
          Returns Customer Care HelpSessionLimit as it is defined in the WCS configuration file.
static java.lang.String getHostName()
          Returns Sametime HostName as it is defined in the WCS configuration file.
static java.lang.String getInitiationType()
          Returns Customer Care InitiationType as it is defined in the WCS configuration file.
static java.lang.String getInstanceName()
          Returns Customer Care Instance name in format as "wcs_instance_name@hostname"
static java.lang.String getLdapType()
          Returns Customer Care LDAP configuration as it is defined in the WCS configuration file.
 java.lang.String getLogonId( CommandContext aCommandContext)
          Returns user logon Id for a given user Id in Command Context
 java.lang.String getLogonId(java.lang.String aUserId)
          Returns user logon Id for a given user Id
protected static java.lang.String getMerchantKey()
          Gets MerchantKey from the instance.xml file
static java.lang.String getMonitorAttributeElementString(java.lang.String AttributeId, java.lang.String AttributeLabel)
          Returns an Attribute element string with format <ATTR ID="xxxx" LABEL='xxxx'>
static java.lang.String getMonitorCounterAttributeElementString(java.lang.String AttributeId, java.lang.String AttributeLabel, java.lang.String AttributeUnit)
          Returns an Attribute element string with format <ATTR ID='xxxx' LABEL='xxxx' UNIT='xxxx'>
static java.lang.String getMonitorType()
          Returns Customer Care MonitorType as it is defined in the WCS configuration file.
static java.lang.String getNVPString(java.lang.String sName, java.lang.String sValue)
          Format a Name-Value Pair String
static java.lang.String getOpenTagString(java.lang.String sTag)
          Returns an Open Tag string
 java.lang.Long getOwner()
          Gets Owner
static java.lang.String getQueueElementString(java.lang.String QueueId, java.lang.String QueueName, java.lang.String QueueDesc, java.lang.String AllCSRs)
          Gets a Queue element string with format <QUEUE ID="xxxx" NAME="xxxx" DESC="xxxx" ALLCSR="xxxx" >
static java.lang.String getRegistrationURL()
          Returns Customer Care Registration URL as it is defined in the WCS configuration file.
static java.lang.String getSingleSignOnToken(HttpServletRequest req)
          Returns SingleSignOn LTPA token in cookie.
static java.lang.String getSingleSignOnType(HttpServletRequest req)
          Check if CSR applet should use LTPA token or not.
static java.lang.String getTopicElementString(java.lang.String TopicTitle, java.lang.String TopicText)
          Gets Topic element string with format <QUESTION TITLE="xxxx" TEXT="xxxx" >
static java.lang.String getTopicGroupElementString(java.lang.String GroupName)
          Gets Topic Group element string with format <GROUP NAME="xxxx" >
static java.lang.String getURLGroupElementString(java.lang.String GroupName)
          Gets URL group element string with format <GROUP NAME="xxxx" >
static java.lang.String getURLPageElementString(java.lang.String PageName, java.lang.String PageURL)
          Gets a Page URL element string with format <PAGE NAME="xxxx" URL="xxxx" >
protected   UserRegistryAccessBean getUserRegistry(java.lang.String userId)
          Gets the user registry access bean
static boolean isEnabled()
          Returns true if Customer Care is enabled as it is defined in the WCS configuration file.
protected static void trace(java.lang.String methodName, java.lang.String text)
          Simplifies tracing text.
 boolean userExists(java.lang.String aUserId)
          Returns true if user is found otherwise false
 
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 COPYRIGHT
IBM copyright info
See Also:
Constant Field Values

CLASSNAME

public static final java.lang.String CLASSNAME
Class name
See Also:
Constant Field Values
Constructor Detail

LiveHelpConfiguration

public LiveHelpConfiguration(CommandContext aCommandContext)
Constructs a LiveHelpConfiguration object.
Method Detail

doubleQuoteString

public static java.lang.String doubleQuoteString(java.lang.String sString)
Quotes a String with double quotes
Parameters:
sString - String to quote
Returns:
String double quoted string

entry

protected static void entry(java.lang.String methodName)
Simplifies tracing method entry.
Parameters:
methodName - method Name

exit

protected static void exit(java.lang.String methodName)
Simplifies tracing method exit.
Parameters:
methodName - method Name

fulfills

public boolean fulfills(java.lang.Long member,
                        java.lang.String relationship)
                 throws java.rmi.RemoteException,
                        java.lang.Exception
Determines if a given member fulfills a given relationship with the resource.
Parameters:
member - Member id of the member
relationship - The relationship the member has with respect to the resource
Returns:
true if the member fulfills the relationship with the resource
Throws:
java.lang.Exception - System error.
java.rmi.RemoteException - System error.

getAppletCodeBaseURL

public static java.lang.String getAppletCodeBaseURL()
Returns the Customer Care Applet CodeBase URL as it is defined in the WCS configuration file.
Returns:
the LiveHelp Applet CodeBase URL.

getAuthentication

public java.lang.String getAuthentication(java.lang.String aUserId)
Returns authentication string for a given user Id
Parameters:
aUserId - pass the userId
Returns:
authentication string

getAuthentication

public java.lang.String getAuthentication(CommandContext aCommandContext)
Returns authentication string for a given user Id in Command Context
Parameters:
aCommandContext - CommandContext of the session
Returns:
authentication string, or null if any error occurred during authentication.

getCloseTagString

public static java.lang.String getCloseTagString(java.lang.String sTag)
Format a Close Tag string
Parameters:
sTag - - Tag name
Returns:
String - close tag string in </Tag> format

getCommandContext

public CommandContext getCommandContext()
Gets the CommandContext.
Returns:
commandContext

getConfigProperties

protected static ConfigProperties getConfigProperties()
Returns Configuration Properties from the instance.xml file
Returns:
the configuration properties

getCSRElementString

public static java.lang.String getCSRElementString(java.lang.String CSRId,
                                                   java.lang.String CSRName)
Returns a CSR element string with format <CSR ID="xxxx" NAME="xxxx" >
Parameters:
CSRId - CSR Id
CSRName - Logon name of the CSR
Returns:
CSR element string

getDelegate

public com.ibm.commerce.security.Protectable getDelegate()
                                                  throws java.lang.Exception
Gets Delegate
Returns:
Protectable
Throws:
java.lang.Exception - System error.

getHelpSessionLimit

public static java.lang.String getHelpSessionLimit()
Returns Customer Care HelpSessionLimit as it is defined in the WCS configuration file.
Returns:
Customer Care HelpSessionLimit.

getHostName

public static java.lang.String getHostName()
Returns Sametime HostName as it is defined in the WCS configuration file.
Returns:
Sametime HostName.

getInitiationType

public static java.lang.String getInitiationType()
Returns Customer Care InitiationType as it is defined in the WCS configuration file.
Returns:
InitiationType.

getInstanceName

public static java.lang.String getInstanceName()
Returns Customer Care Instance name in format as "wcs_instance_name@hostname"
Returns:
Customer Care Instance name

getLdapType

public static java.lang.String getLdapType()
Returns Customer Care LDAP configuration as it is defined in the WCS configuration file.
Returns:
Customer Care LDAP configuration

getSingleSignOnType

public static java.lang.String getSingleSignOnType(HttpServletRequest req)
Check if CSR applet should use LTPA token or not.
Parameters:
req - Http request object
Returns:
"1" when Sametime server is using the same LDAP server as member subsystem and SSO is enabled in member system and has a LTPA token in cookie "0" when not all the above conditions are satisfied

getSingleSignOnToken

public static java.lang.String getSingleSignOnToken(HttpServletRequest req)
Returns SingleSignOn LTPA token in cookie.
Parameters:
req - HTTP request
Returns:
LTPA token in cookie or null

getLogonId

public java.lang.String getLogonId(java.lang.String aUserId)
Returns user logon Id for a given user Id
Parameters:
aUserId - User Id
Returns:
user logon Id

getLogonId

public java.lang.String getLogonId(CommandContext aCommandContext)
Returns user logon Id for a given user Id in Command Context
Parameters:
aCommandContext - CommandContext of the session
Returns:
user logon Id

getMerchantKey

protected static java.lang.String getMerchantKey()
Gets MerchantKey from the instance.xml file
Returns:
merchant key string

getMonitorAttributeElementString

public static java.lang.String getMonitorAttributeElementString(java.lang.String AttributeId,
                                                                java.lang.String AttributeLabel)
Returns an Attribute element string with format <ATTR ID="xxxx" LABEL='xxxx'>
Parameters:
AttributeId - Attribute Id
AttributeLabel - display key for the label
Returns:
Attribute element string

getMonitorCounterAttributeElementString

public static java.lang.String getMonitorCounterAttributeElementString(java.lang.String AttributeId,
                                                                       java.lang.String AttributeLabel,
                                                                       java.lang.String AttributeUnit)
Returns an Attribute element string with format <ATTR ID='xxxx' LABEL='xxxx' UNIT='xxxx'>
Parameters:
AttributeId - Id of the attribute
AttributeLabel - display key for the label
AttributeUnit - counter unit, for non-counter attribute set it to null
Returns:
Attribute element string

getMonitorType

public static java.lang.String getMonitorType()
Returns Customer Care MonitorType as it is defined in the WCS configuration file.
Returns:
Customer Care MonitorType.

getNVPString

public static java.lang.String getNVPString(java.lang.String sName,
                                            java.lang.String sValue)
Format a Name-Value Pair String
Parameters:
sName - Name string
sValue - Value string
Returns:
String NVP string in Name=Value format

getOpenTagString

public static java.lang.String getOpenTagString(java.lang.String sTag)
Returns an Open Tag string
Parameters:
sTag - Tag name
Returns:
String open tag string in <Tag> format

getOwner

public java.lang.Long getOwner()
                        throws java.lang.Exception,
                               java.rmi.RemoteException
Gets Owner
Returns:
Long
Throws:
java.rmi.RemoteException - System error.
java.lang.Exception - System error.

getQueueElementString

public static java.lang.String getQueueElementString(java.lang.String QueueId,
                                                     java.lang.String QueueName,
                                                     java.lang.String QueueDesc,
                                                     java.lang.String AllCSRs)
Gets a Queue element string with format <QUEUE ID="xxxx" NAME="xxxx" DESC="xxxx" ALLCSR="xxxx" >
Parameters:
QueueId - Id of the Queue
QueueName - Name of the Queue
QueueDesc - Description of the Queue
AllCSRs - Queue assignment info
Returns:
Queue element string

getRegistrationURL

public static java.lang.String getRegistrationURL()
Returns Customer Care Registration URL as it is defined in the WCS configuration file.
Returns:
Customer Care Registration URL.

getTopicElementString

public static java.lang.String getTopicElementString(java.lang.String TopicTitle,
                                                     java.lang.String TopicText)
Gets Topic element string with format <QUESTION TITLE="xxxx" TEXT="xxxx" >
Parameters:
TopicTitle - Title of the topic
TopicText - Text of the topic
Returns:
Topic element string

getTopicGroupElementString

public static java.lang.String getTopicGroupElementString(java.lang.String GroupName)
Gets Topic Group element string with format <GROUP NAME="xxxx" >
Parameters:
GroupName - Group name
Returns:
Topic group element string

getURLGroupElementString

public static java.lang.String getURLGroupElementString(java.lang.String GroupName)
Gets URL group element string with format <GROUP NAME="xxxx" >
Parameters:
GroupName - Group name
Returns:
URL group element string

getURLPageElementString

public static java.lang.String getURLPageElementString(java.lang.String PageName,
                                                       java.lang.String PageURL)
Gets a Page URL element string with format <PAGE NAME="xxxx" URL="xxxx" >
Parameters:
PageName - Name of the page
PageURL - URL of the page
Returns:
Page URL element string

getUserRegistry

protected UserRegistryAccessBean getUserRegistry(java.lang.String userId)
                                          throws java.lang.Exception
Gets the user registry access bean
Parameters:
userId - user Id
Returns:
UserRegistryAccessBean UserRegistry AccessBean
Throws:
java.lang.Exception - Thrown whenever an error occurs while looking up the user registry.

isEnabled

public static boolean isEnabled()
Returns true if Customer Care is enabled as it is defined in the WCS configuration file.
Returns:
True is Customer Care is enabled.

trace

protected static void trace(java.lang.String methodName,
                            java.lang.String text)
Simplifies tracing text.
Parameters:
methodName - method Name
text - trace text

userExists

public boolean userExists(java.lang.String aUserId)
Returns true if user is found otherwise false
Parameters:
aUserId - pass the userId
Returns:
boolean

escapeString

public static java.lang.String escapeString(java.lang.String result)
Takes an input string and replaces the problem characters for an html input attribute value.

& replaced & " replaced &qout;

Note: All html attribute values are assumed to be delimited by double quote.

Parameters:
result - the string to be converted.
Returns:
the converted string.