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.
SC_OK
public static final int SC_OK
- See Also:
- Constant Field Values
SC_NOT_FOUND
public static final int SC_NOT_FOUND
- See Also:
- Constant Field Values
SC_NOT_MODIFIED
public static final int SC_NOT_MODIFIED
- See Also:
- Constant Field Values
SC_INTERNAL_SERVER_ERROR
public static final int SC_INTERNAL_SERVER_ERROR
- See Also:
- Constant Field Values
getRequestDispatcher
public 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
public ExternalContext.RequestDispatcher getNamedDispatcher(String name)
getRequest
public ExternalContext.Request getRequest()
getResponse
public ExternalContext.Response getResponse()
getSession
public ExternalContext.Session getSession(boolean create)
getApplication
public ExternalContext.Application getApplication()
rewriteServiceURL
public String rewriteServiceURL(String urlString,
boolean forceAbsolute)
- 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 rewriteforceAbsolute
-
- Returns:
- rewritten URL
getStartLoggerString
public String getStartLoggerString()
getEndLoggerString
public String getEndLoggerString()
getNativeRequest
public Object getNativeRequest()
getNativeResponse
public Object getNativeResponse()
getNativeSession
public Object getNativeSession(boolean flag)