org.jasig.portlet.test.mvc.tests
Class CookieTestController

java.lang.Object
  extended by org.jasig.portlet.test.mvc.tests.BasePortletTest
      extended by org.jasig.portlet.test.mvc.tests.CookieTestController
All Implemented Interfaces:
PortletTest, org.springframework.beans.factory.BeanNameAware

@Controller(value="cookieTest")
@RequestMapping(value={"VIEW","EDIT","HELP","ABOUT"},
                params="currentTest=cookieTest")
@SessionAttributes(value="command")
public class CookieTestController
extends BasePortletTest

Controller for testing Portlet Cookie support.

Version:
$Id: CookieTestController.java 23744 2011-05-16 21:55:40Z edalquist $
Author:
Nicholas Blair

Field Summary
 
Fields inherited from class org.jasig.portlet.test.mvc.tests.BasePortletTest
logger
 
Constructor Summary
CookieTestController()
           
 
Method Summary
protected  void createFormCookie(CreateCookieFormBackingObject command, org.springframework.validation.BindingResult errors, javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
          Creates a cookie from the form.
protected  void createRandomCookie(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
          Generates a new cookie with random name and value.
protected  String displayCookies(org.springframework.ui.ModelMap model, javax.portlet.RenderRequest request)
           
protected  void editExistingCookie(CreateCookieFormBackingObject command, javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
          Alter an existing cookie that has the same name as the command object.
 String getTestName()
           
protected  void initBinder(org.springframework.web.bind.WebDataBinder binder)
          Sets up a Validator for the forms in this Controller.
 void noopAction()
           
 
Methods inherited from class org.jasig.portlet.test.mvc.tests.BasePortletTest
getTestKey, setBeanName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CookieTestController

public CookieTestController()
Method Detail

getTestName

public String getTestName()

initBinder

@InitBinder
protected void initBinder(org.springframework.web.bind.WebDataBinder binder)
Sets up a Validator for the forms in this Controller.

Parameters:
binder -

displayCookies

@RenderMapping
protected String displayCookies(org.springframework.ui.ModelMap model,
                                              javax.portlet.RenderRequest request)
Parameters:
model -
request -
Returns:

noopAction

@ActionMapping
public void noopAction()

createRandomCookie

@ActionMapping(value="randomCookieAction")
protected void createRandomCookie(javax.portlet.ActionRequest request,
                                                javax.portlet.ActionResponse response)
Generates a new cookie with random name and value.

Parameters:
response -

createFormCookie

@ActionMapping(value="formCookieAction")
protected void createFormCookie(@ModelAttribute
                                              CreateCookieFormBackingObject command,
                                              org.springframework.validation.BindingResult errors,
                                              javax.portlet.ActionRequest request,
                                              javax.portlet.ActionResponse response)
Creates a cookie from the form.

Parameters:
command -
errors -
response -

editExistingCookie

@ActionMapping(value="editCookieAction")
protected void editExistingCookie(CreateCookieFormBackingObject command,
                                                javax.portlet.ActionRequest request,
                                                javax.portlet.ActionResponse response)
Alter an existing cookie that has the same name as the command object. Ignores invocations where the command does not match an existing cookie (by name).

Parameters:
command -
errors -
request -
response -


Copyright © 2012 Jasig. All Rights Reserved.