|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.sree.RepletRequest
public class RepletRequest
The RepletRequest holds the report request parameter values. If is created by the viewer to pass into a replet during report creation or customization. A replet can access the parameter values by calling one of the getter method.
Each request has a request name. It could not one of the pre-defined request names, such as CREATE or CUSTOMIZE. It could also be a form name if a request is submitted from a embedded form. It is up to the replet to check for request name to take appropriate actions.
If replet is running in a web environment, the request and response object can be retrieved using the special SERVICE_REQUEST and SERVICE_RESPONSE parameter name.
| Field Summary | |
|---|---|
static String |
ADHOC
Adhoc request name. |
static String |
CREATE
Default creation request name (first time a replet is created). |
static String |
CUSTOMIZE
Customization request name. |
static String |
DATE_FORMAT
The pattern used to format and parse date values. |
static String |
DATE_TIME_FORMAT
The pattern used to format and parse date/time values. |
static String |
EMPTY
empty request name. |
static String |
HTTP_REQUEST
Deprecated. use SERVICE_REQUEST. |
static String |
HTTP_RESPONSE
Deprecated. use SERVICE_RESPONSE. |
static String |
INIT
Initialization request name. |
static String |
SERVICE_REQUEST
The name for the ServiceRequest parameter. |
static String |
SERVICE_RESPONSE
The name for the ServiceResponse parameter. |
static String |
TIME_FORMAT
The pattern used to format and parse time values. |
| Constructor Summary | |
|---|---|
RepletRequest(String name)
Create an empty request. |
|
RepletRequest(String name,
Map pairs)
Create a request from the values in a hastable. |
|
| Method Summary | |
|---|---|
String |
byteDecode(String encString)
Convert the encoded string to the original unencoded string. |
String |
byteEncode(String source)
Encode non-ascii characters to unicode enclosed in '[]'. |
Object |
clone()
|
RepletRequest |
clone(String newname)
Create a duplicate request with a new request name. |
boolean |
contains(String name)
Check if the named value is set in the request. |
boolean |
equals(Object obj)
Compare two requests to see if they contain the same parameters. |
Object[] |
getArray(String name)
Get the parameter value as an array. |
boolean |
getBoolean(String name)
Get the value of a parameter as a boolean. |
Date |
getDate(String name)
Get a parameter value as a date. |
double |
getDouble(String name)
Get the value of a parameter as an double. |
Object |
getHint(String name)
Get a hint on how to process a report. |
int |
getInt(String name)
Get the value of a parameter as an integer. |
long |
getLong(String name)
Get the value of a parameter as a long. |
Object |
getParameter(String name)
Get the value of a parameter. |
Object |
getParameter(String name,
Object def)
Get the value of a parameter. |
int |
getParameterCount()
Get the number of parameters. |
Enumeration |
getParameterNames()
Get the names of all parameters |
static String |
getParameterValueDataType(Object val)
Get data type of parameter value. |
static String |
getParameterValueString(Object val)
Get parameter value string. |
String |
getRequestName()
Get the request name. |
String |
getString(String name)
Get the value of a parameter as a string. |
Date |
getTime(String name)
Get a parameter value as a time. |
boolean |
isEncoding()
Check if this object should encoded when writing. |
boolean |
isInternalParameter(String name)
Check if a parameter is kept in the session of the ServiceRequest parameter. |
void |
parseXML(Element req)
Parse the XML element that contains info about this request. |
void |
remove(String name)
Remove a parameter from the request. |
void |
removeAll()
Remove all existing parameters. |
void |
removeParameters(RepletRequest req)
Remove parameters from another replet request. |
void |
setEncoding(boolean encoding)
Set encoding flag. |
void |
setHint(String name,
Object value)
Set a hint. |
void |
setParameter(String name,
Object val)
Set the value of a parameter. |
void |
setParameters(RepletRequest req)
Set parameters from another replet request. |
void |
setRequestName(String name)
Set the request name. |
String |
toString()
To string. |
void |
writeXML(PrintWriter writer)
Write the request to a xml file. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String INIT
public static final String CREATE
public static final String ADHOC
public static final String CUSTOMIZE
public static final String EMPTY
public static final String HTTP_REQUEST
public static final String HTTP_RESPONSE
public static final String SERVICE_REQUEST
ServiceRequest,
Constant Field Valuespublic static final String SERVICE_RESPONSE
ServiceResponse,
Constant Field Valuespublic static final String DATE_FORMAT
public static final String TIME_FORMAT
public static final String DATE_TIME_FORMAT
| Constructor Detail |
|---|
public RepletRequest(String name)
name - request name.
public RepletRequest(String name,
Map pairs)
name - request name.pairs - paramter values.| Method Detail |
|---|
public RepletRequest clone(String newname)
newname - new request name.
public String getRequestName()
public void setRequestName(String name)
public Object getParameter(String name)
name - parameter name.
public Object getParameter(String name,
Object def)
name - parameter name.def - default value if the parameter is null.
public boolean getBoolean(String name)
name - name of the parameter.
public String getString(String name)
name - parameter name.
public int getInt(String name)
name - parameter name.
public long getLong(String name)
name - parameter name.
public double getDouble(String name)
name - parameter name.
public Object[] getArray(String name)
name - parameter name.
public Date getDate(String name)
name - parameter name.
public Date getTime(String name)
name - parameter name.
public int getParameterCount()
public Enumeration getParameterNames()
public boolean isInternalParameter(String name)
public void setParameter(String name,
Object val)
name - parameter name.val - parameter value.public void setParameters(RepletRequest req)
The method only accept not contained parameters.
req - the specified replet requestpublic void removeParameters(RepletRequest req)
req - the specified replet requestpublic void remove(String name)
name - parameter name.public boolean contains(String name)
public void removeAll()
public void setHint(String name,
Object value)
public Object getHint(String name)
public String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic Object clone()
clone in class Object
public void parseXML(Element req)
throws Exception
parseXML in interface inetsoft.util.XMLSerializableExceptionpublic void writeXML(PrintWriter writer)
writeXML in interface inetsoft.util.XMLSerializablewriter - the PrintWriterpublic String byteEncode(String source)
byteEncode in interface inetsoft.sree.internal.HttpXMLSerializablesource - source string.
public String byteDecode(String encString)
byteDecode in interface inetsoft.sree.internal.HttpXMLSerializableencString - a string encoded using the byteEncode method.
public boolean isEncoding()
isEncoding in interface inetsoft.sree.internal.HttpXMLSerializabletrue if should encoded, false otherwise.public void setEncoding(boolean encoding)
setEncoding in interface inetsoft.sree.internal.HttpXMLSerializableencoding - true to encode.public static String getParameterValueDataType(Object val)
public static String getParameterValueString(Object val)
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||