Class WithResponse
java.lang.Object
org.alfresco.rest.framework.webscripts.WithResponse
Values to be set on the response at the appropriate time.
It should be ok to set these variables multiple times but only the latest values are used.
- Author:
- Gethin James
-
Constructor Summary
ConstructorsConstructorDescriptionWithResponse(int status, ContentInfo contentInfo, org.springframework.extensions.webscripts.Cache cache) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a response header with the given name and value.org.springframework.extensions.webscripts.CachegetCache()intvoidsetCache(org.springframework.extensions.webscripts.Cache cache) Sets the Cache controlvoidsetContentInfo(ContentInfo contentInfo) Sets the information about the content: mimetype, encoding, locale, lengthvoidSet a response header with the given name and value.voidsetStatus(int status) Sets the Response Status
-
Constructor Details
-
WithResponse
public WithResponse(int status, ContentInfo contentInfo, org.springframework.extensions.webscripts.Cache cache)
-
-
Method Details
-
setContentInfo
Sets the information about the content: mimetype, encoding, locale, length- Parameters:
contentInfo-
-
setStatus
public void setStatus(int status) Sets the Response Status- Parameters:
status- int
-
setHeader
Set a response header with the given name and value. If the header has already been set, the new value overwrites the previous one.- Parameters:
name- header namevalue- header value
-
addHeader
Adds a response header with the given name and value. This method allows a response header to have multiple values.- Parameters:
name- header namevalue- header value
-
setCache
public void setCache(org.springframework.extensions.webscripts.Cache cache) Sets the Cache control- Parameters:
cache- cache control
-
getContentInfo
-
getStatus
public int getStatus() -
getCache
public org.springframework.extensions.webscripts.Cache getCache() -
getHeaders
-