org.kuali.ole.docstore.document
Class WorkInstanceDocumentManager

java.lang.Object
  extended by org.kuali.ole.docstore.document.AbstractDocumentManager
      extended by org.kuali.ole.docstore.document.WorkInstanceDocumentManager
All Implemented Interfaces:
DocumentManager
Direct Known Subclasses:
WorkHoldingsDocumentManager, WorkItemDocumentManager

public class WorkInstanceDocumentManager
extends AbstractDocumentManager

Implements the DocumentManager interface for [Work-Instance-*] documents.

Version:
%I%, %G%

Field Summary
 
Fields inherited from class org.kuali.ole.docstore.document.AbstractDocumentManager
docCategory, docFormat, docType, nodeManager, repositoryManager
 
Constructor Summary
protected WorkInstanceDocumentManager()
           
 
Method Summary
protected  void addNewRecordsToDocStore(RequestDocument requestDocument, javax.jcr.Session session)
           
 ResponseDocument bind(RequestDocument requestDocument, javax.jcr.Session session, String operation)
           
protected  void buildLinkedResponseDocuments(RequestDocument requestDocument, ResponseDocument responseDocument)
          Used in the case of adding an item.
 ResponseDocument buildResponseDocument(RequestDocument requestDocument)
           
 ResponseDocument buildResponseDocument(RequestDocument requestDocument, javax.jcr.Session session)
           
protected  String buildSortableCallNumber(String callNumber, String codeValue)
           
protected  String checkOutContent(javax.jcr.Node nodeByUUID, String format, String user)
           
 void computeCallNumberType(CallNumber callNumber)
          Compute 'call number type name' if a valid 'call number type code' is available
 ResponseDocument delete(RequestDocument requestDocument, javax.jcr.Session session)
           
 List<ResponseDocument> deleteVerify(List<RequestDocument> requestDocument, javax.jcr.Session session)
           
 ResponseDocument deleteVerify(RequestDocument requestDocument, javax.jcr.Session session)
           
static WorkInstanceDocumentManager getInstance()
           
 List<RequestDocument> getParsedHoldingsNItemDocuments(RequestDocument instanceDoc, List<String> linkedBibIds)
          Method to get Parsed Holdings & Item Documents.
protected  void modifyContent(RequestDocument reqDoc, javax.jcr.Session session, javax.jcr.Node nodeByUUID)
           
 void modifyDocumentContent(RequestDocument document, String nodeIdentifier, String parentNodeIdentifier)
           
protected  void processCallNumber(OleHoldings oleHolding)
           
 javax.jcr.Node storeDocument(RequestDocument requestDocument, javax.jcr.Session session, ResponseDocument responseDocument)
          Deletes the given documents, along with linked documents, from the discovery.
 void transferInstances(List<RequestDocument> requestDocuments, javax.jcr.Session session)
           
 void transferItems(List<RequestDocument> requestDocuments, javax.jcr.Session session)
           
 ResponseDocument unbind(RequestDocument requestDocument, javax.jcr.Session session, String operation)
           
 void updateShelvingOrder(Item item, OleHoldings oleHolding)
           
 void validateCallNumber(CallNumber cNum)
           
 void validateCallNumber(CallNumber itemCNum, OleHoldings holdings)
           
protected  boolean validateCallNumber(String callNumber, String codeValue)
           
 void validateInput(RequestDocument requestDocument, javax.jcr.Session session, List<String> fieldValues)
           
 
Methods inherited from class org.kuali.ole.docstore.document.AbstractDocumentManager
batchIngest, buildResponseDocument, buildResponseDocuments, bulkIngest, checkin, checkin, checkInstanceForBoundsWith, checkInstancesOrItemsExistsInOLE, checkInstancesOrItemsExistsInOLE, checkItemsExists, checkout, checkout, convertContentToBytes, delete, delete, deleteFromRepository, deleteIndex, getVersionManager, index, ingest, ingest, isVersioningEnabled, modifyAdditionalAttributes, prepareRequestDocument, setResponseParameters, store, store, storeLinkedDocuments, updateContentToNode, updateDocstore, updateIndex, updateRecord, updateVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkInstanceDocumentManager

protected WorkInstanceDocumentManager()
Method Detail

getInstance

public static WorkInstanceDocumentManager getInstance()

modifyDocumentContent

public void modifyDocumentContent(RequestDocument document,
                                  String nodeIdentifier,
                                  String parentNodeIdentifier)
Overrides:
modifyDocumentContent in class AbstractDocumentManager

storeDocument

public javax.jcr.Node storeDocument(RequestDocument requestDocument,
                                    javax.jcr.Session session,
                                    ResponseDocument responseDocument)
                             throws OleDocStoreException
Description copied from interface: DocumentManager
Deletes the given documents, along with linked documents, from the discovery.

Specified by:
storeDocument in interface DocumentManager
Overrides:
storeDocument in class AbstractDocumentManager
Throws:
OleDocStoreException

modifyContent

protected void modifyContent(RequestDocument reqDoc,
                             javax.jcr.Session session,
                             javax.jcr.Node nodeByUUID)
                      throws javax.jcr.RepositoryException,
                             FileNotFoundException,
                             OleDocStoreException
Overrides:
modifyContent in class AbstractDocumentManager
Throws:
javax.jcr.RepositoryException
FileNotFoundException
OleDocStoreException

addNewRecordsToDocStore

protected void addNewRecordsToDocStore(RequestDocument requestDocument,
                                       javax.jcr.Session session)
                                throws OleDocStoreException
Overrides:
addNewRecordsToDocStore in class AbstractDocumentManager
Throws:
OleDocStoreException

bind

public ResponseDocument bind(RequestDocument requestDocument,
                             javax.jcr.Session session,
                             String operation)
                      throws OleDocStoreException,
                             javax.jcr.RepositoryException,
                             OleException,
                             FileNotFoundException
Specified by:
bind in interface DocumentManager
Overrides:
bind in class AbstractDocumentManager
Throws:
OleDocStoreException
javax.jcr.RepositoryException
OleException
FileNotFoundException

unbind

public ResponseDocument unbind(RequestDocument requestDocument,
                               javax.jcr.Session session,
                               String operation)
                        throws OleDocStoreException,
                               javax.jcr.RepositoryException,
                               OleException,
                               FileNotFoundException
Specified by:
unbind in interface DocumentManager
Overrides:
unbind in class AbstractDocumentManager
Throws:
OleDocStoreException
javax.jcr.RepositoryException
OleException
FileNotFoundException

deleteVerify

public List<ResponseDocument> deleteVerify(List<RequestDocument> requestDocument,
                                           javax.jcr.Session session)

deleteVerify

public ResponseDocument deleteVerify(RequestDocument requestDocument,
                                     javax.jcr.Session session)
                              throws Exception
Throws:
Exception

delete

public ResponseDocument delete(RequestDocument requestDocument,
                               javax.jcr.Session session)
                        throws Exception
Specified by:
delete in interface DocumentManager
Overrides:
delete in class AbstractDocumentManager
Throws:
Exception

checkOutContent

protected String checkOutContent(javax.jcr.Node nodeByUUID,
                                 String format,
                                 String user)
                          throws javax.jcr.RepositoryException,
                                 OleDocStoreException,
                                 FileNotFoundException
Overrides:
checkOutContent in class AbstractDocumentManager
Throws:
javax.jcr.RepositoryException
OleDocStoreException
FileNotFoundException

getParsedHoldingsNItemDocuments

public List<RequestDocument> getParsedHoldingsNItemDocuments(RequestDocument instanceDoc,
                                                             List<String> linkedBibIds)
                                                      throws OleDocStoreException
Method to get Parsed Holdings & Item Documents.

Parameters:
instanceDoc - - Instance document in format OleML
linkedBibIds - TODO
Returns:
Throws:
OleDocStoreException

processCallNumber

protected void processCallNumber(OleHoldings oleHolding)
                          throws OleDocStoreException
Throws:
OleDocStoreException

validateCallNumber

public void validateCallNumber(CallNumber cNum)
                        throws OleDocStoreException
Throws:
OleDocStoreException

validateCallNumber

public void validateCallNumber(CallNumber itemCNum,
                               OleHoldings holdings)
                        throws OleDocStoreException
Throws:
OleDocStoreException

updateShelvingOrder

public void updateShelvingOrder(Item item,
                                OleHoldings oleHolding)
                         throws OleDocStoreException
Throws:
OleDocStoreException

validateCallNumber

protected boolean validateCallNumber(String callNumber,
                                     String codeValue)
                              throws OleDocStoreException
Throws:
OleDocStoreException

buildSortableCallNumber

protected String buildSortableCallNumber(String callNumber,
                                         String codeValue)
                                  throws OleDocStoreException
Throws:
OleDocStoreException

buildResponseDocument

public ResponseDocument buildResponseDocument(RequestDocument requestDocument)
Specified by:
buildResponseDocument in interface DocumentManager
Overrides:
buildResponseDocument in class AbstractDocumentManager

buildResponseDocument

public ResponseDocument buildResponseDocument(RequestDocument requestDocument,
                                              javax.jcr.Session session)

buildLinkedResponseDocuments

protected void buildLinkedResponseDocuments(RequestDocument requestDocument,
                                            ResponseDocument responseDocument)
Used in the case of adding an item.

Overrides:
buildLinkedResponseDocuments in class AbstractDocumentManager
Parameters:
requestDocument -
responseDocument -

transferItems

public void transferItems(List<RequestDocument> requestDocuments,
                          javax.jcr.Session session)
                   throws Exception
Throws:
Exception

transferInstances

public void transferInstances(List<RequestDocument> requestDocuments,
                              javax.jcr.Session session)
                       throws Exception
Throws:
Exception

validateInput

public void validateInput(RequestDocument requestDocument,
                          javax.jcr.Session session,
                          List<String> fieldValues)
                   throws OleDocStoreException
Throws:
OleDocStoreException

computeCallNumberType

public void computeCallNumberType(CallNumber callNumber)
Compute 'call number type name' if a valid 'call number type code' is available

Parameters:
callNumber -


Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.