org.kuali.ole.loan
Class LoanProcessor

java.lang.Object
  extended by org.kuali.ole.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
protected  Map<String,String> getAgendaContext(String agendaName)
          This method returns agendaContext using agendaName.
 String getborrowerTypeName(String borrowerId)
          This method returns BorrowerTypeName using borrowerId
 org.kuali.rice.krms.api.engine.EngineResults getEngineResults(String agendaName, HashMap<String,Object> termValues)
           
 Map getItemDetails(String itemBarcode)
          Retrieved Title name from docstore using itemid.
 OleLoanDocument getLoanDocument(String barcode)
          Retrieve information about patron name,borrorwer type and patron loaned items
 OleLoanDocument getLocationLevel(OleLoanDocument oleLoanDoc, LocationLevel locationLevel)
          Based on Shelving location from item xml, value for location levels are retrieved.
 int getNoOfItemsLoaned(String olePatronId)
          This method returns number of items loaned for a particular patron id.
 OleCirculationPolicyService getOleCirculationPolicyService()
          Gets the oleCirculationPolicyService attribute.
 OleLoanDocument getOleLocationLevel(OleLoanDocument oleLoanDocument, LocationLevel locationLevel)
           
 List<OleLoanDocument> getPatronLoanedItem(String patronId)
          This method returns PatronLoanedItem using patronId
protected  Map<String,String> getSelectionContext(String contextName)
          This method returns selectionContext using contextName.
 void postLoan(Item oleItem)
          This method invokes docStore to store item and returns itemRecordUpdateResponse.
 void saveLoan(OleLoanDocument oleLoanDocument)
          persist the loan document and update item status to 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

getOleCirculationPolicyService

public OleCirculationPolicyService getOleCirculationPolicyService()
Gets the oleCirculationPolicyService attribute.

Returns:
Returns the oleCirculationPolicyService

getLoanDocument

public OleLoanDocument getLoanDocument(String barcode)
                                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

getItemDetails

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

Parameters:
itemBarcode -
Returns:
Map
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

getNoOfItemsLoaned

public int getNoOfItemsLoaned(String olePatronId)
This method returns number of items loaned for a particular patron id.

Parameters:
olePatronId -
Returns:
int

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

getOleLocationLevel

public OleLoanDocument getOleLocationLevel(OleLoanDocument oleLoanDocument,
                                           LocationLevel locationLevel)
                                    throws Exception
Throws:
Exception

getLocationLevel

public OleLoanDocument getLocationLevel(OleLoanDocument oleLoanDoc,
                                        LocationLevel locationLevel)
                                 throws Exception
Based on Shelving location from item xml, value for location levels are retrieved.

Parameters:
oleLoanDoc -
locationLevel -
Returns:
OleLoanDocument
Throws:
Exception

saveLoan

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

Parameters:
oleLoanDocument -
Throws:
Exception

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


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