Class DocumentStructureProvider

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyWriter<DocumentStructure>

    @Provider
    @Produces("text/html")
    public class DocumentStructureProvider
    extends java.lang.Object
    implements javax.ws.rs.ext.MessageBodyWriter<DocumentStructure>
    This provider builds the HTML message body for a given DocumentStructure using the Velocity template engine.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getSize​(DocumentStructure structure, java.lang.Class<?> arg1, java.lang.reflect.Type arg2, java.lang.annotation.Annotation[] arg3, javax.ws.rs.core.MediaType arg4)  
      boolean isWriteable​(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)  
      void writeTo​(DocumentStructure structure, java.lang.Class<?> arg1, java.lang.reflect.Type arg2, java.lang.annotation.Annotation[] arg3, javax.ws.rs.core.MediaType arg4, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> arg5, java.io.OutputStream outputStream)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DocumentStructureProvider

        public DocumentStructureProvider()
    • Method Detail

      • isWriteable

        public boolean isWriteable​(java.lang.Class<?> type,
                                   java.lang.reflect.Type genericType,
                                   java.lang.annotation.Annotation[] annotations,
                                   javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<DocumentStructure>
      • getSize

        public long getSize​(DocumentStructure structure,
                            java.lang.Class<?> arg1,
                            java.lang.reflect.Type arg2,
                            java.lang.annotation.Annotation[] arg3,
                            javax.ws.rs.core.MediaType arg4)
        Specified by:
        getSize in interface javax.ws.rs.ext.MessageBodyWriter<DocumentStructure>
      • writeTo

        public void writeTo​(DocumentStructure structure,
                            java.lang.Class<?> arg1,
                            java.lang.reflect.Type arg2,
                            java.lang.annotation.Annotation[] arg3,
                            javax.ws.rs.core.MediaType arg4,
                            javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> arg5,
                            java.io.OutputStream outputStream)
                     throws java.io.IOException,
                            javax.ws.rs.WebApplicationException
        Specified by:
        writeTo in interface javax.ws.rs.ext.MessageBodyWriter<DocumentStructure>
        Throws:
        java.io.IOException
        javax.ws.rs.WebApplicationException