org.codehaus.waffle.view
Class DefaultViewResolver

java.lang.Object
  extended by org.codehaus.waffle.view.DefaultViewResolver
All Implemented Interfaces:
ViewResolver

public class DefaultViewResolver
extends java.lang.Object
implements ViewResolver

The default ViewResolver returns the path of the View being resolved. It holds the default values of the view properties configurable in the web.xml:

and resolves a view path as [view.prefix][view.name][view.suffix], where the view name can also be configured as a view property for each controller name, defaulting to the controller name itself if none is found.

Author:
Michael Ward, Mauro Talevi

Constructor Summary
DefaultViewResolver()
           
 
Method Summary
 void configureView(java.lang.String key, java.lang.String value)
          Configures the resolution of a single view
 void configureViews(java.util.Properties viewProperties)
          Configures the resolution of multiple views
 java.lang.String resolve(View view)
          Resolves the view by return the path to the next view
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultViewResolver

public DefaultViewResolver()
Method Detail

resolve

public java.lang.String resolve(View view)
Description copied from interface: ViewResolver
Resolves the view by return the path to the next view

Specified by:
resolve in interface ViewResolver
Parameters:
view - the View
Returns:
The path to the next View.

configureViews

public void configureViews(java.util.Properties viewProperties)
Description copied from interface: ViewResolver
Configures the resolution of multiple views

Specified by:
configureViews in interface ViewResolver
Parameters:
viewProperties - the view Properties

configureView

public void configureView(java.lang.String key,
                          java.lang.String value)
Description copied from interface: ViewResolver
Configures the resolution of a single view

Specified by:
configureView in interface ViewResolver
Parameters:
key - the view key
value - the view value


Copyright © 2008. All Rights Reserved.