org.japano.action
Class ActionParameter

java.lang.Object
  extended by org.japano.action.ActionParameter

public class ActionParameter
extends java.lang.Object

This class is used to store the validated HTTP parameter of a request. The parameters are first validated, there (possibly modified) value is stored in a ActionParameter instance. When all values are correctly validated the action parameters are reflexively written to the action instance and nested bean instances.


Constructor Summary
ActionParameter()
           
 
Method Summary
 java.lang.String get(java.lang.String name)
          Returns the HTTP parameter value with the given name.
 java.lang.String[] getArray(java.lang.String name)
          Returns the HTTP parameter value array with the given name.
static java.lang.String getFieldValue(ActionParameter actionParameter, java.lang.String qName, java.lang.String value)
          Returns the action parameter value with the given qualified name if the action parameter is not null and has a value with that name.
static java.lang.String[] getFieldValues(ActionParameter actionParameter, java.lang.String qName, java.lang.String[] values)
          Returns the action parameter values with the given qualified name if the action parameter is not null and has a value with that name.
 void invalidate()
          Marks the action parameters as invalid.
 boolean isEmpty()
           
 boolean isValid()
          Returns true if all action parameters in this instance are valids.
 void put(java.lang.String name, java.lang.String value)
          Stores the given HTTP parameter value with the given name.
 void put(java.lang.String name, java.lang.String[] values)
          Stores the given HTTP parameter values with the given name.
 int size()
          Returns the number of stored HTTP parameters.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActionParameter

public ActionParameter()
Method Detail

put

public void put(java.lang.String name,
                java.lang.String value)
Stores the given HTTP parameter value with the given name.

Parameters:
name - HTTP parameter name
value - value

put

public void put(java.lang.String name,
                java.lang.String[] values)
Stores the given HTTP parameter values with the given name.

Parameters:
name - HTTP parameter name
values - values

get

public java.lang.String get(java.lang.String name)
Returns the HTTP parameter value with the given name.

Parameters:
name - HTTP parameter name
Returns:
value

getArray

public java.lang.String[] getArray(java.lang.String name)
Returns the HTTP parameter value array with the given name.

Parameters:
name - HTTP parameter name
Returns:
values

size

public int size()
Returns the number of stored HTTP parameters.

Returns:
number of parameters

getFieldValue

public static java.lang.String getFieldValue(ActionParameter actionParameter,
                                             java.lang.String qName,
                                             java.lang.String value)
Returns the action parameter value with the given qualified name if the action parameter is not null and has a value with that name. Otherwise the alternate value is returned. If the value is null, an empty string is returned. This is a static helper method called by automatically generated JSP code.

Parameters:
actionParameter - actionParameter
qName - qualified HTTP parameter name
value - alternate value
Returns:
field value

getFieldValues

public static java.lang.String[] getFieldValues(ActionParameter actionParameter,
                                                java.lang.String qName,
                                                java.lang.String[] values)
Returns the action parameter values with the given qualified name if the action parameter is not null and has a value with that name. Otherwise the alternate value is returned. This is a static helper method called by automatically generated JSP code.

Parameters:
actionParameter - actionParameter
qName - qualified HTTP parameter name
values - alternate value
Returns:
field value

isValid

public boolean isValid()
Returns true if all action parameters in this instance are valids.

Returns:
valid?

invalidate

public void invalidate()
Marks the action parameters as invalid.


isEmpty

public boolean isEmpty()

toString

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