|
|||||||||
| Home >> All >> org >> javahispano >> canyamo >> services >> [ workdata overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.javahispano.canyamo.services.workdata
Class WorkDataImpl

java.lang.Objectorg.javahispano.canyamo.services.workdata.WorkDataImpl
- All Implemented Interfaces:
- org.javahispano.canyamo.core.WorkData
- public class WorkDataImpl
- extends java.lang.Object
- implements org.javahispano.canyamo.core.WorkData
- extends java.lang.Object
This class encapsulates an user's request + response to be used along the framework
- Version:
| Field Summary | |
protected java.lang.String |
forward
Description of the Field |
protected java.io.Writer |
out
Output Writer Mainly JSPWriter or Response.outputStream |
protected javax.servlet.http.HttpServletRequest |
request
User's HTTP Request |
protected javax.servlet.http.HttpServletResponse |
response
HTTPresponse to user |
| Constructor Summary | |
WorkDataImpl(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Constructor for the CanyamoRequest object |
|
| Method Summary | |
void |
addCookie(java.lang.String key,
java.lang.String value)
Adds a cookie to the response to user |
void |
addCookie(java.lang.String key,
java.lang.String value,
int age)
Adds a cookie to the response to user |
java.lang.String |
encodeURL(java.lang.String url)
Encodes an URL to add session info if cookies are not allowed |
void |
forward(java.lang.String url)
Forwards the framework to another action/url |
java.util.Map |
getAllParameters()
Gets all Parameters of user's request If a parameter has a single value, it comes as String, if a parameter has many values (case multiselect HTML list), it returns a list of Strings. |
java.lang.Object |
getAttribute(java.lang.String key)
Gets an attribute of this work-data |
java.lang.String |
getCookieValue(java.lang.String key)
Gets the value of the given cookie, if present |
java.lang.String |
getForward()
Retrieves the URL to which the framework should be redirected |
java.io.Writer |
getOutputWriter()
Gets response's outputWriter |
java.lang.String |
getParameter(java.lang.String key)
Gets one parameter of user's request |
java.lang.String |
getPrincipalName()
Returns the name of the user authenticate with Container Manager Authentication |
java.lang.String |
getServletPath()
Gets the path of the servlet for user's request Actually it returns action's name, since Servlet has a mapping to *.action |
javax.servlet.http.HttpServletRequest |
getServletRequest()
Gets the servletRequest attribute of the WorkDataImpl object |
javax.servlet.http.HttpServletResponse |
getServletResponse()
Gets the servletResponse attribute of the WorkDataImpl object |
java.lang.Object |
getSessionAttribute(java.lang.String key)
Gets an attribute stored in user' session |
java.lang.String |
getURL()
Gets the URL of user's request |
org.javahispano.canyamo.services.user.User |
getUser()
Returns the user for the actual request |
void |
invalidateSession()
Invalidates user's session |
boolean |
isDefaultUser()
Says if the actual user is a registered user or an anonymous one |
void |
redirect(java.lang.String url)
Redirects the framework to another action/url |
void |
setAttribute(java.lang.String key,
java.lang.Object value)
Sets an request attribute |
void |
setOutputWriter(java.io.Writer out)
Sets the outputWriter attribute of the WorkDataImpl object |
void |
setSessionAttribute(java.lang.String key,
java.lang.Object value)
Sets an attribute in user' session |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
request
protected javax.servlet.http.HttpServletRequest request
- User's HTTP Request
response
protected javax.servlet.http.HttpServletResponse response
- HTTPresponse to user
forward
protected java.lang.String forward
- Description of the Field
out
protected java.io.Writer out
- Output Writer
Mainly JSPWriter or Response.outputStream
| Constructor Detail |
WorkDataImpl
public WorkDataImpl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
- Constructor for the CanyamoRequest object
- Since:
| Method Detail |
setSessionAttribute
public void setSessionAttribute(java.lang.String key, java.lang.Object value)
- Sets an attribute in user' session
- Specified by:
setSessionAttributein interfaceorg.javahispano.canyamo.core.WorkData
setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)
- Sets an request attribute
- Specified by:
setAttributein interfaceorg.javahispano.canyamo.core.WorkData
setOutputWriter
public void setOutputWriter(java.io.Writer out)
- Sets the outputWriter attribute of the WorkDataImpl object
getSessionAttribute
public java.lang.Object getSessionAttribute(java.lang.String key)
- Gets an attribute stored in user' session
- Specified by:
getSessionAttributein interfaceorg.javahispano.canyamo.core.WorkData
getCookieValue
public java.lang.String getCookieValue(java.lang.String key)
- Gets the value of the given cookie, if present
- Specified by:
getCookieValuein interfaceorg.javahispano.canyamo.core.WorkData
getURL
public java.lang.String getURL()
- Gets the URL of user's request
- Specified by:
getURLin interfaceorg.javahispano.canyamo.core.WorkData
getServletPath
public java.lang.String getServletPath()
- Gets the path of the servlet for user's request
Actually it returns action's name, since Servlet has a mapping to *.action- Specified by:
getServletPathin interfaceorg.javahispano.canyamo.core.WorkData
getParameter
public java.lang.String getParameter(java.lang.String key)
- Gets one parameter of user's request
- Specified by:
getParameterin interfaceorg.javahispano.canyamo.core.WorkData
getAllParameters
public java.util.Map getAllParameters()
- Gets all Parameters of user's request
If a parameter has a single value, it comes as String, if a parameter has many values (case multiselect HTML list), it returns a list of Strings.- Specified by:
getAllParametersin interfaceorg.javahispano.canyamo.core.WorkData
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
- Gets an attribute of this work-data
- Specified by:
getAttributein interfaceorg.javahispano.canyamo.core.WorkData
getUser
public org.javahispano.canyamo.services.user.User getUser()
- Returns the user for the actual request
- Specified by:
getUserin interfaceorg.javahispano.canyamo.core.WorkData
isDefaultUser
public boolean isDefaultUser()
- Says if the actual user is a registered user or an anonymous one
- Specified by:
isDefaultUserin interfaceorg.javahispano.canyamo.core.WorkData
getServletRequest
public javax.servlet.http.HttpServletRequest getServletRequest()
- Gets the servletRequest attribute of the WorkDataImpl object
getServletResponse
public javax.servlet.http.HttpServletResponse getServletResponse()
- Gets the servletResponse attribute of the WorkDataImpl object
getOutputWriter
public java.io.Writer getOutputWriter() throws java.io.IOException
- Gets response's outputWriter
- Specified by:
getOutputWriterin interfaceorg.javahispano.canyamo.core.WorkData
getPrincipalName
public java.lang.String getPrincipalName()
- Returns the name of the user authenticate with Container Manager
Authentication
- Specified by:
getPrincipalNamein interfaceorg.javahispano.canyamo.core.WorkData
getForward
public java.lang.String getForward()
- Retrieves the URL to which the framework should be redirected
- Specified by:
getForwardin interfaceorg.javahispano.canyamo.core.WorkData
invalidateSession
public void invalidateSession()
- Invalidates user's session
- Specified by:
invalidateSessionin interfaceorg.javahispano.canyamo.core.WorkData
addCookie
public void addCookie(java.lang.String key, java.lang.String value)
- Adds a cookie to the response to user
- Specified by:
addCookiein interfaceorg.javahispano.canyamo.core.WorkData
addCookie
public void addCookie(java.lang.String key, java.lang.String value, int age)
- Adds a cookie to the response to user
- Specified by:
addCookiein interfaceorg.javahispano.canyamo.core.WorkData
redirect
public void redirect(java.lang.String url)
- Redirects the framework to another action/url
- Specified by:
redirectin interfaceorg.javahispano.canyamo.core.WorkData
forward
public void forward(java.lang.String url)
- Forwards the framework to another action/url
- Specified by:
forwardin interfaceorg.javahispano.canyamo.core.WorkData
encodeURL
public java.lang.String encodeURL(java.lang.String url)
- Encodes an URL to add session info if cookies are not allowed
- Specified by:
encodeURLin interfaceorg.javahispano.canyamo.core.WorkData
|
|||||||||
| Home >> All >> org >> javahispano >> canyamo >> services >> [ workdata overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.javahispano.canyamo.services.workdata.WorkDataImpl