org.codehaus.waffle.view
Class View

java.lang.Object
  extended by org.codehaus.waffle.view.View
Direct Known Subclasses:
ExportView, RedirectView, ResponderView

public class View
extends java.lang.Object

Represents the view that the resolver will dispatch. View holds:

  1. the path of the view
  2. the controller definition
which allows for more granular decisions on how to handle a View.

Author:
Michael Ward, Mauro Talevi

Constructor Summary
View(ControllerDefinition controllerDefinition)
          Creates a View
View(java.lang.String path)
          Creates a View
View(java.lang.String path, java.lang.Object controller)
          Deprecated. Use View(String) or View(ControllerDefinition) instead
 
Method Summary
 java.lang.Object getController()
          Returns the controller associated to this view
 ControllerDefinition getControllerDefinition()
          Returns the controller definition associated to this view
 java.lang.String getPath()
          Returns the view path
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

View

public View(java.lang.String path)
Creates a View

Parameters:
path - represents the path of the View to be resolved

View

public View(ControllerDefinition controllerDefinition)
Creates a View

Parameters:
controllerDefinition - the ControllerDefinition where the view originated from

View

public View(java.lang.String path,
            java.lang.Object controller)
Deprecated. Use View(String) or View(ControllerDefinition) instead

Creates a View

Parameters:
path - represents the path of the View to be resolved
controller - the controller where the view originated from
Method Detail

getPath

public java.lang.String getPath()
Returns the view path

Returns:
The View path

getController

public java.lang.Object getController()
Returns the controller associated to this view

Returns:
The Controller instance

getControllerDefinition

public ControllerDefinition getControllerDefinition()
Returns the controller definition associated to this view

Returns:
The ControllerDefinition


Copyright © 2008. All Rights Reserved.