Class RestConversionService

    • Constructor Detail

      • RestConversionService

        public RestConversionService()
    • Method Detail

      • convertDocument

        @GET
        @Path("/convertDocument")
        @Produces("application/octet-stream")
        public javax.activation.DataHandler convertDocument​(@QueryParam("docId")
                                                            long docId,
                                                            @QueryParam("fileVersion")
                                                            String fileVersion,
                                                            @QueryParam("format")
                                                            String format)
                                                     throws Exception
        Description copied from interface: ConversionService
        Converts an existing document and saves the generated conversion in LogicalDOC.
        Specified by:
        convertDocument in interface ConversionService
        Parameters:
        docId - The document id
        fileVersion - The file version
        format - The output conversion format
        Returns:
        The conversion's binary
        Throws:
        Exception - error in the service
      • convertDocumentAndSave

        @GET
        @Path("/convertDocumentAndSave")
        @Produces("text/plain")
        public long convertDocumentAndSave​(@QueryParam("docId")
                                           long docId,
                                           @QueryParam("fileVersion")
                                           String fileVersion,
                                           @QueryParam("format")
                                           String format)
                                    throws Exception
        Description copied from interface: ConversionService
        Converts an existing document and saves the generated conversion in LogicalDOC.
        Specified by:
        convertDocumentAndSave in interface ConversionService
        Parameters:
        docId - The document id
        fileVersion - The file version
        format - The output conversion format
        Returns:
        the ID of the generated conversion file
        Throws:
        Exception - error in the service
      • convertDocumentToPdf

        @GET
        @Path("/convertDocumentToPdf")
        public void convertDocumentToPdf​(@QueryParam("docId")
                                         long docId,
                                         @QueryParam("fileVersion")
                                         String fileVersion)
                                  throws Exception
        Description copied from interface: ConversionService
        Creates the PDF conversion of the given document. If the conversion was already created, nothing will happen.
        Specified by:
        convertDocumentToPdf in interface ConversionService
        Parameters:
        docId - The document id
        fileVersion - The specific file version(it can be empty)
        Throws:
        Exception - error in the service
      • convertFile

        @POST
        @Path("/convertFile")
        @Consumes("multipart/form-data")
        @Produces("application/octet-stream")
        public javax.activation.DataHandler convertFile​(String fileName,
                                                        String format,
                                                        org.apache.cxf.jaxrs.ext.multipart.Attachment fileContent)
                                                 throws Exception
        Description copied from interface: ConversionService
        Converts a given file and returns the conversion.
        Specified by:
        convertFile in interface ConversionService
        Parameters:
        fileName - name of the original file
        format - The output format (ag: pdf, ods, doc)
        fileContent - The content of the original file
        Returns:
        the raw content of the converted file
        Throws:
        Exception - error in the service