org.kuali.ole.deliver.loan
Class LoanProcessor

java.lang.Object
  extended by org.kuali.ole.deliver.loan.LoanProcessor

public class LoanProcessor
extends Object

The Loan Processor class acts between the controller and the service layers in delegating the appropriate service to the functions called from the controller.


Constructor Summary
LoanProcessor()
           
 
Method Summary
 OleLoanDocument addLoan(String patronBarcode, String itemBarcode, OleLoanDocument oleLoanDocument)
          Retrieved item object from docstore using itemid .Fetch location code,item available status from item object and retrieve title from bib object.
 String buildItemContent(Item oleItem)
          This method creates and return itemContent using OleItem
 String buildItemContentWithItemStatus(Item oleItem, String itemStatus)
          This method creates and return itemContent using OleItem
 boolean checkOverRidePermission(String principalId)
           
 boolean checkPendingRequestforItem(String itemBarcode)
           
 void createCirculationHistoryAndTemporaryHistoryRecords(OleLoanDocument oleLoanDocument)
           
 LocationLevel createLocationLevel(String locationName, LocationLevel locationLevel)
           
 void deletePatronUserNote(String patronId, String patronNoteTypeId)
           
 void deleteRequestRecord(OleDeliverRequestBo oleDeliverRequestBo)
           
 void generatePatronBillPayment(OleLoanDocument oleLoanDocument, String feeTypeName, BigDecimal fineAmount)
           
protected  Map<String,String> getAgendaContext(String agendaName)
          This method returns agendaContext using agendaName.
 BibliographicRecord getBibliographicRecord(String title)
           
 String getborrowerTypeName(String borrowerId)
          This method returns BorrowerTypeName using borrowerId
 org.kuali.rice.krms.api.engine.EngineResults getEngineResults(String agendaName, HashMap<String,Object> termValues)
           
 OleHoldings getHoldingRecord(Item item)
           
 String getItemCallNumber(CallNumber callNumber)
          Retrieves Item call number.
 Map getItemDetails(String itemBarcode)
          Retrieved Title name from docstore using itemid.
 Item getItemPojo(String itemXml)
          Converts item xml to item pojo.
 Item getItemRecord(OleLoanFastAdd oleLoanFastAdd)
           
 String getItemTypeFromItem(ItemType itemType)
           
 String getItemValidationLocation(LocationLevel oleLocationLevel)
           
 String getItemXML(String itemUUID)
          Retrieves item xml using itemuuid.
 OleLoanDocument getLoanDocument(String barcode, String realPtrnBarcode, boolean selfCheckOut)
          Retrieve information about patron name,borrorwer type and patron loaned items
 OleLocation getLocationByLocationId(String locationId)
          This method returns Location using locationId.
 OleCirculationDesk getOleCirculationDesk(String id)
           
 OleCirculationPolicyService getOleCirculationPolicyService()
          Gets the oleCirculationPolicyService attribute.
 OleDeliverRequestDocumentHelperServiceImpl getOleDeliverRequestDocumentHelperService()
           
 OleLoanDocument getOleLoanDocumentUsingItemBarcode(String itemBarcode)
           
 void getOleLocationLevel(OleLoanDocument oleLoanDocument, LocationLevel locationLevel)
          Populate location levels.
 String getParameter(String name)
           
 List<OleLoanDocument> getPatronLoanedItem(String patronId)
          This method returns PatronLoanedItem using patronId
 OleLoanDocument getPatronRenewalItem(String itemId)
          This method returns PatronLoanedItem using itemId
 List<OleDeliverRequestBo> getPatronRequestRecords(String patronId)
          This method returns PatronRequestRecords using patronId
 List<OleTemporaryCirculationHistory> getPatronTemporaryCirculationHistoryRecords(String patronId)
          This method returns PatronTemporaryCirculationHistoryRecord using patronId
protected  Map<String,String> getSelectionContext(String contextName)
          This method returns selectionContext using contextName.
 String getShelvingLocation(LocationLevel oleLocationLevel)
           
 String getUrl(String patronId)
          This method will return url for view link in patron record.
 boolean itemValidation(Item oleItem)
           
 OleLoanDocument overrideSaveLoanForRenewal(OleLoanDocument oleLoanDocument)
           
 void postLoan(Item oleItem)
          This method invokes docStore to store item and returns itemRecordUpdateResponse.
 OleLoanDocument returnLoan(OleLoanDocument oleLoanDocument)
           
 OleLoanDocument returnLoan(String itemBarcode, OleLoanDocument oleLoanDocument)
          Return the loaned Items
 void saveLoan(OleLoanDocument oleLoanDocument)
          persist the loan document and update item status to docstore.
 void setBibInfo(OleLoanDocument oleLoanDocument)
           
 List<OleLoanDocument> setListValues(List<OleLoanDocument> loanList, List<OleLoanDocument> existingLoanList, boolean claimsFlag, String claimsReturnNote)
          Compares the checked items from existing and current loan session and form a common list.
 void updateClaimsReturnedInLoanDocument(OleLoanDocument oleLoanDocument, boolean claimsReturned)
           
 void updateItemStatus(Item oleItem, String itemStatus)
          This method invokes docStore to store item and returns itemRecordUpdateResponse.
 void updateItemStatusWithMissingItem(OleLoanDocument oleLoanDocument)
           
 void updateLoan(List<OleLoanDocument> updateDueDate)
          Update loan due date in loan record.
 boolean validateFastAddItem(String barcode)
          Check item barcode exist in docstore.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoanProcessor

public LoanProcessor()
Method Detail

getOleDeliverRequestDocumentHelperService

public OleDeliverRequestDocumentHelperServiceImpl getOleDeliverRequestDocumentHelperService()

getOleCirculationPolicyService

public OleCirculationPolicyService getOleCirculationPolicyService()
Gets the oleCirculationPolicyService attribute.

Returns:
Returns the oleCirculationPolicyService

getLoanDocument

public OleLoanDocument getLoanDocument(String barcode,
                                       String realPtrnBarcode,
                                       boolean selfCheckOut)
                                throws Exception
Retrieve information about patron name,borrorwer type and patron loaned items

Parameters:
barcode -
Returns:
OleLoanDocument
Throws:
Exception

getborrowerTypeName

public String getborrowerTypeName(String borrowerId)
This method returns BorrowerTypeName using borrowerId

Parameters:
borrowerId -
Returns:
String

getPatronLoanedItem

public List<OleLoanDocument> getPatronLoanedItem(String patronId)
                                          throws Exception
This method returns PatronLoanedItem using patronId

Parameters:
patronId -
Returns:
List
Throws:
Exception

getItemTypeFromItem

public String getItemTypeFromItem(ItemType itemType)

getPatronTemporaryCirculationHistoryRecords

public List<OleTemporaryCirculationHistory> getPatronTemporaryCirculationHistoryRecords(String patronId)
                                                                                 throws Exception
This method returns PatronTemporaryCirculationHistoryRecord using patronId

Parameters:
patronId -
Returns:
List
Throws:
Exception

getPatronRequestRecords

public List<OleDeliverRequestBo> getPatronRequestRecords(String patronId)
                                                  throws Exception
This method returns PatronRequestRecords using patronId

Parameters:
patronId -
Returns:
List
Throws:
Exception

getItemDetails

public Map getItemDetails(String itemBarcode)
                   throws Exception
Retrieved Title name from docstore using itemid.

Parameters:
itemBarcode -
Returns:
Map
Throws:
Exception

getShelvingLocation

public String getShelvingLocation(LocationLevel oleLocationLevel)

getItemCallNumber

public String getItemCallNumber(CallNumber callNumber)
                         throws Exception
Retrieves Item call number.

Parameters:
callNumber -
Returns:
Throws:
Exception

getItemXML

public String getItemXML(String itemUUID)
                  throws Exception
Retrieves item xml using itemuuid.

Parameters:
itemUUID -
Returns:
Throws:
Exception

getItemPojo

public Item getItemPojo(String itemXml)
                 throws Exception
Converts item xml to item pojo.

Parameters:
itemXml -
Returns:
Throws:
Exception

addLoan

public OleLoanDocument addLoan(String patronBarcode,
                               String itemBarcode,
                               OleLoanDocument oleLoanDocument)
                        throws Exception
Retrieved item object from docstore using itemid .Fetch location code,item available status from item object and retrieve title from bib object.

Parameters:
patronBarcode -
itemBarcode -
oleLoanDocument -
Returns:
OleLoanDocument
Throws:
Exception

validateFastAddItem

public boolean validateFastAddItem(String barcode)
                            throws Exception
Check item barcode exist in docstore.

Parameters:
barcode -
Returns:
Throws:
Exception

getEngineResults

public org.kuali.rice.krms.api.engine.EngineResults getEngineResults(String agendaName,
                                                                     HashMap<String,Object> termValues)
                                                              throws Exception
Throws:
Exception

getSelectionContext

protected Map<String,String> getSelectionContext(String contextName)
                                          throws Exception
This method returns selectionContext using contextName.

Parameters:
contextName -
Returns:
Map
Throws:
Exception

getAgendaContext

protected Map<String,String> getAgendaContext(String agendaName)
                                       throws Exception
This method returns agendaContext using agendaName.

Parameters:
agendaName -
Returns:
Map
Throws:
Exception

getLocationByLocationId

public OleLocation getLocationByLocationId(String locationId)
                                    throws Exception
This method returns Location using locationId.

Parameters:
locationId -
Returns:
OleLocation
Throws:
Exception

getOleLocationLevel

public void getOleLocationLevel(OleLoanDocument oleLoanDocument,
                                LocationLevel locationLevel)
                         throws Exception
Populate location levels.

Parameters:
oleLoanDocument -
locationLevel -
Throws:
Exception

saveLoan

public void saveLoan(OleLoanDocument oleLoanDocument)
              throws Exception
persist the loan document and update item status to docstore.

Parameters:
oleLoanDocument -
Throws:
Exception

updateLoan

public void updateLoan(List<OleLoanDocument> updateDueDate)
                throws Exception
Update loan due date in loan record.

Parameters:
updateDueDate -
Throws:
Exception

setListValues

public List<OleLoanDocument> setListValues(List<OleLoanDocument> loanList,
                                           List<OleLoanDocument> existingLoanList,
                                           boolean claimsFlag,
                                           String claimsReturnNote)
Compares the checked items from existing and current loan session and form a common list.

Parameters:
loanList -
existingLoanList -
claimsFlag -
claimsReturnNote -
Returns:

buildItemContent

public String buildItemContent(Item oleItem)
                        throws Exception
This method creates and return itemContent using OleItem

Parameters:
oleItem -
Returns:
String
Throws:
Exception

postLoan

public void postLoan(Item oleItem)
              throws Exception
This method invokes docStore to store item and returns itemRecordUpdateResponse.

Parameters:
oleItem -
Throws:
Exception

getBibliographicRecord

public BibliographicRecord getBibliographicRecord(String title)

createLocationLevel

public LocationLevel createLocationLevel(String locationName,
                                         LocationLevel locationLevel)

getHoldingRecord

public OleHoldings getHoldingRecord(Item item)

getItemRecord

public Item getItemRecord(OleLoanFastAdd oleLoanFastAdd)

checkOverRidePermission

public boolean checkOverRidePermission(String principalId)

itemValidation

public boolean itemValidation(Item oleItem)

getItemValidationLocation

public String getItemValidationLocation(LocationLevel oleLocationLevel)

deletePatronUserNote

public void deletePatronUserNote(String patronId,
                                 String patronNoteTypeId)
                          throws Exception
Throws:
Exception

returnLoan

public OleLoanDocument returnLoan(String itemBarcode,
                                  OleLoanDocument oleLoanDocument)
                           throws Exception
Return the loaned Items

Parameters:
itemBarcode -
oleLoanDocument -
Returns:
OleLoanDocument
Throws:
Exception

getOleCirculationDesk

public OleCirculationDesk getOleCirculationDesk(String id)

generatePatronBillPayment

public void generatePatronBillPayment(OleLoanDocument oleLoanDocument,
                                      String feeTypeName,
                                      BigDecimal fineAmount)

returnLoan

public OleLoanDocument returnLoan(OleLoanDocument oleLoanDocument)
                           throws Exception
Throws:
Exception

deleteRequestRecord

public void deleteRequestRecord(OleDeliverRequestBo oleDeliverRequestBo)

createCirculationHistoryAndTemporaryHistoryRecords

public void createCirculationHistoryAndTemporaryHistoryRecords(OleLoanDocument oleLoanDocument)

updateItemStatus

public void updateItemStatus(Item oleItem,
                             String itemStatus)
                      throws Exception
This method invokes docStore to store item and returns itemRecordUpdateResponse.

Parameters:
oleItem -
itemStatus -
Throws:
Exception

buildItemContentWithItemStatus

public String buildItemContentWithItemStatus(Item oleItem,
                                             String itemStatus)
                                      throws Exception
This method creates and return itemContent using OleItem

Parameters:
oleItem -
itemStatus -
Returns:
String
Throws:
Exception

getOleLoanDocumentUsingItemBarcode

public OleLoanDocument getOleLoanDocumentUsingItemBarcode(String itemBarcode)

updateItemStatusWithMissingItem

public void updateItemStatusWithMissingItem(OleLoanDocument oleLoanDocument)
                                     throws Exception
Throws:
Exception

getPatronRenewalItem

public OleLoanDocument getPatronRenewalItem(String itemId)
                                     throws Exception
This method returns PatronLoanedItem using itemId

Parameters:
itemId -
Returns:
List
Throws:
Exception

setBibInfo

public void setBibInfo(OleLoanDocument oleLoanDocument)
                throws Exception
Throws:
Exception

updateClaimsReturnedInLoanDocument

public void updateClaimsReturnedInLoanDocument(OleLoanDocument oleLoanDocument,
                                               boolean claimsReturned)

getUrl

public String getUrl(String patronId)
This method will return url for view link in patron record.

Returns:
Url

checkPendingRequestforItem

public boolean checkPendingRequestforItem(String itemBarcode)

getParameter

public String getParameter(String name)

overrideSaveLoanForRenewal

public OleLoanDocument overrideSaveLoanForRenewal(OleLoanDocument oleLoanDocument)
                                           throws Exception
Throws:
Exception


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