org.japano.action
Class ActionMapping

java.lang.Object
  extended by org.japano.action.Parametrized
      extended by org.japano.action.ActionMapping
All Implemented Interfaces:
java.io.Serializable

public class ActionMapping
extends Parametrized
implements java.io.Serializable

Maps an action to an URI.

Version:
$Id: ActionMapping.java,v 1.20 2005/11/30 21:22:23 fforw Exp $ SourceForge.net Logo
Author:
Sven Helmberger ( sven dot helmberger at gmx dot de )
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.japano.action.Parametrized
klass, parameters
 
Constructor Summary
ActionMapping(java.lang.String klass, java.lang.String tagLibrary, java.lang.String name)
          creates a new action mapping instance
 
Method Summary
 void addBean(Bean bean)
          Adds a bean to this action mapping.
 java.util.Iterator beans()
          Returns an Iterator over all beans in this action mapping.
 ActionMapping getActionMapping()
          Returns this
 Bean getBean(java.lang.String name)
          Returns the bean with the given name or null
 int getBeanCount()
          Returns the number of beans defined in this action mapping
 java.lang.String getExtension()
          Getter for property extension.
 Parameter getParameter(java.lang.String name)
          Returns the parameter with the given name or null
 java.lang.String getQualifiedName()
          Returns the qualified name of the mapped action.
 java.lang.String getRequiredMarker()
          Getter for property requiredMarker.
 java.lang.String getTagLibrary()
          Returns the library URI of the tag of this action mapping.
 java.lang.String getTagName()
          Returns the name of the tag of this action mapping.
 boolean hasTag()
           
 boolean isPingPong()
          Returns true if mapped action is a ping pong action.
 boolean isRepeatable()
          Getter for property repeatable.
 void performAction(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Performs the mapped action.
 void setExtension(java.lang.String extension)
          Setter for property extension.
 void setRepeatable(boolean repeatable)
          Setter for property repeatable.
 void setRequiredMarker(java.lang.String requiredMarker)
          Setter for property requiredMarker.
 void setTag(boolean hasTag)
           
 java.lang.String toString()
          Returns a string representation of this action mapping
 
Methods inherited from class org.japano.action.Parametrized
addParameter, getParameterCount, getParametrizedClass, parameters, removeParameter, setParametrizedClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActionMapping

public ActionMapping(java.lang.String klass,
                     java.lang.String tagLibrary,
                     java.lang.String name)
creates a new action mapping instance

Parameters:
name - name of the action
klass - action class implementing Action
tagLibrary - URI of the tag library this action will be in
Method Detail

addBean

public void addBean(Bean bean)
Adds a bean to this action mapping.

Parameters:
bean - Bean

toString

public java.lang.String toString()
Returns a string representation of this action mapping

Overrides:
toString in class java.lang.Object
Returns:
string representation

performAction

public void performAction(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
                   throws java.io.IOException
Performs the mapped action.

Parameters:
request - Request
response - Response
Throws:
java.io.IOException

getTagLibrary

public java.lang.String getTagLibrary()
Returns the library URI of the tag of this action mapping.

Returns:
Value of property library.

getTagName

public java.lang.String getTagName()
Returns the name of the tag of this action mapping.

Returns:
tag name

beans

public java.util.Iterator beans()
Returns an Iterator over all beans in this action mapping.

Returns:
Iterator

getParameter

public Parameter getParameter(java.lang.String name)
Returns the parameter with the given name or null

Overrides:
getParameter in class Parametrized
Parameters:
name - qualified name of the parameter to find
Returns:
parameter or null

getQualifiedName

public java.lang.String getQualifiedName()
Returns the qualified name of the mapped action.

Returns:
qualified name

isRepeatable

public boolean isRepeatable()
Getter for property repeatable.

Returns:
Value of property repeatable.

getBean

public Bean getBean(java.lang.String name)
Returns the bean with the given name or null

Parameters:
name - bean name
Returns:
bean

setRepeatable

public void setRepeatable(boolean repeatable)
Setter for property repeatable.

Parameters:
repeatable - New value of property repeatable.

isPingPong

public boolean isPingPong()
Returns true if mapped action is a ping pong action.

Returns:
ping pong action?

getBeanCount

public int getBeanCount()
Returns the number of beans defined in this action mapping

Returns:
number of beans

getActionMapping

public ActionMapping getActionMapping()
Returns this

Specified by:
getActionMapping in class Parametrized
Returns:
this

getExtension

public java.lang.String getExtension()
Getter for property extension.

Returns:
Value of property extension.

setExtension

public void setExtension(java.lang.String extension)
Setter for property extension.

Parameters:
extension - New value of property extension.

hasTag

public boolean hasTag()

setTag

public void setTag(boolean hasTag)

getRequiredMarker

public java.lang.String getRequiredMarker()
Getter for property requiredMarker.

Returns:
Value of property requiredMarker.

setRequiredMarker

public void setRequiredMarker(java.lang.String requiredMarker)
Setter for property requiredMarker.

Parameters:
requiredMarker - New value of property requiredMarker.