|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.colle.web.Context
Provides the context of a response to a request. Handles common requests such as getting the operator User object and performing an XSL translation. Created: 21 Dec 2001
Constructor Summary | |
(package private) |
Context(HttpServletRequest pxRequest,
HttpServletResponse pxResponse,
ServletContext pxServletContext,
String psActionParameter,
String psControllerFolder,
String psControllerName,
boolean pbDebug)
Constructs a control manager for a known controller. |
(package private) |
Context(HttpServletRequest pxRequest,
HttpServletResponse pxResponse,
ServletContext pxServletContext,
Transformation pxTransformation,
boolean pbDebug)
Constructs a control manager for a standalone manager. |
Method Summary | |
void |
addDataPath(String psDataPath)
Causes data objects being mapped through this context to include additional information if they are found in the provided data path or higher. |
void |
closeWindow()
Closes the current browser window. |
String |
getActionParameter()
Gets the action parameter that decided which action of a contoller was called. |
Locale |
getLocale()
Returns the locale of the current session if one exists. |
Object |
getOperator()
Returns the operator who is currently logged in making this request. |
HttpServletRequest |
getRequest()
Returns the request. |
HttpServletResponse |
getResponse()
Returns the response. |
org.jdom.Document |
getResponseDocument()
Returns the response document which allows the controller to modify it. |
ServletContext |
getServletContext()
Returns the servlet context. |
Transformation |
getTransformation()
Returns the transformation that is currently set. |
(package private) static void |
init(ServletConfig pxConfig)
|
boolean |
isOperaterSet()
Returns true if a non-null operator has been set with the setOperator method. |
void |
map(org.jdom.Element pxElement,
String psName,
Object pxObject)
Maps the interface into the response document. |
void |
map(String psName,
Object pxObject)
Maps the interface into the root of the response document. |
void |
mapCollection(org.jdom.Element pxElement,
String psName,
Collection pxCollection)
Maps the collection into the response document. |
void |
mapCollection(String psName,
Collection pxCollection)
Maps the collection into the root of the response document. |
void |
redirectToLoginReferrer(String psBackupLocation)
Sends a redirect to the client that sends the client back to the page they requested before they were redirected to the login page. |
void |
setContentType(String psContentType)
Sets the content type of the response. |
void |
setLocale(Locale pxLocale)
Sets the locale for the current user, creating a session if required. |
void |
setOperator(Object pxOperator)
Sets the operator. |
Transformation |
setTransformation(String psTransformation)
Set the transformation that will be eventually used to transform the output to the client. |
void |
transform()
Sends the output to the client. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
Context(HttpServletRequest pxRequest, HttpServletResponse pxResponse, ServletContext pxServletContext, String psActionParameter, String psControllerFolder, String psControllerName, boolean pbDebug)
Context(HttpServletRequest pxRequest, HttpServletResponse pxResponse, ServletContext pxServletContext, Transformation pxTransformation, boolean pbDebug) throws IOException
Method Detail |
static void init(ServletConfig pxConfig)
public void closeWindow() throws IOException
IOException
public HttpServletRequest getRequest()
public HttpServletResponse getResponse()
public ServletContext getServletContext()
public org.jdom.Document getResponseDocument()
public Locale getLocale()
public void setLocale(Locale pxLocale)
public boolean isOperaterSet() throws IOException
IOException
public final Object getOperator() throws IOException
IOException
public void redirectToLoginReferrer(String psBackupLocation) throws IOException
IOException
public void setOperator(Object pxOperator)
pxOperator
- operator object, may be null to log-out the operatorpublic Transformation getTransformation()
public final Transformation setTransformation(String psTransformation) throws IOException
IOException
public void addDataPath(String psDataPath)
psDataPath
- data path to requested data as seen in the response
document.public String getActionParameter()
public void setContentType(String psContentType)
public void map(String psName, Object pxObject)
psName
- name the first element tag should be calledpxObject
- object being mappedpublic void mapCollection(String psName, Collection pxCollection)
psName
- name the first element tag should be calledpxCollection
- collection being mappedpublic void map(org.jdom.Element pxElement, String psName, Object pxObject)
pxElement
- node to map intopsName
- name the first element tag should be calledpxObject
- object being mappedpublic void mapCollection(org.jdom.Element pxElement, String psName, Collection pxCollection)
pxElement
- node to map intopsName
- name the first element tag should be calledpxCollection
- collection being mappedpublic void transform() throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |