java.lang.Objectorg.objectweb.telosys.common.TelosysObject
org.objectweb.telosys.rpl.GenericResponse
The abstract/generic response class used as super class for "Screen Service Response" and "Screen Action Response"
Field Summary | |
static int |
ERRORS
|
static int |
EXCEPTIONS
|
static int |
MESSAGES
|
static int |
REDIRECTION
|
static int |
RETURN
|
static int |
VALUES
|
Constructor Summary | |
GenericResponse(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
Constructs a new ServiceResponse object |
Method Summary | |
void |
addError(ScreenError error)
Adds an error in the list |
void |
addException(java.lang.Throwable th)
Add an exception to the exceptions list |
void |
addMessage(ScreenMessage message)
Adds a message in the list |
void |
expose(java.lang.String sName,
java.lang.Object obj)
Exposes an object in the standard request scope for future use in a view ( the object is stored as an attribute in the HttpServletRequest ) |
void |
forceRedirect(GenericURI uri)
Force the client-side (the browser) to redirect to the given generic URI ( replace the current screen by the given object URL ) |
void |
forceRedirect(java.lang.String sURL)
Force the client-side (the browser) to redirect to the given URL ( replace the current screen by the given URL ) |
ScreenError |
getError(int index)
Returns the error associated with the given index |
java.lang.Throwable |
getException(int index)
Returns the exception associated with the given id |
javax.servlet.http.HttpServletRequest |
getHttpRequest()
Returns the "HttpServletRequest" object |
javax.servlet.http.HttpServletResponse |
getHttpResponse()
Returns the "HttpServletResponse" object |
ScreenMessage |
getMessage(int index)
Returns the message associated with the given index |
int |
getNumberOfErrors()
Returns the number of errors |
int |
getNumberOfExceptions()
Returns the number of exception(s) |
int |
getNumberOfMessages()
Returns the number of messages |
int |
getNumberOfValues()
Returns the number of values stored in the response |
java.lang.String |
getRedirection()
Returns the redirection URL set by 'forceRedirect' or null if none |
int |
getReturnCode()
Returns the "return code" |
java.lang.String |
getReturnMessage()
Returns the main "return message" |
java.lang.String |
getValue(java.lang.String sName)
Returns the response value associated with the given name |
java.util.Enumeration |
getValueNames()
Returns the values names |
void |
setReturnCode(int iCode)
Set the "return code" |
void |
setReturnMessage(java.lang.String sMsg)
Set the main "return message" |
void |
setValue(java.lang.String sName,
boolean bValue)
Set a 'boolean' value in the response |
void |
setValue(java.lang.String sName,
byte byValue)
Set a 'byte' value in the response |
void |
setValue(java.lang.String sName,
double dValue)
Set a 'double' value in the response |
void |
setValue(java.lang.String sName,
float fValue)
Set a 'float' value in the response |
void |
setValue(java.lang.String sName,
int iValue)
Set an 'int' value in the response |
void |
setValue(java.lang.String sName,
long lValue)
Set a 'long' value in the response |
void |
setValue(java.lang.String sName,
short shValue)
Set a 'short' value in the response |
void |
setValue(java.lang.String sName,
java.lang.String sValue)
Set a 'String' value in the response (do nothing if the name or the value is null) |
java.lang.String |
toString(int iFlag)
Specific "toString" method designed to return then string part wanted |
Methods inherited from class org.objectweb.telosys.common.TelosysObject |
error, error, error, getFlagTrace, info, setFlagTrace, trace, warn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int RETURN
public static final int REDIRECTION
public static final int ERRORS
public static final int EXCEPTIONS
public static final int MESSAGES
public static final int VALUES
Constructor Detail |
public GenericResponse(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
httpRequest
- httpResponse
- Method Detail |
public javax.servlet.http.HttpServletRequest getHttpRequest()
public javax.servlet.http.HttpServletResponse getHttpResponse()
public void setReturnCode(int iCode)
iCode
- public int getReturnCode()
public void setReturnMessage(java.lang.String sMsg)
sMsg
- public java.lang.String getReturnMessage()
public void addMessage(ScreenMessage message)
message
- public int getNumberOfMessages()
public ScreenMessage getMessage(int index)
index
-
public void addError(ScreenError error)
error
- public int getNumberOfErrors()
public ScreenError getError(int index)
index
-
public void addException(java.lang.Throwable th)
th
- public int getNumberOfExceptions()
public java.lang.Throwable getException(int index)
index
-
public void setValue(java.lang.String sName, java.lang.String sValue)
sName
- sValue
- public void setValue(java.lang.String sName, int iValue)
sName
- iValue
- public void setValue(java.lang.String sName, long lValue)
sName
- lValue
- public void setValue(java.lang.String sName, short shValue)
sName
- shValue
- public void setValue(java.lang.String sName, byte byValue)
sName
- byValue
- public void setValue(java.lang.String sName, float fValue)
sName
- fValue
- public void setValue(java.lang.String sName, double dValue)
sName
- dValue
- public void setValue(java.lang.String sName, boolean bValue)
sName
- bValue
- public java.lang.String getValue(java.lang.String sName)
sName
-
public int getNumberOfValues()
public java.util.Enumeration getValueNames()
public void expose(java.lang.String sName, java.lang.Object obj)
sName
- obj
- public void forceRedirect(java.lang.String sURL)
sURL
- public void forceRedirect(GenericURI uri)
uri
- public java.lang.String getRedirection()
public java.lang.String toString(int iFlag)
iFlag
-