PageMixer API - 3.1

jp.ne.dti.lares.foozy.pagemixer.servlet
Class RequestMethodKey

java.lang.Object
  |
  +--jp.ne.dti.lares.foozy.pagemixer.servlet.RequestMethodKey
All Implemented Interfaces:
ServletConsumerContext.KeyCommand

public abstract class RequestMethodKey
extends java.lang.Object
implements ServletConsumerContext.KeyCommand

Base class of key to identify values from ServletRequest method invocation pseudo storage class.

You must concretize below method(s) to have this function.

Since:
PageMixer 3.1

Field Summary
static RequestMethodKey AUTH_TYPE
          Key to get value from request#getAuthType().
static RequestMethodKey CONTEXT_PATH
          Key to get value from request#getContextPath().
static RequestMethodKey LOCALE
          Key to get value from request#getLocale().
static RequestMethodKey METHOD
          Key to get value from request#getMethod().
static RequestMethodKey PATH_INFO
          Key to get value from request#getPathInfo().
static RequestMethodKey PROTOCOL
          Key to get value from request#getProtocol().
static RequestMethodKey QUERY_STRING
          Key to get value from request#getQueryString().
static RequestMethodKey REMOTE_ADDR
          Key to get value from request#getRemoteAddr().
static RequestMethodKey REMOTE_HOST
          Key to get value from request#getRemoteHost().
static RequestMethodKey REMOTE_USER
          Key to get value from request#getRemoteUser().
static RequestMethodKey REQUEST_URI
          Key to get value from request#getRequestURI().
static RequestMethodKey SCHEME
          Key to get value from request#getScheme().
static RequestMethodKey SECURE
          Key to get value from request#isSecure().
static RequestMethodKey SERVER_NAME
          Key to get value from request#getServerName().
static RequestMethodKey SERVER_PORT
          Key to get value from request#getServerPort().
static RequestMethodKey SERVLET_PATH
          Key to get value from request#getServletPath().
static RequestMethodKey USER_PRINCIPAL
          Key to get value from request#getUserPrincipal().
 
Constructor Summary
RequestMethodKey()
          Constructor.
 
Method Summary
 java.lang.Boolean getBoolean(ConsumerContext context)
          Utility method to get Boolean directly.
 java.lang.Integer getInteger(ConsumerContext context)
          Utility method to get Integer directly.
 java.util.Locale getLocale(ConsumerContext context)
          Utility method to get Locale directly.
 java.security.Principal getPrincipal(ConsumerContext context)
          Utility method to get Principal directly.
 java.lang.String getString(ConsumerContext context)
          Utility method to get String directly.
abstract  java.lang.Object getValue(javax.servlet.http.HttpServletRequest request)
          Set value from HttpServletResponse.
 java.lang.Object getValue(javax.servlet.http.HttpServlet servlet, javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Get value from HttpServletRequest.
 void setValue(javax.servlet.http.HttpServlet servlet, javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object value)
          This is not supported.
 void unsetValue(javax.servlet.http.HttpServlet servlet, javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This is not supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTH_TYPE

public static final RequestMethodKey AUTH_TYPE
Key to get value from request#getAuthType().

This finds String value out in context.


CONTEXT_PATH

public static final RequestMethodKey CONTEXT_PATH
Key to get value from request#getContextPath().

This finds String value out in context.


LOCALE

public static final RequestMethodKey LOCALE
Key to get value from request#getLocale().

This finds Locale value out in context.


METHOD

public static final RequestMethodKey METHOD
Key to get value from request#getMethod().

This finds String value out in context.


PATH_INFO

public static final RequestMethodKey PATH_INFO
Key to get value from request#getPathInfo().

This finds String(may be null) value out in context.


PROTOCOL

public static final RequestMethodKey PROTOCOL
Key to get value from request#getProtocol().

This finds String value out in context.


QUERY_STRING

public static final RequestMethodKey QUERY_STRING
Key to get value from request#getQueryString().

This finds String(may be null) value out in context.


REMOTE_ADDR

public static final RequestMethodKey REMOTE_ADDR
Key to get value from request#getRemoteAddr().

This finds String value out in context.


REMOTE_HOST

public static final RequestMethodKey REMOTE_HOST
Key to get value from request#getRemoteHost().

This finds String value out in context.


REMOTE_USER

public static final RequestMethodKey REMOTE_USER
Key to get value from request#getRemoteUser().

This finds String value out in context.


REQUEST_URI

public static final RequestMethodKey REQUEST_URI
Key to get value from request#getRequestURI().

You can get URI value for current Servlet(or JSP).

This finds String value out in context.


SCHEME

public static final RequestMethodKey SCHEME
Key to get value from request#getScheme().

This finds String value out in context.


SECURE

public static final RequestMethodKey SECURE
Key to get value from request#isSecure().

This finds Boolean value out in context.


SERVER_NAME

public static final RequestMethodKey SERVER_NAME
Key to get value from request#getServerName().

This finds String value out in context.


SERVER_PORT

public static final RequestMethodKey SERVER_PORT
Key to get value from request#getServerPort().

This finds Integer value out in context.


SERVLET_PATH

public static final RequestMethodKey SERVLET_PATH
Key to get value from request#getServletPath().

This finds String value out in context.


USER_PRINCIPAL

public static final RequestMethodKey USER_PRINCIPAL
Key to get value from request#getUserPrincipal().

This finds Principal value out in context.

Constructor Detail

RequestMethodKey

public RequestMethodKey()
Constructor.
Method Detail

getBoolean

public final java.lang.Boolean getBoolean(ConsumerContext context)
Utility method to get Boolean directly.

getInteger

public final java.lang.Integer getInteger(ConsumerContext context)
Utility method to get Integer directly.

getLocale

public final java.util.Locale getLocale(ConsumerContext context)
Utility method to get Locale directly.

getString

public final java.lang.String getString(ConsumerContext context)
Utility method to get String directly.

getPrincipal

public final java.security.Principal getPrincipal(ConsumerContext context)
Utility method to get Principal directly.

getValue

public abstract java.lang.Object getValue(javax.servlet.http.HttpServletRequest request)
Set value from HttpServletResponse.
Parameters:
request - on which consumer context depends.
Returns:
value identified by this(may be null)

getValue

public java.lang.Object getValue(javax.servlet.http.HttpServlet servlet,
                                 javax.servlet.ServletContext context,
                                 javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response)
Get value from HttpServletRequest.

This is equivalent to getValue(request) .

Specified by:
getValue in interface ServletConsumerContext.KeyCommand
Following copied from interface: jp.ne.dti.lares.foozy.pagemixer.servlet.ServletConsumerContext.KeyCommand
Parameters:
servlet - on which consumer context depends.
context - on which consumer context depends.
request - on which consumer context depends.
response - on which consumer context depends.
Returns:
value identified by this(may be null)

setValue

public void setValue(javax.servlet.http.HttpServlet servlet,
                     javax.servlet.ServletContext context,
                     javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response,
                     java.lang.Object value)
This is not supported.
Specified by:
setValue in interface ServletConsumerContext.KeyCommand
Throws:
UnsupportedOperationException - always

unsetValue

public void unsetValue(javax.servlet.http.HttpServlet servlet,
                       javax.servlet.ServletContext context,
                       javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
This is not supported.
Specified by:
unsetValue in interface ServletConsumerContext.KeyCommand
Throws:
UnsupportedOperationException - always

PageMixer API - 3.1