org.codehaus.waffle.controller
Class ControllerDefinition

java.lang.Object
  extended by org.codehaus.waffle.controller.ControllerDefinition

public class ControllerDefinition
extends java.lang.Object

In Waffle a Controller can be any Pojo. Controllers are registered per application with a custom Registrar. The ControllerDefinition is a wrapper to merge both the name the controller was registered under and the actual controller instance.
NOTE: This is required so that Waffle can properly direct to a view when no 'controller method' request parameter was found, which typically occurs when a user first enters a web application.

Author:
Michael Ward

Constructor Summary
ControllerDefinition(java.lang.String name, java.lang.Object controller, MethodDefinition methodDefinition)
           
 
Method Summary
 java.lang.Object getController()
          The controller (Pojo) this definition is wrapping
 MethodDefinition getMethodDefinition()
          The method definition which defines tha method and argument values to be invoked on the controller
 java.lang.String getName()
          The name the controller is registered under in Waffle.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ControllerDefinition

public ControllerDefinition(java.lang.String name,
                            java.lang.Object controller,
                            MethodDefinition methodDefinition)
Method Detail

getName

public java.lang.String getName()
The name the controller is registered under in Waffle.


getController

public java.lang.Object getController()
The controller (Pojo) this definition is wrapping


getMethodDefinition

public MethodDefinition getMethodDefinition()
The method definition which defines tha method and argument values to be invoked on the controller


toString

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


Copyright © 2008. All Rights Reserved.