View Javadoc
1   package org.kuali.ole.docstore.repository;
2   
3   import org.kuali.ole.docstore.OleDocStoreException;
4   import org.kuali.ole.docstore.model.xmlpojo.ingest.RequestDocument;
5   
6   import javax.jcr.Node;
7   import javax.jcr.RepositoryException;
8   import javax.jcr.Session;
9   import java.io.FileNotFoundException;
10  import java.io.IOException;
11  
12  /**
13   * Interface for dealing with nodes in the repository.
14   *
15   * @author tirumalesh.b
16   * @version %I%, %G%
17   *          Date: 28/8/12 Time: 5:40 PM
18   */
19  public interface NodeManager {
20  
21      public Node getParentNode(RequestDocument requestDocument, Session session) throws OleDocStoreException;
22  
23      //    public Node createNode(RequestDocument requestDocument, Session session) throws OleDocStoreException;
24  
25      public Node createFileNode(RequestDocument document, String name, Node parentNode, Session session)
26              throws OleDocStoreException;
27  
28      public Node createContentNode(Node fileNode, RequestDocument document, Node parentNode, Session session)
29              throws OleDocStoreException;
30  
31      public void enableVersioning(Node node) throws OleDocStoreException;
32  
33      //    public Node createNode(Node node, RequestDocument requestDocument, RequestDocument linkedRequestDocument, Session session) throws OleDocStoreException;
34      public void linkNodes(Node node, Node linkedDocumentNode, Session session) throws OleDocStoreException;
35  
36      //    public boolean isVersioningEnabled();
37  
38      public Node getNodeByUUID(Session session, String uuid) throws OleDocStoreException;
39  
40      public String getData(Node nodeByUUID) throws OleDocStoreException, RepositoryException, FileNotFoundException;
41  
42      public byte[] getBinaryData(Node nodeByUUID) throws RepositoryException, IOException;
43  
44      public void ingestItemRecForInstance(RequestDocument reqDoc, String id, Session session) throws OleDocStoreException;
45  
46      public String getInstanceData(Node instanceNode) throws RepositoryException, OleDocStoreException, FileNotFoundException;
47  
48  }