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
-
-
Field Summary
-
Fields inherited from class com.logicaldoc.enterprise.webservice.soap.endpoint.SoapEnterpriseDocumentService
CHUNK_NUMBER_FORMAT
-
-
Constructor Summary
Constructors Constructor Description RestEnterpriseDocumentService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckin(Long docId, String comment, String filename, String releaseStr, 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.voiddeleteChunks()Deletes all the chunks in the current upload sessionjavax.activation.DataHandlerdownloadChunk(long docId, String version, long start, long length)voiduploadChunk(byte[] messageBody)voiduploadChunkSB(InputStream is)-
Methods inherited from class com.logicaldoc.enterprise.webservice.soap.endpoint.SoapEnterpriseDocumentService
checkin, create, deleteChunks, downloadChunk, uploadChunk
-
-
-
-
Method Detail
-
uploadChunk
@POST @Path("/uploadChunk") @Consumes("application/octet-stream") public void uploadChunk(byte[] messageBody) throws Exception- Specified by:
uploadChunkin interfaceEnterpriseDocumentService- Throws:
Exception
-
uploadChunkSB
@POST @Path("/uploadChunkSB") @Consumes("application/octet-stream") public void uploadChunkSB(InputStream is) throws Exception- Specified by:
uploadChunkSBin interfaceEnterpriseDocumentService- Throws:
Exception
-
deleteChunks
@DELETE @Path("/deleteChunks") public void deleteChunks() throws ExceptionDescription copied from interface:EnterpriseDocumentServiceDeletes all the chunks in the current upload session- Specified by:
deleteChunksin interfaceEnterpriseDocumentService- Throws:
Exception- a generic error
-
create
@POST @Path("/create") public com.logicaldoc.webservice.model.WSDocument create(com.logicaldoc.webservice.model.WSDocument document) throws ExceptionDescription 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:
Exception- error in the server or in the database
-
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 Exception- Specified by:
downloadChunkin interfaceEnterpriseDocumentService- Throws:
Exception
-
checkin
@Path("/checkin") @Consumes("multipart/form-data") public void checkin(Long docId, String comment, String filename, String releaseStr, com.logicaldoc.webservice.model.WSDocument docVO) throws ExceptionDescription 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 namereleaseStr- 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:
Exception- error in the server or in the database
-
-