Class RestEnterpriseDocumentService
java.lang.Object
com.logicaldoc.webservice.AbstractService
com.logicaldoc.enterprise.webservice.soap.endpoint.SoapEnterpriseDocumentService
com.logicaldoc.enterprise.webservice.rest.endpoint.RestEnterpriseDocumentService
- All Implemented Interfaces:
- EnterpriseDocumentService,- EnterpriseDocumentService
@Path("/")
@Consumes("application/json")
@Produces("application/json")
public class RestEnterpriseDocumentService
extends SoapEnterpriseDocumentService
implements EnterpriseDocumentService
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionclass
- 
Field SummaryFields inherited from class com.logicaldoc.enterprise.webservice.soap.endpoint.SoapEnterpriseDocumentServiceCHUNK_NUMBER_FORMAT
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcheckin(Long docId, String comment, String filename, boolean release, com.logicaldoc.webservice.model.WSDocument docVO) Checks in an existing document with the given identifier to create a new version, it uses the uploaded chunkscom.logicaldoc.webservice.model.WSDocumentcreate(com.logicaldoc.webservice.model.WSDocument document) Creates a new document using the uploaded chunks.voidDeletes all the chunks in the current upload sessionjakarta.activation.DataHandlerdownloadChunk(long docId, String version, long start, long length) com.logicaldoc.webservice.model.WSDocumentMerges a set of documents into a single PDFvoiduploadChunk(byte[] messageBody) voidMethods inherited from class com.logicaldoc.enterprise.webservice.soap.endpoint.SoapEnterpriseDocumentServicecheckin, create, deleteChunks, downloadChunk, merge, uploadChunkMethods inherited from class com.logicaldoc.webservice.AbstractServiceconvertDateToString, convertStringToDate, getCurrentMessage, isValidateSession, setCurrentMessage, setValidateSession
- 
Constructor Details- 
RestEnterpriseDocumentServicepublic RestEnterpriseDocumentService()
 
- 
- 
Method Details- 
uploadChunk@POST @Path("/uploadChunk") @Consumes("application/octet-stream") public void uploadChunk(byte[] messageBody) throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException, IOException - Specified by:
- uploadChunkin interface- EnterpriseDocumentService
- Throws:
- com.logicaldoc.core.security.authentication.AuthenticationException
- com.logicaldoc.webservice.WebserviceException
- com.logicaldoc.core.PersistenceException
- IOException
 
- 
uploadChunkIS@POST @Path("/uploadChunkIS") @Consumes("application/octet-stream") public void uploadChunkIS(InputStream is) throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException, IOException - Specified by:
- uploadChunkISin interface- EnterpriseDocumentService
- Throws:
- com.logicaldoc.core.security.authentication.AuthenticationException
- com.logicaldoc.webservice.WebserviceException
- com.logicaldoc.core.PersistenceException
- IOException
 
- 
deleteChunks@DELETE @Path("/deleteChunks") public void deleteChunks() throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException, IOExceptionDescription copied from interface:EnterpriseDocumentServiceDeletes all the chunks in the current upload session- Specified by:
- deleteChunksin interface- EnterpriseDocumentService
- Throws:
- com.logicaldoc.core.security.authentication.AuthenticationException- The user was not authenticated
- com.logicaldoc.webservice.WebserviceException- Error in the webservice logic
- com.logicaldoc.core.PersistenceException- Error in the database layer
- IOException- I/O error
 
- 
create@POST @Path("/create") public com.logicaldoc.webservice.model.WSDocument create(com.logicaldoc.webservice.model.WSDocument document) throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException, IOException Description copied from interface:EnterpriseDocumentServiceCreates a new document using the uploaded chunks. The user can completely customize the document through a value object containing the document's metadata- Specified by:
- createin interface- EnterpriseDocumentService
- Parameters:
- document- Web service value object containing the document's metadata
- Returns:
- The value object containing the document's metadata
- Throws:
- com.logicaldoc.core.security.authentication.AuthenticationException- The user was not authenticated
- com.logicaldoc.webservice.WebserviceException- Error in the webservice logic
- com.logicaldoc.core.PersistenceException- Error in the database layer
- IOException- I/O error
 
- 
downloadChunk@GET @Path("/downloadChunk") @Produces("application/octet-stream") public jakarta.activation.DataHandler downloadChunk(@QueryParam("docId") long docId, @QueryParam("version") String version, @QueryParam("start") long start, @QueryParam("length") long length) throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException, IOException, com.logicaldoc.core.security.authorization.PermissionException - Specified by:
- downloadChunkin interface- EnterpriseDocumentService
- Throws:
- com.logicaldoc.core.security.authentication.AuthenticationException
- com.logicaldoc.webservice.WebserviceException
- com.logicaldoc.core.PersistenceException
- IOException
- com.logicaldoc.core.security.authorization.PermissionException
 
- 
checkin@POST @Path("/checkin") @Consumes("multipart/form-data") public void checkin(Long docId, String comment, String filename, boolean release, com.logicaldoc.webservice.model.WSDocument docVO) throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException, IOException Description copied from interface:EnterpriseDocumentServiceChecks in an existing document with the given identifier to create a new version, it uses the uploaded chunks- Specified by:
- checkinin interface- EnterpriseDocumentService
- Parameters:
- docId- The document id
- comment- The check in operation comment
- filename- The document file name
- release- True if this is a new release(e.g.: 2.0) rather than a subversion(e.g.: 1.1)
- docVO- new metadata for the document
- Throws:
- com.logicaldoc.core.security.authentication.AuthenticationException- The user was not authenticated
- com.logicaldoc.webservice.WebserviceException- Error in the webservice logic
- com.logicaldoc.core.PersistenceException- Error in the database layer
- IOException- I/O error
 
- 
merge@POST @Path("/merge") @Produces({"application/json","application/xml"}) public com.logicaldoc.webservice.model.WSDocument merge(@QueryParam("docIds") List<Long> docIds, @QueryParam("targetFolderId") long targetFolderId, @QueryParam("filename") String filename) throws com.logicaldoc.core.PersistenceException, com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.webservice.WebserviceException, IOException, com.logicaldoc.core.security.authorization.PermissionException, com.logicaldoc.core.security.authorization.UnexistingResourceException Description copied from interface:EnterpriseDocumentServiceMerges a set of documents into a single PDF- Specified by:
- mergein interface- EnterpriseDocumentService
- Parameters:
- docIds- identifiers of the documents to merge
- targetFolderId- identifier of the folder that will receive the merged PDF
- filename- file name of the merged PDF
- Returns:
- the newly created merged document
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the database layer
- com.logicaldoc.core.security.authentication.AuthenticationException- The user was not authenticated
- com.logicaldoc.webservice.WebserviceException- Error in the webservice logic
- IOException- I/O error
- com.logicaldoc.core.security.authorization.PermissionException- The user does not have enough permissions
- com.logicaldoc.core.security.authorization.UnexistingResourceException- Ome of the referenced documents do not exist
 
 
-