Package com.saperion.rs.entityprovider
Class DocumentStructureProvider
java.lang.Object
com.saperion.rs.entityprovider.DocumentStructureProvider
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<DocumentStructure>
@Provider
@Produces("text/html")
public class DocumentStructureProvider
extends Object
implements jakarta.ws.rs.ext.MessageBodyWriter<DocumentStructure>
This provider builds the HTML message body for a given DocumentStructure using the Velocity template engine.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
getSize
(DocumentStructure structure, Class<?> arg1, Type arg2, Annotation[] arg3, jakarta.ws.rs.core.MediaType arg4) boolean
isWriteable
(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) void
writeTo
(DocumentStructure structure, Class<?> arg1, Type arg2, Annotation[] arg3, jakarta.ws.rs.core.MediaType arg4, jakarta.ws.rs.core.MultivaluedMap<String, Object> arg5, OutputStream outputStream)
-
Field Details
-
TEMPLATE_NAME
- See Also:
-
PLACEHOLDER_NAME
- See Also:
-
-
Constructor Details
-
DocumentStructureProvider
public DocumentStructureProvider()
-
-
Method Details
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
isWriteable
in interfacejakarta.ws.rs.ext.MessageBodyWriter<DocumentStructure>
-
getSize
public long getSize(DocumentStructure structure, Class<?> arg1, Type arg2, Annotation[] arg3, jakarta.ws.rs.core.MediaType arg4) - Specified by:
getSize
in interfacejakarta.ws.rs.ext.MessageBodyWriter<DocumentStructure>
-
writeTo
public void writeTo(DocumentStructure structure, Class<?> arg1, Type arg2, Annotation[] arg3, jakarta.ws.rs.core.MediaType arg4, jakarta.ws.rs.core.MultivaluedMap<String, Object> arg5, OutputStream outputStream) throws IOException, jakarta.ws.rs.WebApplicationException- Specified by:
writeTo
in interfacejakarta.ws.rs.ext.MessageBodyWriter<DocumentStructure>
- Throws:
IOException
jakarta.ws.rs.WebApplicationException
-