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

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

@Controller(value="cacheControlTest")
@RequestMapping(value={"VIEW","EDIT","HELP","ABOUT"},
                params="currentTest=cacheControlTest")
public class CacheControlTestController
extends BasePortletTest

Simple form based BasePortletTest for testing CacheControl support.

Version:
$Id: CacheControlTestController.java 25395 2011-10-23 21:27:38Z nblair $
Author:
Nicholas Blair

Field Summary
 
Fields inherited from class org.jasig.portlet.test.mvc.tests.BasePortletTest
logger
 
Constructor Summary
CacheControlTestController()
           
 
Method Summary
 void emptyAction()
          Each subclass must of have an empty ActionMapping annotated method with no value.
 String getTestName()
           
 String showExpirationTestForm()
           
 String showValidationTestForm()
           
 void triggerCacheClear()
          Empty action; actions (and events) trigger the portlet renderer to clear the output cache for this portlet.
 void writeJsonContentWithExpirationCaching(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response)
          Writes some simple JSON output.
 void writeJsonContentWithValidationCaching(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response)
           
 
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

CacheControlTestController

public CacheControlTestController()
Method Detail

getTestName

public String getTestName()

showExpirationTestForm

@RenderMapping
public String showExpirationTestForm()
Returns:

showValidationTestForm

@RenderMapping(params="testname=validation")
public String showValidationTestForm()

writeJsonContentWithExpirationCaching

@ResourceMapping(value="jsonExpirationCachingTest")
public void writeJsonContentWithExpirationCaching(javax.portlet.ResourceRequest request,
                                                                  javax.portlet.ResourceResponse response)
                                           throws IOException
Writes some simple JSON output. Sets cache expiration time of 120 seconds.

Parameters:
request -
response -
Throws:
IOException

writeJsonContentWithValidationCaching

@ResourceMapping(value="jsonValidationCachingTest")
public void writeJsonContentWithValidationCaching(javax.portlet.ResourceRequest request,
                                                                  javax.portlet.ResourceResponse response)
                                           throws IOException
Parameters:
request -
response -
Throws:
IOException

triggerCacheClear

@ActionMapping(value="cacheClear")
public void triggerCacheClear()
Empty action; actions (and events) trigger the portlet renderer to clear the output cache for this portlet.


emptyAction

@ActionMapping
public void emptyAction()
Each subclass must of have an empty ActionMapping annotated method with no value. Method does not have to do anything; it's triggered when a person selects a different test from the drop down list.



Copyright © 2012 Jasig. All Rights Reserved.