org.orbeon.oxf.pipeline.api
Interface ExternalContext

All Superinterfaces:
WebAppExternalContext

public interface ExternalContext
extends WebAppExternalContext

ExternalContext abstracts context, request and response information so that compile-time dependencies on the Servlet API or Portlet API can be removed. It is also possible to use ExternalContext to embed Orbeon Forms and to provide a web-like request/response interface.


Nested Class Summary
static interface ExternalContext.Application
           
static interface ExternalContext.Request
           
static interface ExternalContext.RequestDispatcher
           
static interface ExternalContext.Response
           
static interface ExternalContext.Session
           
 
Field Summary
static int SC_INTERNAL_SERVER_ERROR
           
static int SC_NOT_FOUND
           
static int SC_NOT_MODIFIED
           
static int SC_OK
           
 
Method Summary
 ExternalContext.Application getApplication()
           
 String getEndLoggerString()
           
 ExternalContext.RequestDispatcher getNamedDispatcher(String name)
           
 Object getNativeRequest()
           
 Object getNativeResponse()
           
 Object getNativeSession(boolean flag)
           
 ExternalContext.Request getRequest()
           
 ExternalContext.RequestDispatcher getRequestDispatcher(String path, boolean isContextRelative)
          Return a request dispatcher usable to perform forwards and includes.
 ExternalContext.Response getResponse()
           
 ExternalContext.Session getSession(boolean create)
           
 String getStartLoggerString()
           
 String rewriteServiceURL(String urlString, int rewriteMode)
          Rewrite a service URL.
 
Methods inherited from interface org.orbeon.oxf.pipeline.api.WebAppExternalContext
getAttributesMap, getInitAttributesMap, getNativeContext, getRealPath, log, log
 

Field Detail

SC_OK

static final int SC_OK
See Also:
Constant Field Values

SC_NOT_FOUND

static final int SC_NOT_FOUND
See Also:
Constant Field Values

SC_NOT_MODIFIED

static final int SC_NOT_MODIFIED
See Also:
Constant Field Values

SC_INTERNAL_SERVER_ERROR

static final int SC_INTERNAL_SERVER_ERROR
See Also:
Constant Field Values
Method Detail

getRequestDispatcher

ExternalContext.RequestDispatcher getRequestDispatcher(String path,
                                                       boolean isContextRelative)
Return a request dispatcher usable to perform forwards and includes. NOTE: When isContextRelative is false, assume that the first path element points to the context. E.g. /foo/bar resolves to a context mounted on /foo, and /bar is the resource pointed to in that context.

Parameters:
path - path of the resource (must start with "/")
isContextRelative - if true, path is relative to the current context root, otherwise to the document root
Returns:
RequestDispatcher or null if cannot be found

getNamedDispatcher

ExternalContext.RequestDispatcher getNamedDispatcher(String name)

getRequest

ExternalContext.Request getRequest()

getResponse

ExternalContext.Response getResponse()

getSession

ExternalContext.Session getSession(boolean create)

getApplication

ExternalContext.Application getApplication()

rewriteServiceURL

String rewriteServiceURL(String urlString,
                         int rewriteMode)
Rewrite a service URL. The URL is rewritten against a base URL which is: o specified externally or o the incoming request if not specified externally

Parameters:
urlString - URL to rewrite
rewriteMode - rewrite mode
Returns:
rewritten URL

getStartLoggerString

String getStartLoggerString()

getEndLoggerString

String getEndLoggerString()

getNativeRequest

Object getNativeRequest()

getNativeResponse

Object getNativeResponse()

getNativeSession

Object getNativeSession(boolean flag)