|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.services.rest.CacheControl
public class CacheControl
An abstraction for the value of a HTTP Cache-Control response header.
| Constructor Summary | |
|---|---|
CacheControl()
Create a new instance of CacheControl. The new instance will have the following default settings: public = true private = false noCache = false noStore = false noTransform = true mustRevalidate = false proxyRevalidate = false An empty list of private fields An empty list of no-cache fields An empty list of cache extensions |
|
| Method Summary | |
|---|---|
String |
getAsString()
String representation of CacheControl. |
Map<String,String> |
getCacheExtension()
Corresponds to a set of extension cache control directives. |
int |
getMaxAge()
Corresponds to the max-age cache control directive. |
List<String> |
getNoCacheFields()
Corresponds to the value of the no-cache cache control directive. |
List<String> |
getPrivateFields()
Corresponds to the value of the private cache control directive. |
int |
getSMaxAge()
Corresponds to the s-maxage cache control directive. |
boolean |
isMustRevalidate()
Corresponds to the must-revalidate cache control directive. |
boolean |
isNoCache()
Corresponds to the no-cache cache control directive. |
boolean |
isNoStore()
Corresponds to the no-store cache control directive. |
boolean |
isNoTransform()
Corresponds to the no-transform cache control directive. |
boolean |
isPrivateCacheable()
Corresponds to the private cache control directive. |
boolean |
isProxyRevalidate()
Corresponds to the proxy-revalidate cache control directive. |
boolean |
isPublicCacheable()
Corresponds to the public cache control directive. |
void |
setCacheExtension(Map<String,String> extensions)
Corresponds to a set of extension cache control directives. |
void |
setMaxAge(int age)
Corresponds to the max-age cache control directive. |
void |
setMustRevalidate(boolean status)
Corresponds to the must-revalidate cache control directive. |
void |
setNoCache(boolean state)
Corresponds to the no-cache cache control directive. |
void |
setNoCache(boolean state,
List<String> fields)
Corresponds to the no-cache cache control directive. |
void |
setNoStore(boolean status)
Corresponds to the no-store cache control directive. |
void |
setNoTransform(boolean status)
Corresponds to the no-transform cache control directive. |
void |
setPrivateCacheable(boolean status)
Corresponds to the private cache control directive. |
void |
setPrivateCacheable(boolean status,
List<String> fields)
Corresponds to the private cache control directive. |
void |
setProxyRevalidate(boolean status)
Corresponds to the must-revalidate cache control directive. |
void |
setPublicCacheable(boolean status)
Corresponds to the public cache control directive. |
void |
setSMaxAge(int age)
Corresponds to the s-maxage cache control directive. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CacheControl()
| Method Detail |
|---|
public String getAsString()
public boolean isMustRevalidate()
public void setMustRevalidate(boolean status)
status - true if the must-revalidate cache control directive should be
included in the response, false otherwise.public boolean isProxyRevalidate()
public void setProxyRevalidate(boolean status)
status - true if the proxy-revalidate cache control directive should
be included in the response, false otherwise.public int getMaxAge()
public void setMaxAge(int age)
age - the value of the max-age cache control directive, a value of -1
will disable the directive.public int getSMaxAge()
public void setSMaxAge(int age)
age - the value of the s-maxage cache control directive, a value of -1
will disable the directive.public boolean isNoCache()
public void setNoCache(boolean state)
state - true if the no-cache cache control directive should be
included in the response, false otherwise.
public void setNoCache(boolean state,
List<String> fields)
state - true if the no-cache cache control directive should be
included in the response, false otherwise.fields - array of fields.public List<String> getNoCacheFields()
public boolean isPublicCacheable()
public void setPublicCacheable(boolean status)
status - true if the public cache control directive should be included
in the response, false otherwise.public boolean isPrivateCacheable()
public void setPrivateCacheable(boolean status)
status - true if the private cache control directive should be
included in the response, false otherwise.
public void setPrivateCacheable(boolean status,
List<String> fields)
status - true if the private cache control directive should be
included in the response, false otherwise.fields - array of fields.public List<String> getPrivateFields()
public boolean isNoTransform()
public void setNoTransform(boolean status)
status - true if the no-transform cache control directive should be
included in the response, false otherwise.public boolean isNoStore()
public void setNoStore(boolean status)
status - true if the no-store cache control directive should be
included in the response, false otherwise.public void setCacheExtension(Map<String,String> extensions)
extensions - the cache extensions.public Map<String,String> getCacheExtension()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||