Interface ConversionService
- All Known Implementing Classes:
- RestConversionService
@Consumes({"application/xml","application/json"})
@Produces("application/json")
public interface ConversionService
- 
Method SummaryModifier and TypeMethodDescriptionjakarta.activation.DataHandlerconvertDocument(long docId, String fileVersion, String format) Converts an existing document and saves the generated conversion in LogicalDOC.longconvertDocumentAndSave(long docId, String fileVersion, String format) Converts an existing document and saves the generated conversion in LogicalDOC.voidconvertDocumentToPdf(long docId, String fileVersion) Creates the PDF conversion of the given document.jakarta.activation.DataHandlerconvertFile(String fileName, String format, org.apache.cxf.jaxrs.ext.multipart.Attachment fileContent) Converts a given file and returns the conversion.
- 
Method Details- 
convertDocument@GET @Path("/convertDocument") @Produces("application/octet-stream") jakarta.activation.DataHandler convertDocument(@QueryParam("docId") long docId, @QueryParam("fileVersion") String fileVersion, @QueryParam("format") String format) throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.core.security.authorization.PermissionException, FeatureNotEnabledException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException, IOException Converts an existing document and saves the generated conversion in LogicalDOC.- Parameters:
- docId- The document id
- fileVersion- The file version
- format- The output conversion format
- Returns:
- The conversion's binary
- Throws:
- IOException- I/O error
- com.logicaldoc.core.security.authorization.PermissionException- The user does not have enough permissions
- com.logicaldoc.core.PersistenceException- Error in the data layer
- com.logicaldoc.webservice.WebserviceException- Error in the webservice layer
- com.logicaldoc.core.security.authentication.AuthenticationException- The user was not authenticated
- FeatureNotEnabledException- The required feature is not enabled
 
- 
convertDocumentAndSave@GET @Path("/convertDocumentAndSave") @Produces("text/plain") long convertDocumentAndSave(@QueryParam("docId") long docId, @QueryParam("fileVersion") String fileVersion, @QueryParam("format") String format) throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.core.security.authorization.PermissionException, FeatureNotEnabledException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException, IOException Converts an existing document and saves the generated conversion in LogicalDOC.- Parameters:
- docId- The document id
- fileVersion- The file version
- format- The output conversion format
- Returns:
- the ID of the generated conversion file
- Throws:
- IOException- I/O error
- com.logicaldoc.core.security.authorization.PermissionException- The user does not have enough permissions
- com.logicaldoc.core.PersistenceException- Error in the data layer
- com.logicaldoc.webservice.WebserviceException- Error in the webservice layer
- com.logicaldoc.core.security.authentication.AuthenticationException- The user was not authenticated
- FeatureNotEnabledException- The required feature is not enabled
 
- 
convertDocumentToPdf@GET @Path("/convertDocumentToPdf") void convertDocumentToPdf(@QueryParam("docId") long docId, @QueryParam("fileVersion") String fileVersion) throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.core.security.authorization.PermissionException, FeatureNotEnabledException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException, IOException Creates the PDF conversion of the given document. If the conversion was already created, nothing will happen.- Parameters:
- docId- The document id
- fileVersion- The specific file version(it can be empty)
- Throws:
- IOException- I/O error
- com.logicaldoc.core.security.authorization.PermissionException- The user does not have enough permissions
- com.logicaldoc.core.PersistenceException- Error in the data layer
- com.logicaldoc.webservice.WebserviceException- Error in the webservice layer
- com.logicaldoc.core.security.authentication.AuthenticationException- The user was not authenticated
- FeatureNotEnabledException- The required feature is not enabled
 
- 
convertFile@POST @Path("/convertFile") @Consumes("multipart/form-data") @Produces("application/octet-stream") jakarta.activation.DataHandler convertFile(String fileName, String format, org.apache.cxf.jaxrs.ext.multipart.Attachment fileContent) throws com.logicaldoc.core.security.authentication.AuthenticationException, FeatureNotEnabledException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException, IOException Converts a given file and returns the conversion.- 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:
- IOException- I/O error
- com.logicaldoc.core.PersistenceException- Error in the data layer
- com.logicaldoc.webservice.WebserviceException- Error in the webservice layer
- com.logicaldoc.core.security.authentication.AuthenticationException- The user was not authenticated
- FeatureNotEnabledException- The required feature is not enabled
 
 
-