org.kuali.ole.service
Class OlePatronConverterService

java.lang.Object
  extended by org.kuali.ole.service.OlePatronConverterService

public class OlePatronConverterService
extends Object

OlePatronConverterService generates list of patron to perform ole patron operation.


Constructor Summary
OlePatronConverterService()
           
 
Method Summary
 OlePatronGroup buildPatron(String fileName)
          This method will get the resource file(xml file) and convert object from the xml file (used for testCase)
 OlePatronGroup buildPatronFromFileContent(String fileContent)
          This method is for getting the object of OlePatronGroup from the ingested xml (used for testCase).
protected  boolean checkAddressMultipleDefault(List<OleEntityAddressBo> addrBoList)
          This method is for checking the entity address has multiple defaults
protected  boolean checkEmailMultipleDefault(List<org.kuali.rice.kim.impl.identity.email.EntityEmailBo> emailBoList)
          This method is for checking the entity email address has multiple defaults
protected  boolean checkPhoneMultipleDefault(List<org.kuali.rice.kim.impl.identity.phone.EntityPhoneBo> phoneBoList)
          This method is for checking the entity phone has multiple defaults
 List<OlePatronDocument> createOlePatronDocument(List<OlePatron> createPatronList, List<OlePatron> failedPatronList)
          This method is for creating a OlePatronDocument
 OlePatronRecordHandler getOlePatronRecordHandler()
          Gets the instance of OlePatronRecordHandler
 OlePatronService getOlePatronService()
          Gets the value of olePatronService which is of type OlePatronService
 String getPatronAddressSource()
           
 String getUploadProcessMessage(OlePatronIngestSummaryRecord olePatronIngestSummaryRecord)
          This method is for getting the uploaded process message
 boolean isPatronExist(String patronId)
          This method will check the entity id from the database , whether it is existing or not.
 List<OlePatronDocument> persistPatronFromFileContent(String fileContent, boolean addUnMatchedPatronFlag, String fileName, OlePatronIngestSummaryRecord olePatronIngestSummaryRecord, String addressSource)
          This method will get the values from the ingested xml file, check the entity id and addUnmatchedPatron (from screen) .
 void setOlePatronRecordHandler(OlePatronRecordHandler olePatronRecordHandler)
          Sets the olePatronRecordHandler which is of type OlePatronRecordHandler
 void setOlePatronService(OlePatronService olePatronService)
          Sets the value for olePatronService which is of type OlePatronService
 void setPatronAddressSource(String patronAddressSource)
           
 List<OlePatronDocument> updateOlePatronDocument(List<OlePatron> updatePatronList, List<OlePatron> failedPatronList)
          This method is for updating the OlePatronDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OlePatronConverterService

public OlePatronConverterService()
Method Detail

getPatronAddressSource

public String getPatronAddressSource()

setPatronAddressSource

public void setPatronAddressSource(String patronAddressSource)

getOlePatronService

public OlePatronService getOlePatronService()
Gets the value of olePatronService which is of type OlePatronService

Returns:
olePatronService(OlePatronService)

setOlePatronService

public void setOlePatronService(OlePatronService olePatronService)
Sets the value for olePatronService which is of type OlePatronService

Parameters:
olePatronService(OlePatronService) -

persistPatronFromFileContent

public List<OlePatronDocument> persistPatronFromFileContent(String fileContent,
                                                            boolean addUnMatchedPatronFlag,
                                                            String fileName,
                                                            OlePatronIngestSummaryRecord olePatronIngestSummaryRecord,
                                                            String addressSource)
                                                     throws IOException,
                                                            URISyntaxException
This method will get the values from the ingested xml file, check the entity id and addUnmatchedPatron (from screen) .

Parameters:
fileContent -
addUnMatchedPatronFlag -
fileName -
olePatronIngestSummaryRecord -
Returns:
list of OlePatronDocument
Throws:
IOException
URISyntaxException

getUploadProcessMessage

public String getUploadProcessMessage(OlePatronIngestSummaryRecord olePatronIngestSummaryRecord)
This method is for getting the uploaded process message

Parameters:
olePatronIngestSummaryRecord -
Returns:
message as a string

isPatronExist

public boolean isPatronExist(String patronId)
This method will check the entity id from the database , whether it is existing or not.

Parameters:
patronId -
Returns:
a boolean flag

createOlePatronDocument

public List<OlePatronDocument> createOlePatronDocument(List<OlePatron> createPatronList,
                                                       List<OlePatron> failedPatronList)
This method is for creating a OlePatronDocument

Parameters:
createPatronList -
failedPatronList -
Returns:
list of OlePatronDocument

updateOlePatronDocument

public List<OlePatronDocument> updateOlePatronDocument(List<OlePatron> updatePatronList,
                                                       List<OlePatron> failedPatronList)
This method is for updating the OlePatronDocument

Parameters:
updatePatronList -
failedPatronList -
Returns:
list of OlePatronDocument

buildPatronFromFileContent

public OlePatronGroup buildPatronFromFileContent(String fileContent)
                                          throws URISyntaxException,
                                                 IOException
This method is for getting the object of OlePatronGroup from the ingested xml (used for testCase).

Parameters:
fileContent -
Returns:
OlePatronGroup object
Throws:
URISyntaxException
IOException

buildPatron

public OlePatronGroup buildPatron(String fileName)
                           throws URISyntaxException,
                                  IOException,
                                  SAXException
This method will get the resource file(xml file) and convert object from the xml file (used for testCase)

Parameters:
fileName -
Returns:
OlePatronGroup object (converted from xml)
Throws:
URISyntaxException
IOException
SAXException

checkPhoneMultipleDefault

protected boolean checkPhoneMultipleDefault(List<org.kuali.rice.kim.impl.identity.phone.EntityPhoneBo> phoneBoList)
This method is for checking the entity phone has multiple defaults

Parameters:
phoneBoList -
Returns:
true , if the entity phone has only one default in a single patron record, else false

checkAddressMultipleDefault

protected boolean checkAddressMultipleDefault(List<OleEntityAddressBo> addrBoList)
This method is for checking the entity address has multiple defaults

Parameters:
addrBoList -
Returns:
true , if the entity address has only one default in a single patron record, else false

checkEmailMultipleDefault

protected boolean checkEmailMultipleDefault(List<org.kuali.rice.kim.impl.identity.email.EntityEmailBo> emailBoList)
This method is for checking the entity email address has multiple defaults

Parameters:
emailBoList -
Returns:
true , if the entity email address has only one default in a single patron record, else false

getOlePatronRecordHandler

public OlePatronRecordHandler getOlePatronRecordHandler()
Gets the instance of OlePatronRecordHandler

Returns:
olePatronRecordHandler(OlePatronRecordHandler)

setOlePatronRecordHandler

public void setOlePatronRecordHandler(OlePatronRecordHandler olePatronRecordHandler)
Sets the olePatronRecordHandler which is of type OlePatronRecordHandler

Parameters:
olePatronRecordHandler(OlePatronRecordHandler) -


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