Overview Package Class Tree Serialized Deprecated Index Help PREV class NEXT class SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
com.lotus.cs
Class CSEnvironmentjava.lang.Object com.lotus.cs.CSEnvironment
- public class CSEnvironment
- extends java.lang.Object
CSEnvironment is the starting point to instantiate and use Lotus Collaborative Components.
The first 2 lines of code needed to start using Collaborative Components are:
...
CSEnvironment environ = CSEnvironment.getEnvironment(request);
CSCredentials cred = environ.getCredentials(request);
...
The getEnvironment method initializes Collaborative Components as follows: sets up the environment properties (for example, location of Lotus Collaborative servers), sets credentials for the logged-in user (using the HttpServletRequest), and sets up resource strings (loads the appropriate CSRes properties file for the strings used by the person tag).
The CSEnvironment object may also be used to retrieve information about the environment or logged-in user, or to retrieve the resources which you may wish to store, per locale, in the CSRes properties files.
Field Summary static java.lang.String CS_PERF_PROP_USEWMM
server type (to be passed to getServers method and other methods with param serverType)static java.lang.String CS_PROP_ENABLED
environment property name (used as keys in the server property HashMap argument)static java.lang.String CS_PROP_HOSTNAME
environment property name (used as keys in the server property HashMap argument)static java.lang.String CS_PROP_IIOP_PORT
environment property name (used as keys in the server property HashMap argument)static java.lang.String CS_PROP_NUMSERVERS
environment property name (used as keys in the server property HashMap argument)static java.lang.String CS_PROP_PORT
environment property name (used as keys in the server property HashMap argument)static java.lang.String CS_PROP_PROTOCOL
environment property name (used as keys in the server property HashMap argument)static java.lang.String CS_PROP_VERSION
environment property name (used as keys in the server property HashMap argument)static java.lang.String CS_SERVER_CUSTOM_CRED
For customers that use something other than the WPS LPTA mechanism for portal authentication, ie.static java.lang.String CS_SERVER_DISCOVERY_SERVER
server type (to be passed to getServers method and other methods with param serverType)static java.lang.String CS_SERVER_DOMINO_DIRECTORY
server type (to be passed to getServers method and other methods with param serverType)static java.lang.String CS_SERVER_PERSONTAG
static java.lang.String CS_SERVER_QUICKPLACE
server type (to be passed to getServers method and other methods with param serverType)static java.lang.String CS_SERVER_SAMETIME
server type (to be passed to getServers method and other methods with param serverType)static java.lang.String CS_SERVER_WEBSPHERE_PORTAL_EXTEND
server type (to be passed to getServers method and other methods with param serverType)static java.lang.String PERSONTAG_ATTRIB_AWARENESSVERSI0N
static java.lang.String PERSONTAG_ATTRIB_BUSINESSCARD
static java.lang.String PERSONTAG_ATTRIB_MENUS
static java.lang.String PERSONTAG_ATTRIB_NAMES_LWP
static java.lang.String PERSONTAG_ATTRIB_NAMES_PORTAL
Method Summary static java.util.HashMap getAvailableServers(java.lang.String serverType)
This method returns a HashMap containing properties for a specified server type in the environment.CSCredentials getCredentials(javax.servlet.http.HttpServletRequest request)
This method gets the CSCredentials object which is required to instantiate the service objects.static CSCredentials getCredentials(java.lang.String userName, java.lang.String userPassword)
This method is provided for use only when the credentials in the HttpServletRequest are not valid for the service object you wish to instantiate (unusual circumstance).static CSEnvironment getEnvironment(javax.servlet.http.HttpServletRequest request)
This method gets the CSEnvironment - this is the starting point to use Lotus Collaborative Services.java.util.ResourceBundle getResources(javax.servlet.http.HttpServletRequest request)
This method returns the resources contained in the CSRes properties file (uses locale).java.util.HashMap getServers(java.lang.String serverType)
Deprecated. As of verison 4.2, replaced by getAvailableServers(String serverType)static java.lang.String getSTAuthor(java.lang.String name, javax.servlet.http.HttpServletRequest request)
static java.lang.String getSTLoginName(java.lang.String name, javax.servlet.http.HttpServletRequest request)
static java.lang.String getSTName(java.lang.String name, javax.servlet.http.HttpServletRequest request, java.lang.String sep)
boolean isEnabled(java.lang.String serverType)
Deprecated. As of verison 4.2, replaced by isServerAvailable(String serverType)static boolean isServerAvailable(java.lang.String serverType)
This method returns a boolean indicating whether or not the specified server type is available in the environment.
Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail CS_SERVER_WEBSPHERE_PORTAL_EXTEND
public static final java.lang.String CS_SERVER_WEBSPHERE_PORTAL_EXTEND
- server type (to be passed to getServers method and other methods with param serverType)
- See Also:
- Constant Field Values
CS_PERF_PROP_USEWMM
public static final java.lang.String CS_PERF_PROP_USEWMM
- server type (to be passed to getServers method and other methods with param serverType)
- See Also:
- Constant Field Values
CS_SERVER_QUICKPLACE
public static final java.lang.String CS_SERVER_QUICKPLACE
- server type (to be passed to getServers method and other methods with param serverType)
- See Also:
- Constant Field Values
CS_SERVER_DISCOVERY_SERVER
public static final java.lang.String CS_SERVER_DISCOVERY_SERVER
- server type (to be passed to getServers method and other methods with param serverType)
- See Also:
- Constant Field Values
CS_SERVER_DOMINO_DIRECTORY
public static final java.lang.String CS_SERVER_DOMINO_DIRECTORY
- server type (to be passed to getServers method and other methods with param serverType)
- See Also:
- Constant Field Values
CS_SERVER_SAMETIME
public static final java.lang.String CS_SERVER_SAMETIME
- server type (to be passed to getServers method and other methods with param serverType)
- See Also:
- Constant Field Values
CS_PROP_ENABLED
public static final java.lang.String CS_PROP_ENABLED
- environment property name (used as keys in the server property HashMap argument)
- See Also:
- Constant Field Values
CS_PROP_NUMSERVERS
public static final java.lang.String CS_PROP_NUMSERVERS
- environment property name (used as keys in the server property HashMap argument)
- See Also:
- Constant Field Values
CS_PROP_HOSTNAME
public static final java.lang.String CS_PROP_HOSTNAME
- environment property name (used as keys in the server property HashMap argument)
- See Also:
- Constant Field Values
CS_PROP_PROTOCOL
public static final java.lang.String CS_PROP_PROTOCOL
- environment property name (used as keys in the server property HashMap argument)
- See Also:
- Constant Field Values
CS_PROP_VERSION
public static final java.lang.String CS_PROP_VERSION
- environment property name (used as keys in the server property HashMap argument)
- See Also:
- Constant Field Values
CS_PROP_PORT
public static final java.lang.String CS_PROP_PORT
- environment property name (used as keys in the server property HashMap argument)
- See Also:
- Constant Field Values
CS_PROP_IIOP_PORT
public static final java.lang.String CS_PROP_IIOP_PORT
- environment property name (used as keys in the server property HashMap argument)
- See Also:
- Constant Field Values
CS_SERVER_CUSTOM_CRED
public static final java.lang.String CS_SERVER_CUSTOM_CRED
- For customers that use something other than the WPS LPTA mechanism for portal authentication, ie. SiteMinder
- See Also:
- Constant Field Values
CS_SERVER_PERSONTAG
public static final java.lang.String CS_SERVER_PERSONTAG
- See Also:
- Constant Field Values
PERSONTAG_ATTRIB_NAMES_PORTAL
public static final java.lang.String PERSONTAG_ATTRIB_NAMES_PORTAL
- See Also:
- Constant Field Values
PERSONTAG_ATTRIB_NAMES_LWP
public static final java.lang.String PERSONTAG_ATTRIB_NAMES_LWP
- See Also:
- Constant Field Values
PERSONTAG_ATTRIB_MENUS
public static final java.lang.String PERSONTAG_ATTRIB_MENUS
- See Also:
- Constant Field Values
PERSONTAG_ATTRIB_BUSINESSCARD
public static final java.lang.String PERSONTAG_ATTRIB_BUSINESSCARD
- See Also:
- Constant Field Values
PERSONTAG_ATTRIB_AWARENESSVERSI0N
public static final java.lang.String PERSONTAG_ATTRIB_AWARENESSVERSI0N
- See Also:
- Constant Field Values
Method Detail getEnvironment
public static CSEnvironment getEnvironment(javax.servlet.http.HttpServletRequest request)
- This method gets the CSEnvironment - this is the starting point to use Lotus Collaborative Services. From here, getCredentials, getResources, getServers, etc. NOTE that you cannot use the CSEnvironment from an unsecured portlet/jsp. Refer to the code example in the CSEnvironment description.
- Parameters:
- request - must contain credentials for the user
- Returns:
- CSEnvironment from which CSCredentials may be obtained.
getCredentials
public CSCredentials getCredentials(javax.servlet.http.HttpServletRequest request)
- This method gets the CSCredentials object which is required to instantiate the service objects. Refer to the code example in the CSEnvironment description.
- Parameters:
- request - CSCredentials is saved in the HttpSession
- Returns:
- CSCredentials which may be used to instantiate service objects.
getCredentials
public static CSCredentials getCredentials(java.lang.String userName, java.lang.String userPassword)
- This method is provided for use only when the credentials in the HttpServletRequest are not valid for the service object you wish to instantiate (unusual circumstance). For example, for LDAP functionality (in DominoService), when the LDAP directory is different from the WP directory.
- Parameters:
- userName - name of the user (prefer shortname)
- userPassword - password of the user
- Returns:
- CSCredentials which may be used to instantiate service objects.
- See Also:
- getCredentials(HttpServletRequest request)
getResources
public java.util.ResourceBundle getResources(javax.servlet.http.HttpServletRequest request)
- This method returns the resources contained in the CSRes properties file (uses locale).
- Parameters:
- request - ResourceBundle is saved in the HttpSession
- Returns:
- java.util.ResourceBundle which contains locale-specific Strings which are appropriate for the current user's locale.
isEnabled
public boolean isEnabled(java.lang.String serverType)
- Deprecated. As of verison 4.2, replaced by isServerAvailable(String serverType)
- This method returns a boolean indicating whether or not the specified server type is available in the environment. Note: When running in a non-Wp environment and specifying serverType CSEnvironment.CS_SERVER_WEBSPHERE_PORTAL_EXTEND, this method always returns false.
- Parameters:
- serverType - One of the CSEnvironment server types (example,CSEnvironment.CS_SERVER_QUICKPLACE)
- Returns:
- whether or not the specified serverType is available
- See Also:
- CS_SERVER_QUICKPLACE, CS_SERVER_DISCOVERY_SERVER, CS_SERVER_DOMINO_DIRECTORY, CS_SERVER_SAMETIME
isServerAvailable
public static boolean isServerAvailable(java.lang.String serverType)
- This method returns a boolean indicating whether or not the specified server type is available in the environment. Note: When running in a non-Wp environment and specifying serverType CSEnvironment.CS_SERVER_WEBSPHERE_PORTAL_EXTEND, this method always returns false.
- Parameters:
- serverType - One of the CSEnvironment server types (example,CSEnvironment.CS_SERVER_QUICKPLACE)
- Returns:
- whether or not the specified serverType is available
- See Also:
- CS_SERVER_QUICKPLACE, CS_SERVER_DISCOVERY_SERVER, CS_SERVER_DOMINO_DIRECTORY, CS_SERVER_SAMETIME
getServers
public java.util.HashMap getServers(java.lang.String serverType)
- Deprecated. As of verison 4.2, replaced by getAvailableServers(String serverType)
- This method returns a HashMap containing properties for a specified server type in the environment. Index values in the HashMap are CSEnvironment.CS_PROP_ENABLED, CSEnvironment.CS_PROP_NUMSERVERS, "1."+CSEnvironment.CS_PROP_HOSTNAME, "1."+CS_PROP_PROTOCOL, "1."+CS_PROP_VERSION, "1."+CS_PROP_HOSTNAME, etc. etc.
- Parameters:
- serverType - One of the CSEnvironment server types (example,CSEnvironment.CS_SERVER_QUICKPLACE)
- Returns:
- a HashMap containing properties for a specified server type in the environment.
getAvailableServers
public static java.util.HashMap getAvailableServers(java.lang.String serverType)
- This method returns a HashMap containing properties for a specified server type in the environment. Index values in the HashMap are CSEnvironment.CS_PROP_ENABLED, CSEnvironment.CS_PROP_NUMSERVERS, "1."+CSEnvironment.CS_PROP_HOSTNAME, "1."+CS_PROP_PROTOCOL, "1."+CS_PROP_VERSION, "1."+CS_PROP_HOSTNAME, etc. etc.
- Parameters:
- serverType - One of the CSEnvironment server types (example,CSEnvironment.CS_SERVER_QUICKPLACE)
- Returns:
- a HashMap containing properties for a specified server type in the environment.
getSTName
public static java.lang.String getSTName(java.lang.String name, javax.servlet.http.HttpServletRequest request, java.lang.String sep)
getSTLoginName
public static java.lang.String getSTLoginName(java.lang.String name, javax.servlet.http.HttpServletRequest request)
getSTAuthor
public static java.lang.String getSTAuthor(java.lang.String name, javax.servlet.http.HttpServletRequest request)
Overview Package Class Tree Serialized Deprecated Index Help PREV class NEXT class SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.