org.springframework.extensions.webscripts
Class Cache

java.lang.Object
  extended by org.springframework.extensions.webscripts.Cache
All Implemented Interfaces:
Description.RequiredCache

public class Cache
extends Object
implements Description.RequiredCache

Web Script Cache Records the desired cache requirements for the Web Script

Author:
davidc

Constructor Summary
Cache()
          Construct
Cache(Description.RequiredCache requiredCache)
          Construct
 
Method Summary
 String getETag()
           
 boolean getIsPublic()
          Determine if Web Script content is for public caching
 Date getLastModified()
           
 Long getMaxAge()
           
 boolean getMustRevalidate()
          Must cache re-validate to ensure content is fresh
 boolean getNeverCache()
          Determine if Web Script should ever be cached
 void setETag(String tag)
           
 void setIsPublic(boolean isPublic)
           
 void setLastModified(Date lastModified)
           
 void setMaxAge(Long maxAge)
           
 void setMustRevalidate(boolean mustRevalidate)
           
 void setNeverCache(boolean neverCache)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cache

public Cache()
Construct


Cache

public Cache(Description.RequiredCache requiredCache)
Construct

Parameters:
requiredCache -
Method Detail

getNeverCache

public boolean getNeverCache()
Description copied from interface: Description.RequiredCache
Determine if Web Script should ever be cached

Specified by:
getNeverCache in interface Description.RequiredCache
Returns:
true => do not cache, false => caching may or not occur

setNeverCache

public void setNeverCache(boolean neverCache)
Parameters:
neverCache -

getIsPublic

public boolean getIsPublic()
Description copied from interface: Description.RequiredCache
Determine if Web Script content is for public caching

Specified by:
getIsPublic in interface Description.RequiredCache
Returns:
true => content is public, so allow cache

setIsPublic

public void setIsPublic(boolean isPublic)
Parameters:
isPublic -

getLastModified

public Date getLastModified()
Returns:
last modified

setLastModified

public void setLastModified(Date lastModified)
Parameters:
lastModified -

getETag

public String getETag()
Returns:
ETag

setETag

public void setETag(String tag)
Parameters:
tag - ETag

getMaxAge

public Long getMaxAge()
Returns:
Max Age (seconds)

setMaxAge

public void setMaxAge(Long maxAge)
Parameters:
maxAge - Max Age (seconds)

getMustRevalidate

public boolean getMustRevalidate()
Description copied from interface: Description.RequiredCache
Must cache re-validate to ensure content is fresh

Specified by:
getMustRevalidate in interface Description.RequiredCache
Returns:
true => must re-validate

setMustRevalidate

public void setMustRevalidate(boolean mustRevalidate)
Parameters:
mustRevalidate -


Copyright © 2009 SpringSource, Inc. All Rights Reserved.