public class ThymeleafMessageBodyWriter extends java.lang.Object implements javax.ws.rs.ext.MessageBodyWriter<ThymeleafContent>
| Constructor and Description |
|---|
ThymeleafMessageBodyWriter(ThymeleafMessageBodyWriterConfig config) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getBaseUri() |
static java.lang.String |
getContextRoot(javax.ws.rs.core.UriInfo uriInfo) |
long |
getSize(ThymeleafContent thymeleaf,
java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
void |
writeTo(ThymeleafContent thymeleaf,
java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders,
java.io.OutputStream entityStream) |
void |
writeTo(ThymeleafContent thymeleaf,
java.io.OutputStream outputStream)
Writes the thymeleaf to the specified writer.
|
void |
writeTo(ThymeleafContent thymeleaf,
java.io.Writer writer)
Provided mainly for testing, writes the thymeleaf to the specified writer.
|
@Autowired public ThymeleafMessageBodyWriter(ThymeleafMessageBodyWriterConfig config)
public boolean isWriteable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<ThymeleafContent>public long getSize(ThymeleafContent thymeleaf, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize in interface javax.ws.rs.ext.MessageBodyWriter<ThymeleafContent>public java.lang.String getBaseUri()
public void writeTo(ThymeleafContent thymeleaf, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream) throws java.io.IOException, javax.ws.rs.WebApplicationException
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<ThymeleafContent>java.io.IOExceptionjavax.ws.rs.WebApplicationExceptionpublic void writeTo(ThymeleafContent thymeleaf, java.io.Writer writer) throws java.io.IOException
thymeleaf - the thymeleaf instanace to be renderedwriter - the writer that the thymeleaf will be rendered tojava.io.IOException - if we are having a bad daypublic void writeTo(ThymeleafContent thymeleaf, java.io.OutputStream outputStream) throws java.io.IOException
thymeleaf - the thymeleaf instanace to be renderedoutputStream - the output stream that the thymeleaf will be rendered tojava.io.IOException - if we are having a bad daypublic static java.lang.String getContextRoot(javax.ws.rs.core.UriInfo uriInfo)