public static class Response.Content extends Response.Body
Response.Body, Response.Content, Response.Error, Response.Redirect, Response.Status, Response.View
Constructor and Description |
---|
Response.Content(int status,
PropertyMap properties,
Streamable streamable) |
Response.Content(int status,
Streamable streamable) |
Response.Content(PropertyMap properties,
Streamable streamable) |
Response.Content(Streamable streamable) |
Modifier and Type | Method and Description |
---|---|
String |
getTitle() |
String |
toString() |
Response.Content |
with(PropertyType<Boolean> propertyType)
Set a boolean property to true.
|
<T> Response.Content |
with(PropertyType<T> propertyType,
T propertyValue)
Set a property, if the value is null, the property is removed.
|
Response.Content |
withAssets(String... assets) |
Response.Content |
withCharset(Charset charset) |
Response.Content |
withHeader(String name,
String... value) |
Response.Content |
withHeaderTag(Element header)
Set the provided element on the response as an HTML header.
|
Response.Content |
withHeaderTag(String header)
Parse the header into an
Element and set it on the response as an header tag. |
Response.Content |
withMetaHttpEquiv(String name,
String value) |
Response.Content |
withMetaTag(String name,
String value) |
Response.Content |
withMimeType(String mimeType) |
Response.Content |
withNo(PropertyType<Boolean> propertyType)
Set a boolean property to false.
|
<T> Response.Content |
without(PropertyType<T> propertyType)
Removes a property.
|
Response.Content |
withTitle(String title) |
getCharset, getData, getMimeType
body, body, body, body, body, content, content, content, content, getCode, streamable
public Response.Content(int status, PropertyMap properties, Streamable streamable)
public Response.Content(int status, Streamable streamable)
public Response.Content(PropertyMap properties, Streamable streamable)
public Response.Content(Streamable streamable)
public <T> Response.Content with(PropertyType<T> propertyType, T propertyValue) throws NullPointerException
Response
with
in class Response.Body
propertyType
- the property typepropertyValue
- the property valueNullPointerException
- if the property type is nullpublic <T> Response.Content without(PropertyType<T> propertyType) throws NullPointerException
Response
without
in class Response.Body
propertyType
- the property typeNullPointerException
- if the property type is nullpublic Response.Content with(PropertyType<Boolean> propertyType) throws NullPointerException
Response
with
in class Response.Body
propertyType
- the property typeNullPointerException
- if the property type is nullpublic Response.Content withNo(PropertyType<Boolean> propertyType) throws NullPointerException
Response
withNo
in class Response.Body
propertyType
- the property typeNullPointerException
- if the property type is nullpublic Response.Content withMimeType(String mimeType)
withMimeType
in class Response.Body
public Response.Content withCharset(Charset charset)
withCharset
in class Response.Body
public Response.Content withHeader(String name, String... value)
withHeader
in class Response.Body
public String getTitle()
public Response.Content withTitle(String title)
public Response.Content withAssets(String... assets) throws NullPointerException
NullPointerException
public Response.Content withMetaTag(String name, String value)
public Response.Content withMetaHttpEquiv(String name, String value)
public Response.Content withHeaderTag(String header) throws ParserConfigurationException, SAXException
Element
and set it on the response as an header tag. This method
expects well formed XML, the parsed Element will be translated into markup according to the
response content type when the response will be written to the document.header
- the header string to parseParserConfigurationException
- any ParserConfigurationExceptionSAXException
- any SAXExceptionpublic Response.Content withHeaderTag(Element header)
header
- the headerCopyright © 2015 eXo Platform SAS. All rights reserved.