pl.psnc.dl.ege.webapp.request
Class RequestResolver

java.lang.Object
  extended by pl.psnc.dl.ege.webapp.request.RequestResolver
Direct Known Subclasses:
ConversionRequestResolver, ValidationRequestResolver

public abstract class RequestResolver
extends java.lang.Object

Abstract base class for resolving request for WS operation.

Author:
mariuszs

Field Summary
static java.lang.String COLON
           
static java.lang.String COMMA
           
protected  java.lang.Object data
           
static java.lang.String DUO_UNDERSCORE
           
protected  Method method
           
protected  OperationId operation
           
protected  javax.servlet.http.HttpServletRequest request
           
static java.lang.String SEMICOLON
           
static java.lang.String SLASH
           
static java.lang.String SPLITTER
           
static java.lang.String UNDERSCORE
           
 
Constructor Summary
RequestResolver()
           
 
Method Summary
 DataType decodeDataType(java.lang.String uriPart)
          Decodes URI part into data type.
 java.lang.String encodeDataType(DataType dataType)
          Encodes specified data type into URI proper form.
 java.lang.Object getData()
          Returns decoded operation data (if it is needed), e.g. data types.
abstract  java.lang.String getLocale()
          Should return local id of request.
 OperationId getOperationId()
          Properly formed request should inform about operation to perform.
 javax.servlet.http.HttpServletRequest getRequest()
          Returns reference to request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNDERSCORE

public static final java.lang.String UNDERSCORE
See Also:
Constant Field Values

DUO_UNDERSCORE

public static final java.lang.String DUO_UNDERSCORE
See Also:
Constant Field Values

COLON

public static final java.lang.String COLON
See Also:
Constant Field Values

SPLITTER

public static final java.lang.String SPLITTER
See Also:
Constant Field Values

SLASH

public static final java.lang.String SLASH
See Also:
Constant Field Values

COMMA

public static final java.lang.String COMMA
See Also:
Constant Field Values

SEMICOLON

public static final java.lang.String SEMICOLON
See Also:
Constant Field Values

method

protected Method method

request

protected javax.servlet.http.HttpServletRequest request

operation

protected OperationId operation

data

protected java.lang.Object data
Constructor Detail

RequestResolver

public RequestResolver()
Method Detail

getOperationId

public OperationId getOperationId()
Properly formed request should inform about operation to perform.
E.g. operation of conversion or operation of listing all available validations.

Returns:
operation id

getData

public java.lang.Object getData()
Returns decoded operation data (if it is needed), e.g. data types. Returned 'Object' should be casted into expected type.

Returns:
data

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
Returns reference to request.

Returns:

getLocale

public abstract java.lang.String getLocale()
Should return local id of request.

Returns:

encodeDataType

public java.lang.String encodeDataType(DataType dataType)
Encodes specified data type into URI proper form. Encoder uses 'UTF-8'. Encoded data type syntax is -

[format]:[mime_part1]:[mime_part2]

Parameters:
dataType -
Returns:

decodeDataType

public DataType decodeDataType(java.lang.String uriPart)
Decodes URI part into data type. Encoded data type syntax is -

[format]:[mime_part1]:[mime_part2]

Parameters:
uriPart -
Returns:
decoded data type


Copyright © 2010. All Rights Reserved.