|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.wms.client.GenericRequest
public class GenericRequest
All WMS requests support the HTTP GET method. The requests are basically key/value pairs. The GenericRequest class is a helper class. It uses a java.util.Map object internally handling the request.
Field Summary | |
---|---|
protected Map<String,String> |
request
The Map handling the request key/value pairs. |
Constructor Summary | |
---|---|
GenericRequest()
Instantiates an empty object of GenericRequest. |
|
GenericRequest(Map<String,String> request)
Instantiates an object of GenericRequest with the given request. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Compares the specified object with this instance for equality. |
Map<String,String> |
getRequestParameters()
Returns the Map object holding all the key/values settings. |
int |
hashCode()
Returns the hash code of the request object. |
void |
put(String key,
Boolean value,
boolean mandatory)
Creates a request parameter by the given key value pair. |
void |
put(String key,
Color value,
boolean mandatory)
Creates a request parameter by the given key value pair. |
void |
put(String key,
int value)
Creates a request parameter by the given key value pair. |
void |
put(String key,
String value,
boolean mandatory)
Creates a request parameter by the given key value pair. |
void |
setRequestParameters(Map<String,String> request)
Replaces the request by the given one. |
String |
toRequestString()
Creates a request String. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map<String,String> request
Constructor Detail |
---|
public GenericRequest()
public GenericRequest(Map<String,String> request)
request
- all existed key value pairs will be inherited.Method Detail |
---|
public Map<String,String> getRequestParameters()
public void put(String key, Boolean value, boolean mandatory)
null
and
mandatory == true
, the value will be set as "" instead of null. If the value is null
and mandatory == false
, the key/value will be omitted.
key
- the key of the request parameter.value
- the value of the parameter, which can be null.mandatory
- set to true if the parameter is mandatory in the request.public void put(String key, Color value, boolean mandatory)
null
and
mandatory == true
, the value will be set as "" instead of null. If the value is null
and mandatory == false
, the key/value will be omitted.
key
- the key of the request parameter.value
- the value of the parameter, which can be null.mandatory
- set to true if the parameter is mandatory in the request.public void put(String key, int value)
null
and
mandatory == true
, the value will be set as "" instead of null. If the value is null
and mandatory == false
, the key/value will be omitted.
key
- the key of the request parameter.value
- the value of the parameter.public void put(String key, String value, boolean mandatory)
null
and
mandatory == true
, the value will be set as "" instead of null. If the value is null
and mandatory == false
, the key/value will be omitted.
key
- the key of the request parameter.value
- the value of the parameter, which can be null.mandatory
- set to true if the parameter is mandatory in the request.public void setRequestParameters(Map<String,String> request)
request
- a Map to replace current request.public String toRequestString()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
obj
- object to be compared for equality with this instance.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |