|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.n52.wps.server.request.Request
public abstract class Request
The client requests some operation from the server. The request generates a unique reference based on the client, time and a count. Not secure! Upcoming references are easily guessed or altered.
java.rmi.server.UID| Field Summary | |
|---|---|
protected org.w3c.dom.Document |
doc
|
protected java.util.UUID |
id
|
protected static org.apache.log4j.Logger |
LOGGER
|
protected org.apache.commons.collections.map.CaseInsensitiveMap |
map
|
static java.lang.String |
SUPPORTED_VERSION
|
| Constructor Summary | |
|---|---|
Request(org.apache.commons.collections.map.CaseInsensitiveMap map)
Create a Request based on a CaseInsensitiveMap as input (HTTP GET) |
|
Request(org.w3c.dom.Document doc)
Create a Request based on a Document as input (HTTP POST) |
|
| Method Summary | |
|---|---|
static java.lang.String |
accumulateString(java.lang.String[] strings)
Accumulates the Strings in an array, separated by ", " (without quotes). |
abstract Response |
call()
After creation a Request is handled. |
abstract java.lang.Object |
getAttachedResult()
|
protected org.w3c.dom.Document |
getDocument()
Returns the user input in Document form |
protected org.apache.commons.collections.map.CaseInsensitiveMap |
getMap()
Returns the user input in Map form |
protected java.lang.String[] |
getMapArray(java.lang.String key,
boolean required)
Retrieve an array of values from the client-input-map with a lookup-key |
static java.lang.String[] |
getMapArray(java.lang.String key,
org.apache.commons.collections.map.CaseInsensitiveMap map,
boolean required)
Retrieve an array of values from an input-map with a lookup-key |
protected java.lang.String |
getMapValue(java.lang.String key,
boolean required)
Retrieve a value from the client-input-map with a lookup-key |
static java.lang.String |
getMapValue(java.lang.String key,
org.apache.commons.collections.map.CaseInsensitiveMap map,
boolean required)
Retrieve a value from an input-map with a lookup-key |
protected java.lang.String[] |
getRequestedVersions(boolean mandatory)
Returns the version that the client requested. |
java.util.UUID |
getUniqueId()
|
boolean |
requireVersion(java.lang.String version,
boolean mandatory)
The process (request) on the server could require a specific version on the client |
abstract boolean |
validate()
There should be some validation required on the (input of the) clients Request. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.apache.commons.collections.map.CaseInsensitiveMap map
protected org.w3c.dom.Document doc
protected static org.apache.log4j.Logger LOGGER
protected java.util.UUID id
public static final java.lang.String SUPPORTED_VERSION
| Constructor Detail |
|---|
public Request(org.apache.commons.collections.map.CaseInsensitiveMap map)
throws ExceptionReport
map - The Map which holds the client input.
ExceptionReport
public Request(org.w3c.dom.Document doc)
throws ExceptionReport
doc - The Document which holds the client input.
ExceptionReport| Method Detail |
|---|
protected org.w3c.dom.Document getDocument()
protected org.apache.commons.collections.map.CaseInsensitiveMap getMap()
public static java.lang.String getMapValue(java.lang.String key,
org.apache.commons.collections.map.CaseInsensitiveMap map,
boolean required)
throws ExceptionReport
key - The lookup-keymap - The input-map to look inrequired - If the key-value pair must be in the map.
ExceptionReport
public static java.lang.String[] getMapArray(java.lang.String key,
org.apache.commons.collections.map.CaseInsensitiveMap map,
boolean required)
throws ExceptionReport
key - The lookup-keymap - The input-map to look inrequired - If the key-value pair must be in the map.
ExceptionReport
protected java.lang.String getMapValue(java.lang.String key,
boolean required)
throws ExceptionReport
The - lookup-key
ExceptionReport
protected java.lang.String[] getMapArray(java.lang.String key,
boolean required)
throws ExceptionReport
The - lookup-key
ExceptionReport
protected java.lang.String[] getRequestedVersions(boolean mandatory)
throws ExceptionReport
ExceptionReport
public boolean requireVersion(java.lang.String version,
boolean mandatory)
throws ExceptionReport
version - The version that is required on the client
ExceptionReportpublic static java.lang.String accumulateString(java.lang.String[] strings)
strings - The array to accumulate
public java.util.UUID getUniqueId()
public abstract java.lang.Object getAttachedResult()
public abstract Response call()
throws ExceptionReport
call in interface java.util.concurrent.Callable<Response>ExceptionReportCallable.call()
public abstract boolean validate()
throws ExceptionReport
ExceptionReport
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||