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 Summary
Nested ClassesModifier and TypeClassDescriptionclass -
Field Summary
Fields inherited from class com.logicaldoc.enterprise.webservice.soap.endpoint.SoapEnterpriseDocumentService
CHUNK_NUMBER_FORMAT -
Constructor Summary
Constructors -
Method Summary
Modifier 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 sessionjavax.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.SoapEnterpriseDocumentService
checkin, create, deleteChunks, downloadChunk, merge, uploadChunkMethods inherited from class com.logicaldoc.webservice.AbstractService
convertDateToString, convertStringToDate, getCurrentMessage, isValidateSession, setCurrentMessage, setValidateSession
-
Constructor Details
-
RestEnterpriseDocumentService
public 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 interfaceEnterpriseDocumentService- Throws:
com.logicaldoc.core.security.authentication.AuthenticationExceptioncom.logicaldoc.webservice.WebserviceExceptioncom.logicaldoc.core.PersistenceExceptionIOException
-
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 interfaceEnterpriseDocumentService- Throws:
com.logicaldoc.core.security.authentication.AuthenticationExceptioncom.logicaldoc.webservice.WebserviceExceptioncom.logicaldoc.core.PersistenceExceptionIOException
-
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 interfaceEnterpriseDocumentService- Throws:
com.logicaldoc.core.security.authentication.AuthenticationException- The user was not authenticatedcom.logicaldoc.webservice.WebserviceException- Error in the webservice logiccom.logicaldoc.core.PersistenceException- Error in the database layerIOException- 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 interfaceEnterpriseDocumentService- 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 authenticatedcom.logicaldoc.webservice.WebserviceException- Error in the webservice logiccom.logicaldoc.core.PersistenceException- Error in the database layerIOException- I/O error
-
downloadChunk
@GET @Path("/downloadChunk") @Produces("application/octet-stream") public javax.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 interfaceEnterpriseDocumentService- Throws:
com.logicaldoc.core.security.authentication.AuthenticationExceptioncom.logicaldoc.webservice.WebserviceExceptioncom.logicaldoc.core.PersistenceExceptionIOExceptioncom.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 interfaceEnterpriseDocumentService- Parameters:
docId- The document idcomment- The check in operation commentfilename- The document file namerelease- 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 authenticatedcom.logicaldoc.webservice.WebserviceException- Error in the webservice logiccom.logicaldoc.core.PersistenceException- Error in the database layerIOException- 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 interfaceEnterpriseDocumentService- Parameters:
docIds- identifiers of the documents to mergetargetFolderId- identifier of the folder that will receive the merged PDFfilename- file name of the merged PDF- Returns:
- the newly created merged document
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database layercom.logicaldoc.core.security.authentication.AuthenticationException- The user was not authenticatedcom.logicaldoc.webservice.WebserviceException- Error in the webservice logicIOException- I/O errorcom.logicaldoc.core.security.authorization.PermissionException- The user does not have enough permissionscom.logicaldoc.core.security.authorization.UnexistingResourceException- Ome of the referenced documents do not exist
-