pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.bundle
Class ControllerMethodConfiguration

java.lang.Object
  extended by org.torweg.pulse.bundle.ControllerMethodConfiguration
All Implemented Interfaces:
java.io.Serializable

public class ControllerMethodConfiguration
extends java.lang.Object
implements java.io.Serializable

stores information regarding the execution of a specific Method in a Controller.

Version:
$Revision: 2071 $
Author:
Thomas Weber
See Also:
Serialized Form

Nested Class Summary
protected static class ControllerMethodConfiguration.MemberInfo
          collects information for members of request beans.
 
Constructor Summary
ControllerMethodConfiguration(Controller c, java.lang.reflect.Method m)
          creates a new ControllerMethodConfiguration for the given Controller and Method.
 
Method Summary
 boolean equals(java.lang.Object obj)
          returns whether the given object is equal to this ControllerMethodConfiguration.
 Action getActionAnnotation()
           
 Controller getController()
           
 java.lang.reflect.Method getMethod()
           
 java.lang.Object[] getMethodParameters(ServiceRequest request, Bundle bundle)
          prepares the parameters for the method described by the ControllerMethodConfiguration.
 RequireToken getTokenAnnotation()
           
 int hashCode()
          returns the hash code for the ControllerMethodConfiguration, which is based on the hash code of the method.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControllerMethodConfiguration

public ControllerMethodConfiguration(Controller c,
                                     java.lang.reflect.Method m)
creates a new ControllerMethodConfiguration for the given Controller and Method.

Parameters:
c - the controller
m - the method
Method Detail

getMethod

public final java.lang.reflect.Method getMethod()
Returns:
Returns the method.

getActionAnnotation

public final Action getActionAnnotation()
Returns:
Returns the actionAnnotation.

getMethodParameters

public final java.lang.Object[] getMethodParameters(ServiceRequest request, Bundle bundle)
                                             throws java.lang.IllegalArgumentException,
                                                    java.lang.InstantiationException,
                                                    java.lang.IllegalAccessException,
                                                    java.lang.reflect.InvocationTargetException
prepares the parameters for the method described by the ControllerMethodConfiguration.

Parameters:
request - the current request
bundle - the current bundle
Returns:
the method parameters
Throws:
java.lang.IllegalArgumentException - on errors building the method parameters
java.lang.InstantiationException - on errors building the method parameters
java.lang.IllegalAccessException - on errors building the method parameters
java.lang.reflect.InvocationTargetException - on errors building the method parameters

getTokenAnnotation

public final RequireToken getTokenAnnotation()
Returns:
Returns the tokenAnnotation.

getController

public final Controller getController()
Returns:
Returns the controller.

hashCode

public int hashCode()
returns the hash code for the ControllerMethodConfiguration, which is based on the hash code of the method.

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code
See Also:
Object.hashCode()

equals

public boolean equals(java.lang.Object obj)
returns whether the given object is equal to this ControllerMethodConfiguration.

Two ControllerMethodConfigurations are considered equal, if they belong to the same method.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to check against
Returns:
true, if and only if the given object is equal to this ControllerMethodConfiguration. Otherwise false.
See Also:
Object.equals(java.lang.Object)