View Javadoc
1   package org.kuali.ole.docstore.service;
2   
3   import org.kuali.ole.docstore.OleDocStoreException;
4   import org.kuali.ole.docstore.model.xmlpojo.ingest.Request;
5   import org.kuali.ole.docstore.model.xmlpojo.ingest.Response;
6   import org.kuali.ole.docstore.process.batch.BulkProcessRequest;
7   import org.kuali.ole.pojo.OleException;
8   
9   import javax.jcr.RepositoryException;
10  import java.io.FileNotFoundException;
11  
12  /**
13   * Defines the services/operations that can be performed on one or more documents.
14   * This is the API for clients running in the same JVM as DocStore.
15   * User: tirumalesh.b
16   * Date: 28/8/12 Time: 11:54 AM
17   */
18  public interface DocumentService {
19  
20      /**
21       * Processes the documents, as per the operation specified, in the given request.
22       * The given request specifies a single operation to be performed on one or more documents
23       * of same or different [cat-type-format].
24       *
25       * @param request
26       * @return
27       * @throws OleDocStoreException
28       */
29      public Response process(Request request) throws OleDocStoreException, RepositoryException, OleException, FileNotFoundException;
30  
31      /**
32       * Processes the documents, as per the operation specified, in the given request.
33       * The given request specifies a single operation to be performed on generally a large number of documents
34       * of same [cat-type-format].
35       *
36       * @param request
37       * @return
38       * @throws OleDocStoreException
39       */
40      public void bulkProcess(BulkProcessRequest request) throws Exception;
41  
42      /*
43          public Response ingest(Request request) throws OleDocStoreException;
44  
45          public Response checkout(Request request) throws OleDocStoreException;
46  
47          public Response checkin(Request request) throws OleDocStoreException;
48  
49          public Response delete(Request request) throws OleDocStoreException;
50      */
51  
52  }