Skip navigation links

Oracle® WebCenter Content Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-03


oracle.stellent.wcm.client
Class RequestContext

java.lang.Object
  extended by oracle.stellent.wcm.client.RequestContext

Direct Known Subclasses:
ScriptableRequestContext, ServletRequestContext, VelocityRequestContext

public abstract class RequestContext
extends java.lang.Object

Holds objects for the context in the application server.


Constructor Summary
protected RequestContext()
           

 

Method Summary
 void forward(java.lang.String path, java.util.Map<java.lang.String,java.lang.Object> objects)
          Forward a resource into the current request.
abstract  java.lang.Object getAttribute(java.lang.String name)
          Retrieve an attribute value
abstract  java.util.Set<java.lang.String> getAttributeNames()
          Retrieve the attribute names for the given scope
abstract  java.lang.String getContextPath()
           
 java.lang.String getParameter(java.lang.String name)
          Retrieve a parameter value by name
abstract  java.util.Map<java.lang.String,java.lang.String> getParameters()
           
abstract  java.lang.String getRequestPath()
           
 SiteContext getSiteContext()
           
abstract  java.security.Principal getUserPrincipal()
           
abstract  java.io.Writer getWriter()
           
 void include(java.lang.String path, java.util.Map<java.lang.String,java.lang.Object> objects)
          Include a resource into the current request.
protected  void process(java.lang.String path, java.util.Map<java.lang.String,java.lang.Object> objects, boolean forward)
          Forward a resource into the current request.
protected abstract  void processImpl(java.lang.String path, boolean forward)
          Execute the path
abstract  void sendRedirect(java.lang.String path)
          Send a redirect
abstract  void setAttribute(java.lang.String name, java.lang.Object value)
          Set an attribute value by name
abstract  void setHeader(java.lang.String name, java.lang.String value)
          Set a response header
 void setSiteContext(SiteContext siteContext)
          Set the site context on this request
protected  java.util.Map<java.lang.String,java.lang.Object> swapAttributes(java.util.Map<java.lang.String,java.lang.Object> newAttrMap, boolean returnOld)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

RequestContext

protected RequestContext()

Method Detail

getWriter

public abstract java.io.Writer getWriter()
                                  throws java.io.IOException
Returns:
the writer for the given context
Throws:
java.io.IOException

setAttribute

public abstract void setAttribute(java.lang.String name,
                                  java.lang.Object value)
Set an attribute value by name
Parameters:
name - the name
value - the value (null to remove)

getAttribute

public abstract java.lang.Object getAttribute(java.lang.String name)
Retrieve an attribute value
Parameters:
name - the name
Returns:
the value or null if not found

getAttributeNames

public abstract java.util.Set<java.lang.String> getAttributeNames()
Retrieve the attribute names for the given scope
Returns:
the set of attribute names

getParameters

public abstract java.util.Map<java.lang.String,java.lang.String> getParameters()
Returns:
a map of all the request parameters

getContextPath

public abstract java.lang.String getContextPath()
Returns:
the context path all requests are rooted under
See Also:
HttpServletRequest.getContextPath()

getRequestPath

public abstract java.lang.String getRequestPath()
Returns:
the path of the request

getUserPrincipal

public abstract java.security.Principal getUserPrincipal()
Returns:
the security principal of the current user

sendRedirect

public abstract void sendRedirect(java.lang.String path)
                           throws java.io.IOException
Send a redirect
Parameters:
path - the path to redirect
Throws:
java.io.IOException

setHeader

public abstract void setHeader(java.lang.String name,
                               java.lang.String value)
Set a response header
Parameters:
name - the name
value - the value

getSiteContext

public SiteContext getSiteContext()
Returns:
the site context for this request

setSiteContext

public void setSiteContext(SiteContext siteContext)
Set the site context on this request
Parameters:
siteContext - the site context

include

public void include(java.lang.String path,
                    java.util.Map<java.lang.String,java.lang.Object> objects)
             throws ApplicationException,
                    java.io.IOException
Include a resource into the current request. Places the given objects into the request context before evaluation and restores the request after evaluation.
Parameters:
path - the path
objects - the objects, may be null
Throws:
ApplicationException
java.io.IOException

forward

public void forward(java.lang.String path,
                    java.util.Map<java.lang.String,java.lang.Object> objects)
             throws ApplicationException,
                    java.io.IOException
Forward a resource into the current request. Places the given objects into the request context before evaluation and restores the request after evaluation.
Parameters:
path - the path
objects - the objects, may be null
Throws:
ApplicationException
java.io.IOException

getParameter

public java.lang.String getParameter(java.lang.String name)
Retrieve a parameter value by name
Parameters:
name - the name
Returns:
the parameter value
See Also:
ServletRequest.getParameter(String)

process

protected void process(java.lang.String path,
                       java.util.Map<java.lang.String,java.lang.Object> objects,
                       boolean forward)
                throws ApplicationException,
                       java.io.IOException
Forward a resource into the current request. Places the given objects into the request context before evaluation and restores the request after evaluation.
Parameters:
path - the path
objects - the objects, may be null
forward - true to forward, false to include
Throws:
ApplicationException
java.io.IOException

swapAttributes

protected java.util.Map<java.lang.String,java.lang.Object> swapAttributes(java.util.Map<java.lang.String,java.lang.Object> newAttrMap,
                                                                          boolean returnOld)

processImpl

protected abstract void processImpl(java.lang.String path,
                                    boolean forward)
                             throws java.lang.Exception
Execute the path
Parameters:
path - the web application page
forward - true to forward, false to include
Throws:
java.lang.Exception

Skip navigation links

Oracle® WebCenter Content Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-03


Copyright © 2010, 2011, Oracle and/or its affiliates. All rights reserved.