Class ControllerUtils.ViewFactory
java.lang.Object
uk.ac.manchester.spinnaker.alloc.web.ControllerUtils.ViewFactory
- Enclosing class:
- ControllerUtils
@Immutable public static final class ControllerUtils.ViewFactory extends Object
Creates a
ModelAndView
on demand.- Author:
- Donal Fellows
-
Constructor Summary
Constructors Constructor Description ViewFactory(String viewName)
-
Method Summary
Modifier and Type Method Description ModelAndView
view()
Make an instance.ModelAndView
view(String key, Object value)
Make an instance.ModelAndView
view(ModelMap model)
Make an instance.
-
Constructor Details
-
ViewFactory
- Parameters:
viewName
- The name of the view that this class will make.
-
-
Method Details
-
view
Make an instance.- Returns:
- The model-and-view, ready for decorating with the model.
-
view
Make an instance.- Parameters:
model
- The model we want to start with.- Returns:
- The model-and-view, ready for decorating with the model.
-
view
Make an instance.- Parameters:
key
- Name of item to initially insert in the model.value
- Value of item to initially insert in the model.- Returns:
- The model-and-view, ready for decorating with the model.
-