oracle.clex.process.controller
Class HttpServletController

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--oracle.clex.process.controller.HttpServletController
All Implemented Interfaces:
PageConstants, Parent, ProcessConstants, ProcessController, java.io.Serializable, ServiceController, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
ForwardPortletController, ProcessGeneratorController, WAPHttpServletController

public class HttpServletController
extends javax.servlet.http.HttpServlet
implements ServiceController, PageConstants

Responsible for dispatching the requests and responses from/to the service. HTTP is a loopback protocol which does not allow much flexibility in how to handle flow. An instance of Controller or one of its subclasses may handle more than one client. Therefore the service which is affected by the particular request may be different from request to request. The affected service is retrieved using the Session object before anything else is done.

Typical Usage in web.xml

 <servlet>
   <servlet-name>personnel-jsp</servlet-name>
   <servlet-class>oracle.clex.process.controller.HttpServletController</servlet-class>
   <init-param>
     <param-name>cle-service-descriptor</param-name>
     <param-value>personnel-jsp.xml</param-value>
   </init-param>
 </servlet>
 

See the javadocs for the initSSOEnabler(ServletConfig) method for how to setup an HttpServletController for use with Oracle Login Server.

See Also:
Serialized Form

Field Summary
protected  java.lang.Object aSessionIdObj
           
static java.lang.String CONTROLLER
           
protected static java.lang.String CONTROLLER_USER
          The session attribute key for user
protected  boolean DEBUG
           
protected static java.lang.String DEFAULT_UPLOAD_DIRECTORY
           
protected static int DEFAULT_UPLOAD_LIMIT
           
static java.lang.String HTTPREQUEST
           
static java.lang.String HTTPRESPONSE
           
static java.lang.String HTTPSESSIONID
           
static java.lang.String INFOTABLEPOOL
           
static java.lang.String IS_SESSION_RESET
           
static java.lang.String MULTIPART_UPLOAD_DIRECTORY
          Deprecated. Use getUploadDirectory() instead. This is not reliable because each controller can have its own upload directory.
static int MULTIPART_UPLOAD_LIMIT
          Deprecated. Use getUploadLimit() instead. This is not reliable because each controller can have its own upload limit.
static java.lang.String MULTIPARTREQUEST
           
static java.lang.String REQUESTEDVALUES
           
protected  Service serviceCache
           
protected static PartnerSSOEnabler ssoEnabler
           
 
Fields inherited from interface oracle.cle.process.ProcessConstants
ALLINFO, BINARYSIZE, CONNECTION_PROVIDER_DTD_NAME, CONNECTION_PROVIDER_VALIDATION_PROPERTY, CONTENTTYPE, CURRENTPAGEID, CURRENTSERVICE, ERRORMESSAGE, GENERICBINARYRESULT, GENERICTEXTRESULT, GETINFO_CHECK_ALL, GETINFO_CHECK_CONTROLLERONLY, GETINFO_CHECK_SERVICEONLY, HTML, HTMLRESULT, JSPRESULT, LOGOFF, NOMESSAGE, PAGEID, PDF, PDFRESULT, PRE_GROUP_DTD_NAME, PRE_GROUP_VALIDATION_PROPERTY, PROCESS_FEEDBACK, RESTART, RESULTTYPE, RULES_DTD_NAME, SERVICE_DESCRIPTOR, SERVICE_DTD_NAME, SERVICE_VALIDATION_PROPERTY, SERVICEINITIALSTATE, SERVICENAME, SESSIONID, SKIP, STACKTRACE, USER, USERROLE, WML, XML, XMLRESULT
 
Constructor Summary
HttpServletController()
           
 
Method Summary
 void buildTransitionTable(TransitionTable aTable)
          This method does not do anything at the Controller level, but it is required to implement the method in the Parent interface.
protected  MultipartRequest checkMultipartRequest(javax.servlet.http.HttpServletRequest request)
          Deprecated. Replaced by handleMultipartRequest for version 2.0. This method must call handleMultipartRequest and will be removed in a future release. Returns a MultipartRequest. This method is invoked from the preServiceStart() method to handle multipart requests.
protected  void clearRequestedValues(javax.servlet.http.HttpSession session)
          Clears the table that holds on to all the values that have been requested from a particular Request.
protected  java.util.Hashtable cloneInfoTable(java.util.Hashtable aTable)
          Makes a deep copy of the specified infoTable (Hashtable) This method is just a wrapper for the Object.clone() method that casts to ensure types constraints.
 void debug(java.lang.String text)
          A simple way to print some debug messages out
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Simply calls doPost(request, response)
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This is the standard method to deal with requests.
 java.util.Vector getChildren()
          TO BE IMPLEMENTED.
 Service getConcreteService()
          Returns a concrete Service defined by the XML file.
 java.lang.String getControllerValue(javax.servlet.http.HttpServletRequest request)
          Gets the controller info from the url that accessed this service.
 java.lang.String getCurrentContentType(Service service)
          Returns the content type from the infoTabe
 java.lang.String getDefaultContentType()
          Return the default content type for the HttpServletController
 java.lang.Integer getDefaultControllerResultType()
          Return the default response type for the HttpServletController
 java.lang.Object getInfo(java.lang.String key)
          Deprecated. This will no longer work. Use getInfo(String, Service) instead.
 java.lang.Object getInfo(java.lang.String key, Service service)
          Gets the value(s) for the specified key from the HttpServletRequest.
 java.lang.String getLoggedOffPageLocation()
          Deprecated. Will remove in future releases. Use logoff=http://logoff?<location> instead of depending on this method. If an invalid location is given using the preferred method mentioned above, the logedoff page will default to the web server root.
 java.lang.String getName()
          Returns the serviceName attribute.
protected  java.lang.String getPageId(javax.servlet.http.HttpServletRequest aRequest, MultipartRequest aMultipartRequest)
          Retrieves the PAGEID parameter from either the HttpServletRequest or MultipartRequest specified.
 Parent getParent()
          Returns the Parent of the controller.
 java.util.Vector getParents()
          Returns a Vector of parents of the controller.
 java.lang.String getServiceDescriptorName()
          Return the name of the service descriptor file
 java.lang.Object getSessionId(Service aService)
          Returns a unique sessionId for the session under which the specified service is running.
 java.lang.String getSetContentType(Service service)
          Deprecated. Replaced by getCurrentContentType for version 2.0. This method must internally call getCurrentContentType and will be removed in a future release.
static PartnerSSOEnabler getSSOEnabler()
          Returns the PartnerSSOEnabler object that was initialized in init.
 java.lang.String getUploadDirectory()
          Returns the default upload directory relative to server root ala: /upload
 int getUploadLimit()
          Returns the default upload limit(5 MB)
protected  java.lang.String getValue(java.lang.String key, javax.servlet.http.HttpServletRequest aRequest, MultipartRequest aMultipartRequest)
          Retrieves the value for the specefied key from either the HttpServletRequest or MultipartRequest specified.
protected  java.lang.String[] getValues(java.lang.String key, javax.servlet.http.HttpServletRequest aRequest, MultipartRequest aMultipartRequest)
          Retrieves the value for the specefied key from the HttpServletRequest specified.
 java.lang.String getWebServerLogLocation()
          Return the file location for the web server log file This is used when displaying errors to the "developer" and providing a convenient way to view the log.
protected  boolean handleAdditionalResults(Service service, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Override to handle any additional Result Types.
 void handleJSPRedirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String url)
          Handle forwarding to jsp page Refactored from HandleResults so that the PortletController can override it.
protected  void handleJSPResult(Service service, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handle JSP Result Refactored from HandleResults
protected  void handleLogoff(javax.servlet.http.HttpServletResponse response, java.lang.String logoffLocation)
          Handle logging off (Bug 2601487) Refactored from preServiceStart so that it can be overriden i.e.
protected  MultipartRequest handleMultipartRequest(javax.servlet.http.HttpServletRequest request)
          Returns a MultipartRequest.
protected  java.util.Vector handleNewService(javax.servlet.http.HttpSession session)
          if we are in a new Service but have the same session, invalidate the session and get a new one.
protected  User handleOSSOLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Does all the work for handling an Oracle Single Sign On Based authentication for the service controlled by this servlet.
protected  oracle.clex.process.controller.PostServiceException handlePostServiceException(oracle.clex.process.controller.PostServiceException postSE)
          This method is called for most exceptions that occur after the service.start() in this Controller.
protected  oracle.clex.process.controller.PreServiceException handlePreServiceException(oracle.clex.process.controller.PreServiceException preSE)
          This method is called for most exceptions that occur before the service.start() in this Controller.
protected  void handleResults(Service service, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Do whatever has to be done as a result of the service invocation finishing and returning output to the client.
protected  java.lang.Exception handleUnhandledException(java.lang.Exception e)
          This method is called for any uncaught exceptions that are not handled by handlePreServiceException or handlePostServiceException.
 void init(javax.servlet.ServletConfig sc)
          Overloads the init function of the super.
protected  void initSessionObjects(javax.servlet.http.HttpSession session)
          Cleans out the session objects except for the system user info so that it can be carried forward to another service without the user having to log on.
protected  void initSSOEnabler(javax.servlet.ServletConfig sc)
          Initialize PartnerSSOEnabler static attribute with servlet configuration arguments
usage example:
protected  boolean isMultipartFormData(javax.servlet.http.HttpServletRequest httpRequest)
          Returns true if the request content type is MULTIPARTFORMDATA.
protected  void loadServiceInfo(Service service, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Registers Process Results in service's infoTable.
protected  MultipartRequest newMultipartRequest(javax.servlet.http.HttpServletRequest request)
          Returns a new MultipartRequest instance for the given request.
protected  void postServiceStart(Service service, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Saves the state of the service.
protected  Service preServiceStart(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Called in doPost.
 void processParameters(Child aChildProcess)
          This method does not do anything at the Controller level, but it is required to implement the method in the Parent interface.
 void processResults(Child aChildProcess)
          This method does not do anything at the Controller level, but it is required to implement the method in the Parent interface.
protected  void saveState(Service service, javax.servlet.http.HttpSession session)
          Saves this service's state to the session for the next invocation.
protected  void setName(java.lang.String aServiceName)
          Set the name of the service
protected  void setServiceDescriptorName(java.lang.String aServiceDescriptorName)
          Set the name of the service descriptor file
 void terminate()
          Deprecated. This method may be removed in a future release
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

protected boolean DEBUG

INFOTABLEPOOL

public static final java.lang.String INFOTABLEPOOL

REQUESTEDVALUES

public static final java.lang.String REQUESTEDVALUES

HTTPSESSIONID

public static final java.lang.String HTTPSESSIONID

IS_SESSION_RESET

public static final java.lang.String IS_SESSION_RESET

HTTPREQUEST

public static final java.lang.String HTTPREQUEST

HTTPRESPONSE

public static final java.lang.String HTTPRESPONSE

MULTIPARTREQUEST

public static final java.lang.String MULTIPARTREQUEST

CONTROLLER

public static final java.lang.String CONTROLLER

DEFAULT_UPLOAD_DIRECTORY

protected static final java.lang.String DEFAULT_UPLOAD_DIRECTORY

DEFAULT_UPLOAD_LIMIT

protected static final int DEFAULT_UPLOAD_LIMIT

CONTROLLER_USER

protected static final java.lang.String CONTROLLER_USER
The session attribute key for user

MULTIPART_UPLOAD_DIRECTORY

public static java.lang.String MULTIPART_UPLOAD_DIRECTORY
Deprecated. Use getUploadDirectory() instead. This is not reliable because each controller can have its own upload directory.


MULTIPART_UPLOAD_LIMIT

public static int MULTIPART_UPLOAD_LIMIT
Deprecated. Use getUploadLimit() instead. This is not reliable because each controller can have its own upload limit.


ssoEnabler

protected static PartnerSSOEnabler ssoEnabler

serviceCache

protected Service serviceCache

aSessionIdObj

protected java.lang.Object aSessionIdObj
Constructor Detail

HttpServletController

public HttpServletController()
Method Detail

init

public void init(javax.servlet.ServletConfig sc)
          throws javax.servlet.ServletException
Overloads the init function of the super. Initializes the servlet, and retrieves parameters for the startup.
Overrides:
init in class javax.servlet.GenericServlet

initSSOEnabler

protected void initSSOEnabler(javax.servlet.ServletConfig sc)
                       throws javax.servlet.ServletException
Initialize PartnerSSOEnabler static attribute with servlet configuration arguments
usage example:
  In web.xml:

 <servlet>
  <servlet-name>proxyservlet</servlet-name>
  <servlet-class>oracle.clex.process.controller.HttpServletController</servlet-class>
  <init-param>
    <param-name>cle-service-descriptor</param-name>
    <param-value>aservice.xml</param-value>
  </init-param>
  <init-param>
    <param-name>provider_root</param-name>
    <param-value>C:\Oracle\iSuites\portal30\jpdk\providers\partnerApp, sessiontimeout=1800000</param-value>
  </init-param>
  <init-param>
    <param-name>listenerToken</param-name>
    <param-value>proxyservlet:login.server.host:80</param-value>
  </init-param>
  <init-param>
    <param-name>requestedUrl</param-name>
    <param-value>http://localhost:8888/servlet/proxyservlet</param-value>
  </init-param>
  <init-param>
    <param-name>onCancelUrl</param-name>
    <param-value>http://localhost:8888/</param-value>
  </init-param>
  <init-param>
    <param-name>partnerAppCookieName</param-name>
    <param-value>SSO_PAPP_SERVLET_ID</param-value>
  </init-param>
  <init-param>
    <param-name>partnerAppCookieDomain</param-name>
    <param-value>my.domain.com</param-value>
  </init-param>
  <init-param>
    <param-name>partnerAppCookieScope</param-name>
    <param-value>/</param-value>
  </init-param>
  <init-param>
    <param-name>partnerAppCookieDesc</param-name>
    <param-value>SSO application cookie</param-value>
  </init-param>
  <init-param>
    <param-name>providerName</param-name>
    <param-value>ssoProvider</param-value>
  </init-param>
</servlet>
<servlet>
  <servlet-name>proxyservletprovider</servlet-name>
  <servlet-class>oracle.portal.provider.v1.http.HttpProvider</servlet-class>
  <init-param>
    <param-name>provider_root</param-name>
    <param-value>C:\Oracle\iSuites\portal30\jpdk\providers\partnerApp, sessiontimeout=1800000</param-value>
  </init-param>
  <init-param>
    <param-name>listenerToken</param-name>
    <param-value>proxyservlet:login.server.host:80</param-value>
  </init-param>
  <init-param>
    <param-name>requestedUrl</param-name>
    <param-value>http://localhost:8888/servlet/proxyservlet</param-value>
  </init-param>
  <init-param>
    <param-name>onCancelUrl</param-name>
    <param-value>http://localhost:8888/</param-value>
  </init-param>
  <init-param>
    <param-name>partnerAppCookieName</param-name>
    <param-value>SSO_PAPP_SERVLET_ID</param-value>
  </init-param>
  <init-param>
    <param-name>partnerAppCookieDomain</param-name>
    <param-value>my.domain.com</param-value>
  </init-param>
  <init-param>
    <param-name>partnerAppCookieScope</param-name>
    <param-value>/</param-value>
  </init-param>
  <init-param>
    <param-name>partnerAppCookieDesc</param-name>
    <param-value>SSO application cookie</param-value>
  </init-param>
  <init-param>
    <param-name>providerName</param-name>
    <param-value>ssoProvider</param-value>
  </init-param>
</servlet>

 

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws java.net.MalformedURLException,
                   javax.servlet.ServletException,
                   java.io.IOException
This is the standard method to deal with requests.

The steps we go through are:

 +- preServiceStart(...) ---------------------------
 | 1. Retrieve the active service for the client if there is any.
 |    If not create a new instance of the service
 +- service.start(...) -----------------------------
 | 2. Send start to the service
 |    This is a blocking operation it will take from a few seconds
 |    to a few hours :)
 +- postServiceStart(...) --------------------------
 | 3. Ask the service for its html result.
 | 4. Save the service in the session object
 | 5. Stream the result to the client
 | 6. Done.
 +--------------------------------------------------
 

Overrides:
doPost in class javax.servlet.http.HttpServlet
See Also:
HttpServlet

preServiceStart

protected Service preServiceStart(javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response)
                           throws oracle.clex.process.controller.PreServiceException,
                                  java.lang.Exception
Called in doPost. Retrieve the active service for the client if there is any. If not create a new instance of the service.

postServiceStart

protected void postServiceStart(Service service,
                                javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response)
                         throws oracle.clex.process.controller.PostServiceException,
                                java.lang.Exception
Saves the state of the service. Returns the output to the client and realeases of request scoped Connections.

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws java.net.MalformedURLException,
                  javax.servlet.ServletException,
                  java.io.IOException
Simply calls doPost(request, response)
Overrides:
doGet in class javax.servlet.http.HttpServlet

handleNewService

protected java.util.Vector handleNewService(javax.servlet.http.HttpSession session)
if we are in a new Service but have the same session, invalidate the session and get a new one. We might eventually want to do something nicer than this like clean up the session and reuse it so we don't have to get another cookie for each servlet we hit.

The Vector returned contains all the global infos including the User

loadServiceInfo

protected void loadServiceInfo(Service service,
                               javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse response)
Registers Process Results in service's infoTable.

saveState

protected void saveState(Service service,
                         javax.servlet.http.HttpSession session)
                  throws CLEException,
                         java.lang.Exception
Saves this service's state to the session for the next invocation. The default implementation handles cloning the service's state for the current PageId so that the back button and subsequent submits based on data in the browser's cache does not foul up the service's execution.

handleOSSOLogin

protected User handleOSSOLogin(javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse response)
                        throws java.lang.Exception
Does all the work for handling an Oracle Single Sign On Based authentication for the service controlled by this servlet. If login is successful, an oracle.cle.resource.User is returned representing the logged in user.

handleResults

protected void handleResults(Service service,
                             javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)
                      throws java.io.IOException,
                             CLEException
Do whatever has to be done as a result of the service invocation finishing and returning output to the client.

handleAdditionalResults

protected boolean handleAdditionalResults(Service service,
                                          javax.servlet.http.HttpServletRequest request,
                                          javax.servlet.http.HttpServletResponse response)
                                   throws java.io.IOException,
                                          CLEException
Override to handle any additional Result Types. Returns true if there are other result types to handle, false otherwise. The boolean return is very important because when false, the handleResults method will assume that an unknown Result Type was found. Returns false by default.

getInfo

public java.lang.Object getInfo(java.lang.String key)
Deprecated. This will no longer work. Use getInfo(String, Service) instead.

Does nothing and returns null.
Specified by:
getInfo in interface Parent
Following copied from interface: oracle.cle.process.Parent
Parameters:
key - the name of the value
Returns:
Object the infoobject.

getInfo

public java.lang.Object getInfo(java.lang.String key,
                                Service service)
Gets the value(s) for the specified key from the HttpServletRequest. If the value is singular, then return only one String... otherwise return an array of String values. If the content type is Multipart Form Data, the filenames of any uploaded files will be returned as the values for their keys.
Specified by:
getInfo in interface ServiceController

getValue

protected java.lang.String getValue(java.lang.String key,
                                    javax.servlet.http.HttpServletRequest aRequest,
                                    MultipartRequest aMultipartRequest)
Retrieves the value for the specefied key from either the HttpServletRequest or MultipartRequest specified. Both are checked and one String value is returned.

getValues

protected java.lang.String[] getValues(java.lang.String key,
                                       javax.servlet.http.HttpServletRequest aRequest,
                                       MultipartRequest aMultipartRequest)
Retrieves the value for the specefied key from the HttpServletRequest specified. Does not check the request for paramters if we have already asked for this key within the span of one request. In other words, a value can be retrieved from a request only once. After that, it will have to come from the Service's InfoTable. A String[] value is returned.

getPageId

protected java.lang.String getPageId(javax.servlet.http.HttpServletRequest aRequest,
                                     MultipartRequest aMultipartRequest)
Retrieves the PAGEID parameter from either the HttpServletRequest or MultipartRequest specified. Both are checked and one PAGEID is returned.

isMultipartFormData

protected boolean isMultipartFormData(javax.servlet.http.HttpServletRequest httpRequest)
Returns true if the request content type is MULTIPARTFORMDATA. Might want to check for any constantly defined content type

cloneInfoTable

protected java.util.Hashtable cloneInfoTable(java.util.Hashtable aTable)
Makes a deep copy of the specified infoTable (Hashtable) This method is just a wrapper for the Object.clone() method that casts to ensure types constraints.
Parameters:
aTable - Table to clone
Returns:
A copy of the hashtable specified

debug

public void debug(java.lang.String text)
A simple way to print some debug messages out

terminate

public void terminate()
Deprecated. This method may be removed in a future release

Cleans up this controller and invalidates the session. This is called by the Service that this Controller contains.
Specified by:
terminate in interface ServiceController
See Also:
ProcessController

initSessionObjects

protected void initSessionObjects(javax.servlet.http.HttpSession session)
Cleans out the session objects except for the system user info so that it can be carried forward to another service without the user having to log on. Also sets the IS_SESSION_RESET to true to indicate that the session objects has been initialized

checkMultipartRequest

protected MultipartRequest checkMultipartRequest(javax.servlet.http.HttpServletRequest request)
                                          throws java.io.IOException,
                                                 java.lang.Exception
Deprecated. Replaced by handleMultipartRequest for version 2.0. This method must call handleMultipartRequest and will be removed in a future release. Returns a MultipartRequest. This method is invoked from the preServiceStart() method to handle multipart requests.

Parameters:
request - javax.servlet.http.HttpServletRequest
Returns:
oracle.clex.util.MultipartRequest

handleMultipartRequest

protected MultipartRequest handleMultipartRequest(javax.servlet.http.HttpServletRequest request)
                                           throws java.io.IOException,
                                                  java.lang.Exception
Returns a MultipartRequest. This method is invoked from the preServiceStart() method to handle multipart requests.
Parameters:
request - javax.servlet.http.HttpServletRequest
Returns:
oracle.clex.util.MultipartRequest

newMultipartRequest

protected MultipartRequest newMultipartRequest(javax.servlet.http.HttpServletRequest request)
                                        throws java.lang.Exception
Returns a new MultipartRequest instance for the given request. Override this method if you want to use an extension of the MultipartRequest class or if you would like to use a different constructor. This method gets invoked by the handleMultipartRequest method.

getUploadDirectory

public java.lang.String getUploadDirectory()
Returns the default upload directory relative to server root ala: /upload

This method's return value is passed to MultipartRequest objects upon construction. Override this method to pass a different directory to the MultipartRequest constructor.


getUploadLimit

public int getUploadLimit()
Returns the default upload limit(5 MB)

This method's return value is passed to MultipartRequest objects upon construction. Override this method to pass a different upload limit to the MultipartRequest constructor.


getWebServerLogLocation

public java.lang.String getWebServerLogLocation()
Return the file location for the web server log file This is used when displaying errors to the "developer" and providing a convenient way to view the log. This is only used if DEBUG is true. This method is not abstract, so that current implementation of Controller will not be affected.

getSessionId

public java.lang.Object getSessionId(Service aService)
Returns a unique sessionId for the session under which the specified service is running. This method will always return the same Object for a given session.
Specified by:
getSessionId in interface ServiceController

clearRequestedValues

protected void clearRequestedValues(javax.servlet.http.HttpSession session)
Clears the table that holds on to all the values that have been requested from a particular Request. This datastructure was needed to avoid removed info values from reappearing mysteriously in service's.

getDefaultControllerResultType

public java.lang.Integer getDefaultControllerResultType()
Return the default response type for the HttpServletController
Specified by:
getDefaultControllerResultType in interface ServiceController

getDefaultContentType

public java.lang.String getDefaultContentType()
Return the default content type for the HttpServletController

getCurrentContentType

public java.lang.String getCurrentContentType(Service service)
Returns the content type from the infoTabe

getSetContentType

public java.lang.String getSetContentType(Service service)
Deprecated. Replaced by getCurrentContentType for version 2.0. This method must internally call getCurrentContentType and will be removed in a future release.


getLoggedOffPageLocation

public java.lang.String getLoggedOffPageLocation()
Deprecated. Will remove in future releases. Use logoff=http://logoff?<location> instead of depending on this method. If an invalid location is given using the preferred method mentioned above, the logedoff page will default to the web server root.

Returns the URL of a location after logout parameter has been returned to the http request. Override this method to hardcode a location for the service. The following is an example of the preferred way to redirect to a page after logout: href="SomeController?logoff=http://www.oracle.com".

getChildren

public java.util.Vector getChildren()
TO BE IMPLEMENTED. Required by Parent as of 8/28/2000 (Luis Amat)
Specified by:
getChildren in interface Parent

processParameters

public void processParameters(Child aChildProcess)
This method does not do anything at the Controller level, but it is required to implement the method in the Parent interface.
Specified by:
processParameters in interface Parent
Parameters:
oracle.cle.process.Child -  

processResults

public void processResults(Child aChildProcess)
This method does not do anything at the Controller level, but it is required to implement the method in the Parent interface.
Specified by:
processResults in interface Parent
Parameters:
oracle.cle.process.Child -  
See Also:
Child

buildTransitionTable

public void buildTransitionTable(TransitionTable aTable)
This method does not do anything at the Controller level, but it is required to implement the method in the Parent interface.
Specified by:
buildTransitionTable in interface Parent
Parameters:
oracle.cle.util.statemachine.TransistionTable -  

getParents

public java.util.Vector getParents()
Returns a Vector of parents of the controller. Always returns null because Controllers have no parents.
Specified by:
getParents in interface Parent
Returns:
java.util.Vector

getParent

public Parent getParent()
Returns the Parent of the controller. Always returns null because a Controller doesn't have a parent.
Returns:
oracle.cle.process.Parent
See Also:
Parent

getName

public final java.lang.String getName()
Returns the serviceName attribute. This must be the same name as the one specified in the serviceName.xml file in the service element's name attribute.
Specified by:
getName in interface Parent

getControllerValue

public java.lang.String getControllerValue(javax.servlet.http.HttpServletRequest request)
Gets the controller info from the url that accessed this service. Override this getControllerValue method if need to obtain the controller value differently

getSSOEnabler

public static PartnerSSOEnabler getSSOEnabler()
Returns the PartnerSSOEnabler object that was initialized in init.

handlePreServiceException

protected oracle.clex.process.controller.PreServiceException handlePreServiceException(oracle.clex.process.controller.PreServiceException preSE)
This method is called for most exceptions that occur before the service.start() in this Controller. Users may extend this to provide custom functionality.

Because Exceptions may be handled by the web container, this Exception is returned so that it may be optionally rethrown or not by the developer. The default implementation of doPost() for HttpServletController, does not rethrow PreServiceExceptions after this method is called.

handlePostServiceException

protected oracle.clex.process.controller.PostServiceException handlePostServiceException(oracle.clex.process.controller.PostServiceException postSE)
This method is called for most exceptions that occur after the service.start() in this Controller. Users may extend this to provide custom functionality.

Because Exceptions may be handled by the web container, this Exception is returned so that it may be optionally rethrown by the developer. The default implementation of doPost() for HttpServletController, does not rethrow PostServiceExceptions after this method is called.

handleUnhandledException

protected java.lang.Exception handleUnhandledException(java.lang.Exception e)
This method is called for any uncaught exceptions that are not handled by handlePreServiceException or handlePostServiceException.

Developers can extend this method to provide custom functionality. Because Exceptions may be handled by the web container, this Exception is returned so that it may be optionally rethrown by the developer. The default implementation of doPost() for HttpServletController, rethrows this Exception after this method is called.

getConcreteService

public Service getConcreteService()
Returns a concrete Service defined by the XML file. The name of the xml file is obtained from the servlet parameter
Specified by:
getConcreteService in interface ServiceController
Returns:
oracle.cle.process.Service

getServiceDescriptorName

public java.lang.String getServiceDescriptorName()
Return the name of the service descriptor file

setServiceDescriptorName

protected void setServiceDescriptorName(java.lang.String aServiceDescriptorName)
Set the name of the service descriptor file

setName

protected void setName(java.lang.String aServiceName)
Set the name of the service

handleJSPResult

protected void handleJSPResult(Service service,
                               javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse response)
                        throws java.io.IOException,
                               CLEException
Handle JSP Result Refactored from HandleResults

handleJSPRedirect

public void handleJSPRedirect(javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response,
                              java.lang.String url)
                       throws java.io.IOException,
                              javax.servlet.ServletException
Handle forwarding to jsp page Refactored from HandleResults so that the PortletController can override it. Oracle Portal R2 does not support forward

handleLogoff

protected void handleLogoff(javax.servlet.http.HttpServletResponse response,
                            java.lang.String logoffLocation)
                     throws java.lang.Exception
Handle logging off (Bug 2601487) Refactored from preServiceStart so that it can be overriden i.e. globalssologoff.


Copyright © 2003 ORACLE Corp. All Rights Reserved.