|
BEA Systems, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.beasys.portal.admin.PortalAdminHelper
Provides several utility services which facilitate portal run-time operation. These services assist in cookie and session management, Portal traffic routing, encoding/decoding, PortalManager access, and license management.
| Fields inherited from interface com.beasys.portal.admin.PortalAdminConstants |
DEFAULT_DESTINATION,
DESTINATION_URI,
FALSE,
IMMUTABLE_PORTAL_PAGE,
PORTAL_COOKIE_TIMEOUT,
PORTAL_GROUP,
PORTAL_LOGGED_IN,
PORTAL_MANAGER_A,
PORTAL_NAME,
PORTAL_PAGE,
PORTAL_PROPERTIES_A,
PORTAL_SESSION_TIMEOUT,
PORTAL_USER,
PROFILE_GROUP,
PROFILE_USER,
TRAFFIC_URI,
TRANSACTION_SERVICE,
TRANSACTION_TIMEOUT,
TRUE,
WORKING_DIR |
| Constructor Summary | |
PortalAdminHelper()
|
|
| Method Summary | |
static void |
checkAccess()
Verifies that the correct licensing arrangement is in place for Portal Framework operation. |
static java.lang.String |
decode(java.lang.String aString)
Decodes the provided String using a Base64Decoder. |
static java.lang.String |
encode(java.lang.String aString)
Encodes the provided String using a Base64Encoder. |
static javax.servlet.http.Cookie |
findCookie(java.lang.String aName,
javax.servlet.http.Cookie[] cookies)
Finds the cookie for a given cookie name. |
static int |
getCookieTimeout(javax.servlet.http.HttpServletRequest aRequest)
Retrieves the portal Cookie timeout, in seconds. |
static java.lang.String |
getCookieValue(java.lang.String aName,
javax.servlet.http.Cookie[] cookies)
Retrieves a particular cookie value from a set of javax.servlet.http.Cookie objects. |
static java.lang.String |
getDefaultDestination(javax.servlet.http.HttpServletRequest aRequest)
Retrieves the default destination of the portal associated with the provided javax.servlet.http.HttpServletRequest. |
static boolean |
getLoggedIn(javax.servlet.http.HttpServletRequest aRequest)
Determines whether a user is currently logged into the portal. |
static PortalManager |
getPortalManager()
Retrieves a com.beasys.portal.PortalManager instance. |
static PortalManager |
getPortalManager(javax.servlet.http.HttpServletRequest aRequest)
|
static PortalProperties |
getPortalProperties(javax.servlet.http.HttpServletRequest aRequest)
|
static java.lang.Object |
getSessionValue(java.lang.String aName,
javax.servlet.http.HttpServletRequest aRequest)
Retrieves a session value based on the name provided. |
static java.lang.String |
getTrafficURI(javax.servlet.http.HttpServletRequest aRequest)
Retrieves the URI of the PortalServiceManager associated
with the request. |
static java.lang.String |
getWorkingDirectory(javax.servlet.http.HttpServletRequest aRequest)
Retrieves the working directory of the portal associated with the provided javax.servlet.http.HttpServletRequest. |
static void |
putSessionValue(java.lang.String aName,
java.lang.Object aValue,
javax.servlet.http.HttpServletRequest aRequest)
Sets a session value based on the name provided. |
static java.lang.String |
qualifiedName(java.lang.String aBaseName,
javax.servlet.http.HttpServletRequest aRequest)
Creates a name, based on the provided base name, which uniquely identifies a session paramater as belonging to a particular PortalServiceManager. |
static void |
removeSessionValue(java.lang.String aName,
javax.servlet.http.HttpServletRequest aRequest)
Removes a session value based on the name provided. |
static void |
setCookie(java.lang.String aName,
java.lang.String aValue,
javax.servlet.http.Cookie[] cookies,
javax.servlet.http.HttpServletResponse aResponse,
int aMaxAge)
Locates a javax.servlet.http.Cookie with a name matching the provided name,
and sets the value of the Cookie to the provided value. |
static void |
setSessionValue(java.lang.String aName,
java.lang.Object aValue,
javax.servlet.http.HttpServletRequest aRequest)
Sets a session value based on the name provided. |
static boolean |
validSession(javax.servlet.http.HttpServletRequest aRequest)
Checks to see if the session has all of the valid values for portal run-time. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public PortalAdminHelper()
| Method Detail |
public static javax.servlet.http.Cookie findCookie(java.lang.String aName,
javax.servlet.http.Cookie[] cookies)
aName - the cookie namecookies - an array of cookies previously obtain from from the request.Cookie the cookie if found, null if not.public static java.lang.String encode(java.lang.String aString)
String using a Base64Encoder.aString - the String to encodeString the encoded version of the provided String
public static java.lang.String decode(java.lang.String aString)
throws java.io.IOException
String using a Base64Decoder.the - String to decodeString the decoded version of the provided StringIOException - buffer read error
public static void setCookie(java.lang.String aName,
java.lang.String aValue,
javax.servlet.http.Cookie[] cookies,
javax.servlet.http.HttpServletResponse aResponse,
int aMaxAge)
a javax.servlet.http.Cookie with a name matching the provided name,
and sets the value of the Cookie to the provided value.
Also, sets the maximum age of the Cookie to the age provided.
If a cookie is not found in the provided array, a new cookie
is created, and appropriate values are set.aName - the Cookie nameaValue - the new Cookie valuecookies - the array of Cookie object searched for the provided nameaResponse - the javax.servlet.http.HttpServletResponse to which the cookie is addedaMaxAge - the maximum cookie age, in secondspublic static java.lang.String getTrafficURI(javax.servlet.http.HttpServletRequest aRequest)
PortalServiceManager associated
with the request.aRequest - the request used to obtain the Traffic URI.Stringpublic static java.lang.String getWorkingDirectory(javax.servlet.http.HttpServletRequest aRequest)
javax.servlet.http.HttpServletRequest.aRequest - the HttpServletRequest associated
with the portalString the working directory of the portalpublic static java.lang.String getDefaultDestination(javax.servlet.http.HttpServletRequest aRequest)
javax.servlet.http.HttpServletRequest.
This value is the destination to which the PortalServiceManager
directs the browser when no alternate destination is provided to
the PortalServiceManager.aRequest - the HttpServletRequest associated
with the portalString the default destination of the portal
public static java.lang.String qualifiedName(java.lang.String aBaseName,
javax.servlet.http.HttpServletRequest aRequest)
PortalServiceManager. This prevents naming collisions
between multiple portal instances, as multiple portals can be
part of the same session.aBaseName - the base parameter name (e.g. "userName")aRequest - the HttpServletRequest used to retrieve the
Traffic URI, and therefore the correct PortalServiceManager
name.String
public static java.lang.String getCookieValue(java.lang.String aName,
javax.servlet.http.Cookie[] cookies)
throws java.io.IOException
javax.servlet.http.Cookie objects.aName - the name of the Cookie from which the
value is soughtcookies - an array of Cookie objects which is
searched for the cookie whose name matches the provided nameString the value of the cookie, if found ;
null otherwiseIOException - propagated from decode.public static int getCookieTimeout(javax.servlet.http.HttpServletRequest aRequest)
Cookie timeout, in seconds.aRequest - the javax.servlet.http.HttpServletRequest
associated with the portalint the Cookie timeout, in seconds.public static boolean validSession(javax.servlet.http.HttpServletRequest aRequest)
the - javax.servlet.http.HttpServletRequest from which
the session is retreivedboolean whether the session is validpublic static boolean getLoggedIn(javax.servlet.http.HttpServletRequest aRequest)
aRequest - the javax.servle.http.HttpServletRequest used to
retrieve the portal's sessionboolean whether a user is currently logged into
the portal
public static java.lang.Object getSessionValue(java.lang.String aName,
javax.servlet.http.HttpServletRequest aRequest)
aName - the name of the session value to be retrievedaRequest - the javax.servlet.http.HttpServletRequest used to
retrieve the current sessionObject
public static void setSessionValue(java.lang.String aName,
java.lang.Object aValue,
javax.servlet.http.HttpServletRequest aRequest)
aName - the name of the session value to be setaValue - the new session valueaRequest - the javax.servlet.http.HttpServletRequest used to
retrieve the current sessionObject
public static void putSessionValue(java.lang.String aName,
java.lang.Object aValue,
javax.servlet.http.HttpServletRequest aRequest)
aName - the name of the session value to be setaValue - the new session valueaRequest - the javax.servlet.http.HttpServletRequest used to
retrieve the current sessionObject
public static void removeSessionValue(java.lang.String aName,
javax.servlet.http.HttpServletRequest aRequest)
aName - the name of the session value to be removedaRequest - the javax.servlet.http.HttpServletRequest used to
retrieve the current sessionObject
public static PortalProperties getPortalProperties(javax.servlet.http.HttpServletRequest aRequest)
throws java.rmi.RemoteException,
PortalCreateException,
PortalException
public static PortalManager getPortalManager(javax.servlet.http.HttpServletRequest aRequest)
throws java.rmi.RemoteException,
PortalCreateException,
PortalException
public static PortalManager getPortalManager()
throws java.rmi.RemoteException,
PortalCreateException,
PortalException
com.beasys.portal.PortalManager instance.PortalManager a new PortalManagerPortalManagerpublic static final void checkAccess()
System.exit() if
the license is not found, or is not properly provisioned. Logs failure
reason.
|
BEA Systems, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||