001package org.kuali.ole.docstore.service;
002
003import org.kuali.ole.docstore.OleDocStoreException;
004import org.kuali.ole.docstore.model.xmlpojo.ingest.Request;
005import org.kuali.ole.docstore.model.xmlpojo.ingest.Response;
006import org.kuali.ole.docstore.process.batch.BulkProcessRequest;
007import org.kuali.ole.pojo.OleException;
008
009import javax.jcr.RepositoryException;
010import java.io.FileNotFoundException;
011
012/**
013 * Defines the services/operations that can be performed on one or more documents.
014 * This is the API for clients running in the same JVM as DocStore.
015 * User: tirumalesh.b
016 * Date: 28/8/12 Time: 11:54 AM
017 */
018public interface DocumentService {
019
020    /**
021     * Processes the documents, as per the operation specified, in the given request.
022     * The given request specifies a single operation to be performed on one or more documents
023     * of same or different [cat-type-format].
024     *
025     * @param request
026     * @return
027     * @throws OleDocStoreException
028     */
029    public Response process(Request request) throws OleDocStoreException, RepositoryException, OleException, FileNotFoundException;
030
031    /**
032     * Processes the documents, as per the operation specified, in the given request.
033     * The given request specifies a single operation to be performed on generally a large number of documents
034     * of same [cat-type-format].
035     *
036     * @param request
037     * @return
038     * @throws OleDocStoreException
039     */
040    public void bulkProcess(BulkProcessRequest request) throws Exception;
041
042    /*
043        public Response ingest(Request request) throws OleDocStoreException;
044
045        public Response checkout(Request request) throws OleDocStoreException;
046
047        public Response checkin(Request request) throws OleDocStoreException;
048
049        public Response delete(Request request) throws OleDocStoreException;
050    */
051
052}