|
© 2001 BEA Systems, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.beasys.commerce.axiom.jsp.JspBase
Acts as a base class for all JSP pages that use the Flow Manager.
Prescribes methods which facilitate p13n run-time operation. Allows access
to the FlowManager URI, the application's working
directory, the home page, and the current page.
Also, facilitates management of the application's run-time session, by providing
convenience methods for setting and getting session values, and
setting and getting JSP destinations. Implements several constants
interfaces to reduce the burden of constant referencing by JSP pages.
| Field Summary | |
protected static boolean |
debug
Whether debug mode is on. |
static java.lang.String |
DESTINATION_TAG
A property name denoting the destination to be used with form submission. |
| Constructor Summary | |
JspBase()
|
|
| Method Summary | |
static java.lang.String |
cnvrtSC(java.lang.String theInpStr)
Given a string, substitute HTML entities for HTML special characters. |
static java.lang.String |
createURL(javax.servlet.http.HttpServletRequest aRequest,
java.lang.String destination,
java.lang.String parameters)
Creates a FlowManager application URL from the given request. |
static java.lang.String |
escapeQuotes(java.lang.String input)
Escape single-quotes from a string to make them javascript-friendly (this also runs the string through cnvrtSC) |
static java.lang.String |
fixupRelativeURL(java.lang.String aURL,
javax.servlet.http.HttpServletRequest aRequest)
With the system using jsp:forward the relative directories may not be set employed correctly. |
static java.lang.String |
getClickThruPage()
Returns the name of the servlet that processes click through events on the server, and handles redirections to external sites. |
static java.lang.String |
getCurrentPage(javax.servlet.http.HttpServletRequest aRequest)
Returns the currently active FlowManager application page. |
static java.lang.String |
getDefaultDestination(javax.servlet.http.HttpServletRequest aRequest)
Get the default destination specified in the registration. |
static java.lang.String |
getDefaultSuccessor(javax.servlet.http.HttpServletRequest aRequest)
Get the default succssor (group) that was specified in the servlet registration. |
static java.lang.String |
getHomePage(javax.servlet.http.HttpServletRequest aRequest)
Retrieves the FlowManger application home page specified by the start-up parameters for the p13n app. |
static java.lang.String |
getJspURI(javax.servlet.http.HttpServletRequest aRequest)
Retrieves the encompassing page basically the request URI. |
static java.lang.String |
getJspURINoContext(javax.servlet.http.HttpServletRequest aRequest)
Retrieves the request URI. |
static boolean |
getLoggedIn(javax.servlet.http.HttpServletRequest aRequest)
Indicates whether a user is currently logged into the FlowManager app. |
static java.lang.String |
getRepositoryDirectory(javax.servlet.http.HttpServletRequest aRequest)
Get the Portal repository directory specified in the registration. |
static java.lang.String |
getRequestURI(javax.servlet.http.HttpServletRequest aRequest)
Deprecated. use getJspURI or getJspURINoContext |
static javax.servlet.ServletConfig |
getServletConfig(javax.servlet.http.HttpServletRequest aRequest)
Get the servlet config from the request |
static java.lang.Object |
getSessionValue(java.lang.String aName,
javax.servlet.http.HttpServletRequest aRequest)
Retrieves a session value. |
static java.lang.String |
getTrafficURI(javax.servlet.http.HttpServletRequest aRequest)
Retrieves the URI of the FlowManager. |
static java.lang.String |
getTrafficURINoContext(javax.servlet.http.HttpServletRequest aRequest)
Get traffic URI with no context. |
static java.lang.String |
getWorkingDirectory(javax.servlet.http.HttpServletRequest aRequest)
Get the working directory specified in the registration. |
static java.lang.String |
pathFromRequest(javax.servlet.http.HttpServletRequest aRequest)
Get the fully-qualified path of the request URI. |
static void |
putSessionValue(java.lang.String aName,
java.lang.Object aValue,
javax.servlet.http.HttpServletRequest aRequest)
Sets a session value. |
static java.lang.String |
reconcileFile(javax.servlet.http.HttpServletRequest aRequest,
java.lang.String aURL)
Check to see if the file exists in the working directory of the FlowManager application. |
static java.lang.String |
reconcileFile(javax.servlet.http.HttpServletRequest aRequest,
java.lang.String aURL,
boolean addWebappContext)
Call the reconcileFile method specifying whether any webapp context should be included. |
static void |
removeSessionValue(java.lang.String aName,
javax.servlet.http.HttpServletRequest aRequest)
Removes a session value. |
static void |
setAlternateDestination(javax.servlet.http.HttpServletRequest req,
java.lang.String dest)
Deprecated. use setOverrideDestination |
static void |
setLoggedIn(javax.servlet.http.HttpServletRequest aRequest,
javax.servlet.http.HttpServletResponse aResponse,
boolean aBool)
Sets the logged-in state for this FlowManager application. |
static void |
setOverrideDestination(javax.servlet.http.HttpServletRequest req,
java.lang.String dest)
Sets the alternate forward variable. |
static void |
setSessionValue(java.lang.String aName,
java.lang.Object aValue,
javax.servlet.http.HttpServletRequest aRequest)
Sets a session value. |
static void |
setSuccessor(java.lang.String aSuccessor,
javax.servlet.http.HttpServletRequest aRequest)
Takes a group name and puts it into the session as the value of the SERVICEMANAGER_SUCCESSOR |
static void |
setUser(java.lang.String aUser,
javax.servlet.http.HttpServletRequest aRequest)
Takes a user name and puts it into the session as the value of the SERVICEMANAGER_USER |
static void |
setUserAndSuccessor(java.lang.String aUser,
java.lang.String aSuccessor,
javax.servlet.http.HttpServletRequest aRequest)
Takes a user name and a group name and puts them into the session as the values of the SERVICEMANAGER_USER and SERVICEMANAGER_SUCCESSOR, respectively |
| Field Detail |
protected static final boolean debug
public static final java.lang.String DESTINATION_TAG
| Constructor Detail |
public JspBase()
| Method Detail |
public static java.lang.String getTrafficURI(javax.servlet.http.HttpServletRequest aRequest)
FlowManager.aRequest - the javax.servlet.http.HttpServletRequest from which
the FlowManager is obtained.String the URI of the FlowManager.
If you are not using a Service Manager, then this will return null;public static java.lang.String getTrafficURINoContext(javax.servlet.http.HttpServletRequest aRequest)
aRequest - Stringpublic static java.lang.String getWorkingDirectory(javax.servlet.http.HttpServletRequest aRequest)
aRequest - javax.servlet.http.HttpServletRequest from which
the FlowManager is obtained.String the value of the working directory of the
current p13n app instantiationpublic static java.lang.String getRepositoryDirectory(javax.servlet.http.HttpServletRequest aRequest)
aRequeset - javax.servlet.http.HttpServletRequest from which
the FlowManager is obtained.String the value of the working directory of the
current portal instantiationpublic static java.lang.String getDefaultDestination(javax.servlet.http.HttpServletRequest aRequest)
the - javax.servlet.http.HttpServletRequest corresponding
to the FlowManagerString the default destination of the p13n app instantiationpublic static javax.servlet.ServletConfig getServletConfig(javax.servlet.http.HttpServletRequest aRequest)
the - javax.servlet.http.HttpServletRequest corresponding
to the FlowManagerServletConfig the current request's configurationpublic static java.lang.String getRequestURI(javax.servlet.http.HttpServletRequest aRequest)
null or empty, the request.getRequestURI() method wil be
called. Note: This method DOES strip off the context. To get a request
uri with the context use getRequestURI.the - javax.servlet.http.HttpServletRequest for which the URI
is soughtpublic static java.lang.String getJspURI(javax.servlet.http.HttpServletRequest aRequest)
null or empty, the request.getRequestURI() method wil be
called. Note: This method does NOT strip off the context. To get a request
uri without the context use getRequestURINoContext.the - javax.servlet.http.HttpServletRequest for which the URI
is soughtpublic static java.lang.String getJspURINoContext(javax.servlet.http.HttpServletRequest aRequest)
null or empty, the request.getRequestURI() method wil be
called. Note: This method DOES strip off the context. To get a request
uri with the context use getRequestURI.the - javax.servlet.http.HttpServletRequest for which the URI
is soughtpublic static java.lang.String pathFromRequest(javax.servlet.http.HttpServletRequest aRequest)
aRequest - the javax.servlet.http.HttpServletRequest for which
the fully-qualified path is soughtString the fully qualified path from the request
public static java.lang.String createURL(javax.servlet.http.HttpServletRequest aRequest,
java.lang.String destination,
java.lang.String parameters)
aRequest - The javax.servlet.http.HttpServletRequest used to create the full URL.destination - The desired destination. If the destination is not fully qualified (assumed relative), it will
query the request to prepend the path. NOTE: do not include a query string in the destination.parameters - The parameters. These will be appended to the URL.String the created URL
public static java.lang.String fixupRelativeURL(java.lang.String aURL,
javax.servlet.http.HttpServletRequest aRequest)
aURL - the url to fixup.aRequest - the associated request.String the fixed-up URL.
public static java.lang.String reconcileFile(javax.servlet.http.HttpServletRequest aRequest,
java.lang.String aURL,
boolean addWebappContext)
aURL - the file to check for. This can be a fully qualified url, in
which case nothing happens.aRequest - the request, because we need the repository directory as well
as the hashmap associated to the current servlet.addWebappContext - a flag indicating whether to add or suppress any
available webapp context
public static java.lang.String reconcileFile(javax.servlet.http.HttpServletRequest aRequest,
java.lang.String aURL)
aURL - the file to check for. This can be a fully qualified url, in
which case nothing happens.aRequest - the request, because we need the repository directory as well
as the hashmap associated to the current servlet.public static java.lang.String getHomePage(javax.servlet.http.HttpServletRequest aRequest)
aRequest - the http.servlet.http.HttpServletRequest from which
p13n app information is obtainedString the FlowManager home pagepublic static java.lang.String getCurrentPage(javax.servlet.http.HttpServletRequest aRequest)
aRequest - the http.servlet.http.HttpServletRequest from which
FlowManager information is obtainedString the current p13n app page
public static void setAlternateDestination(javax.servlet.http.HttpServletRequest req,
java.lang.String dest)
DESTINATION_TAG
property upon form submission.req - the javax.servlet.http.HttpServletRequest associated with
the form submissiondestination - the JSP page which ultimate processes the request
public static void setOverrideDestination(javax.servlet.http.HttpServletRequest req,
java.lang.String dest)
DESTINATION_TAG
property upon form submission.req - the javax.servlet.http.HttpServletRequest associated with
the form submissiondest - the JSP page which ultimate processes the request
public static void setLoggedIn(javax.servlet.http.HttpServletRequest aRequest,
javax.servlet.http.HttpServletResponse aResponse,
boolean aBool)
aRequest - the javax.servlet.http.HttpServletRequest used
to retrieve the session for updatethe - corresponding javax.servlet.http.HttpServletResponseaBool - designates the true or false logged-in valuepublic static boolean getLoggedIn(javax.servlet.http.HttpServletRequest aRequest)
the - FlowManager app javax.servlet.http.HttpServletRequestboolean whether a user is logged in
public static java.lang.Object getSessionValue(java.lang.String aName,
javax.servlet.http.HttpServletRequest aRequest)
FlowManager to avoid naming collisions
when multiple FlowManager objects share the same
session.aName - the name of the session property whose value is soughtaRequest - the javax.servlet.http.HttpServletRequest from
which the session is obtainedObject the new property value
public static void setSessionValue(java.lang.String aName,
java.lang.Object aValue,
javax.servlet.http.HttpServletRequest aRequest)
FlowManager to avoid naming collisions
when multiple FlowManager objects share the same
session.aName - the name of the session property whose value is to be setaValue - the new property valueaRequest - the javax.servlet.http.HttpServletRequest from
which the session is obtained
public static void putSessionValue(java.lang.String aName,
java.lang.Object aValue,
javax.servlet.http.HttpServletRequest aRequest)
FlowManager to avoid naming collisions
when multiple FlowManager objects share the same
session.aName - the name of the session property whose value is to be setaValue - the new property valueaRequest - the javax.servlet.http.HttpServletRequest from
which the session is obtained
public static void removeSessionValue(java.lang.String aName,
javax.servlet.http.HttpServletRequest aRequest)
FlowManager to avoid naming collisions
when multiple FlowManager objects share the same
session.aName - the name of the session property to be removedaValue - the new property valueaRequest - the javax.servlet.http.HttpServletRequest from
which the session is obtainedpublic static java.lang.String cnvrtSC(java.lang.String theInpStr)
theInpStr - the string to be convertedString the string with special chars translated
public static void setUser(java.lang.String aUser,
javax.servlet.http.HttpServletRequest aRequest)
aUser - the user nameaRequest - the javax.servlet.http.HttpServletRequest from
which the session is obtained
public static void setSuccessor(java.lang.String aSuccessor,
javax.servlet.http.HttpServletRequest aRequest)
aSuccessor - the group nameaRequest - the javax.servlet.http.HttpServletRequest from
which the session is obtained
public static void setUserAndSuccessor(java.lang.String aUser,
java.lang.String aSuccessor,
javax.servlet.http.HttpServletRequest aRequest)
aUser - the user nameaSuccessor - the group nameaRequest - the javax.servlet.http.HttpServletRequest from
which the session is obtainedpublic static java.lang.String getDefaultSuccessor(javax.servlet.http.HttpServletRequest aRequest)
aRequest. - public static java.lang.String escapeQuotes(java.lang.String input)
intput - the String to escapepublic static java.lang.String getClickThruPage()
|
© 2001 BEA Systems, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||