PageMixer API - 3.1

jp.ne.dti.lares.foozy.pagemixer.struts
Class FormKey

java.lang.Object
  |
  +--jp.ne.dti.lares.foozy.pagemixer.struts.FormKey
All Implemented Interfaces:
ServletConsumerContext.KeyCommand
Direct Known Subclasses:
AutoFormKey, RequestFormKey, SessionFormKey

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

Key to identify "ActionForm" of Struts.

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

Since:
PageMixer 3.1

Constructor Summary
protected FormKey(java.lang.String name)
          Construct key named as specified name.
 
Method Summary
 boolean equals(java.lang.Object object)
           
 org.apache.struts.action.ActionForm get(ConsumerContext context)
          Utility to get "ActionForm" by THIS.
protected abstract  java.lang.Object getValue(javax.servlet.http.HttpServletRequest request, java.lang.String name, boolean requestScope)
           
 java.lang.Object getValue(javax.servlet.http.HttpServlet servlet, javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Get "ActionForm" named as specified.
 int hashCode()
           
static boolean isRequestScope(org.apache.struts.config.ActionConfig config)
          Examine whether specified action form is in request scope or not.
 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 SHOULD NOT BE SUPPORTED.
 java.lang.String toString()
           
 void unsetValue(javax.servlet.http.HttpServlet servlet, javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          THIS SHOULD NOT BE SUPPORTED.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FormKey

protected FormKey(java.lang.String name)
Construct key named as specified name.
Parameters:
name - of "ActionForm" to access
Method Detail

get

public final org.apache.struts.action.ActionForm get(ConsumerContext context)
Utility to get "ActionForm" by THIS.

This is equivalent to context.getValue(this) invocation with narrowing to "ActionForm".

Parameters:
context - to look "ActionForm" up into
Returns:
"ActionForm" identified by THIS.

isRequestScope

public static boolean isRequestScope(org.apache.struts.config.ActionConfig config)
Examine whether specified action form is in request scope or not.

This recognizes that action form is in request scope, if specified ActionConfig is (1)'null' or (2)in request scope(= getScope() returns "request").

Returns:
true if action form is not in session scope.

getValue

protected abstract java.lang.Object getValue(javax.servlet.http.HttpServletRequest request,
                                             java.lang.String name,
                                             boolean requestScope)

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 "ActionForm" named as specified.
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 SHOULD NOT BE SUPPORTED.

Please use official way of Struts to store "ActionForm".

Specified by:
setValue 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.
value - value to be set

unsetValue

public void unsetValue(javax.servlet.http.HttpServlet servlet,
                       javax.servlet.ServletContext context,
                       javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
THIS SHOULD NOT BE SUPPORTED.

Please use official way of Struts to remove "ActionForm".

Specified by:
unsetValue 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.

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

PageMixer API - 3.1