public abstract class ProtocolPersonnelServiceImplBase extends Object implements ProtocolPersonnelService
| Modifier and Type | Field and Description |
|---|---|
protected PersonEditableService |
personEditableService |
| Constructor and Description |
|---|
ProtocolPersonnelServiceImplBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
addProtocolPerson(ProtocolBase protocol,
ProtocolPersonBase protocolPerson)
This method adds ProtocolPersonBase to the List of ProtocolPersons.
|
void |
addProtocolPersonAttachment(ProtocolBase protocol,
ProtocolAttachmentPersonnelBase newAttachment,
int selectedPersonIndex)
This method add ProtocolPersonAttachment to a Person of the ProtocolBase.
|
void |
addProtocolPersonUnit(List<ProtocolUnitBase> protocolPersonUnits,
ProtocolPersonBase protocolPerson,
int selectedPersonIndex)
This method adds ProtocolUnitBase to the List of selected ProtocolPersonBase.
|
protected abstract ProtocolUnitBase |
createNewProtocolUnitInstanceHook() |
protected void |
deleteAssociatedPersonnelAttachments(Integer protocolPersonId,
Collection<ProtocolAttachmentPersonnelBase> toDelete)
When deleting a Person, attachments associated with that person must also get deleted.
|
void |
deleteProtocolPerson(ProtocolBase protocol)
This method deletes ProtocolPersonBase(s) - those marked as delete
|
void |
deleteProtocolPersonUnit(ProtocolBase protocol,
int selectedPersonIndex,
int lineNumber)
This method will delete ProtocolUnitBase from the List of protocol person units at specified position(selectedPersonIndex)
|
List<Integer> |
getAffiliationStudentMap(List<ProtocolPersonBase> protocolPersons)
This method returns a list of affiliated students from a list of personnel.
|
org.kuali.rice.krad.service.BusinessObjectService |
getBusinessObjectService()
Gets the businessObjectService attribute.
|
protected String |
getCoInvestigatorRole()
This method is to get co-investigator role
|
protected Integer |
getFacultySupervisorAffiliationType()
This method is to get faculty supervisor affiliation type
|
KcPersonService |
getKcPersonService() |
ProtocolUnitBase |
getLeadUnit(ProtocolPersonBase principalInvestigator)
This method gets the lead unit of the principal investigator.
|
List<ProtocolPersonRoleMappingBase> |
getPersonRoleMapping(String sourceRoleId)
This method is to fetch person role mapping data based on source role id
|
protected int |
getPIOrCoIChanged(List<ProtocolPersonBase> protocolPersons)
This method is to identify which role has changed
Principal Investigator or Co-Investigator
|
protected ProtocolPersonBase |
getPreviousInvestigator(List<ProtocolPersonBase> protocolPersons,
String role)
This method is to get person holding Investigator role or Co-Investigator role
based on role parameter
|
ProtocolPersonBase |
getPrincipalInvestigator(List<ProtocolPersonBase> protocolPersons)
This method is to get principal investigator person
This method also helps to check whether at least one investigator exists in person list
Return first found investigator so that we can check for duplicate if any
|
protected String |
getPrincipalInvestigatorRole()
This method is to get principal investigator role
|
ProtocolPersonRoleBase |
getProtocolPersonRole(String sourceRoleId)
This method returns the protocolPersonRole based on the sourceRoleId.
|
abstract Class<? extends ProtocolPersonRoleBase> |
getProtocolPersonRoleClassHook()
This method returns the proper protocol person role class for the instance (IRB or IACUC)
|
abstract Class<? extends ProtocolPersonRoleMappingBase> |
getProtocolPersonRoleMappingClassHook()
This method allows for the correct version fo the protocol person role mapping class to be returned (IRB or IACUC)
|
ProtocolPersonTrainingService |
getProtocolPersonTrainingService()
Gets the protocolPersonTrainingService attribute.
|
org.kuali.rice.krad.service.SequenceAccessorService |
getSequenceAccessorService()
Gets the SequenceAccessorService attribute.
|
protected abstract String |
getSequenceNumberNameHook()
This method provides the name of the sequence number
|
protected Integer |
getStudentAffiliationType()
This method is to get student investigator affiliation type
|
UnitService |
getUnitService() |
protected boolean |
isAffiliationDetailsRequired(ProtocolPersonBase protocolPerson)
This method is to check whether Affiliation details is requried for a person role.
|
protected boolean |
isAffiliationStudentInvestigatorOrFacultySupervisor(ProtocolPersonBase protocolPerson)
This method is to check whether affiliation code is student investigator or
faculty supervisor
|
protected boolean |
isCoInvestigator(ProtocolPersonBase protocolPerson)
This method is to check if the person has the role Co-Investigator
|
boolean |
isDuplicatePerson(List<ProtocolPersonBase> protocolPersons,
ProtocolPersonBase newProtocolPerson)
This method is to check for duplicate person.
|
boolean |
isDuplicateUnit(ProtocolPersonBase protocolPerson,
ProtocolUnitBase newProtocolUnit)
This method is to check whether new unit already exists in the list
for a person
|
boolean |
isPIExists(List<ProtocolPersonBase> protocolPersons)
This method is to check if Principal Investigator already exists.
|
boolean |
isPISameAsCoI(ProtocolPersonBase pi,
ProtocolPersonBase newProtocolPerson)
This method is to check if the person playing the PI role is also being added as a CO-I
|
boolean |
isPrincipalInvestigator(ProtocolPersonBase protocolPerson)
This method is to check if the person has the role Principal Investigator
|
protected boolean |
isRoleChangedToNewRole(ProtocolPersonBase protocolPerson,
String newRole)
This method is to check if there is a change in the role - comparing previous role and current
role and if the new role is of Principal Investigator or Co Investigator as parameter input.
|
protected boolean |
isUnitDetailsRequired(ProtocolPersonBase protocolPerson)
This method is to check whether unit details is requried for a person role.
|
boolean |
isValidStudentFacultyMatch(List<ProtocolPersonBase> protocolPersons)
This method is to check whether Student Investigator and Faculty Supervisor combination is valid.
|
protected void |
populateUnitFromPrimaryDepartmentCode(ProtocolBase protocol,
ProtocolPersonBase protocolPerson) |
void |
selectProtocolUnit(List<ProtocolPersonBase> protocolPersons)
This method is to select protocol lead unit for each person.
|
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
Sets the businessObjectService attribute value.
|
void |
setKcPersonService(KcPersonService kcPersonService) |
protected void |
setLeadUnit(ProtocolPersonBase protocolPerson)
This method is to reset all existing lead units and set the current
selected unit.
|
void |
setLeadUnit(ProtocolUnitBase newLeadUnit,
ProtocolPersonBase principalInvestigator,
ProtocolBase protocol)
This method sets the lead unit of the principal investigator.
|
protected void |
setLeadUnitFlag(ProtocolPersonBase protocolPerson)
This method is to set lead unit flag
|
void |
setPersonEditableService(PersonEditableService personEditableService) |
void |
setProtocolPersonTrainingService(ProtocolPersonTrainingService protocolPersonTrainingService)
Sets the protocolPersonTrainingService attribute value.
|
void |
setSequenceAccessorService(org.kuali.rice.krad.service.SequenceAccessorService sequenceAccessorService)
Sets the SequenceAccessorService attribute value.
|
void |
setUnitService(UnitService unitService) |
void |
switchInvestigatorCoInvestigatorRole(List<ProtocolPersonBase> protocolPersons)
This method is to see if there is any change in the protocol person role.
|
void |
syncPersonRoleAndAffiliation(ProtocolPersonBase protocolPerson)
This method is to update person affiliation type based on change in person role.
|
void |
syncPersonRoleAndUnit(ProtocolPersonBase protocolPerson)
This method is to update person unit based on change in person role.
|
void |
syncProtocolPersonRoleChanges(List<ProtocolPersonBase> protocolPersons)
This method is used to update selected protocol lead unit in the list.
|
protected void |
updateAffiliationCount(ProtocolPersonBase protocolPerson,
HashMap<Integer,Integer> investigatorAffiliation)
This method is to set the total count for each affiliation type
|
protected void |
updatePersonRole(ProtocolPersonBase protocolPerson,
String targetRole)
This method is to update person with new role
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetPrincipalInvestigatorprotected PersonEditableService personEditableService
public void setProtocolPersonTrainingService(ProtocolPersonTrainingService protocolPersonTrainingService)
protocolPersonTrainingService - The protocolPersonTrainingService to set.public void addProtocolPerson(ProtocolBase protocol, ProtocolPersonBase protocolPerson)
ProtocolPersonnelServiceaddProtocolPerson in interface ProtocolPersonnelServiceprotocol - which contains list of ProtocolPersons.ProtocolPersonnelService.addProtocolPerson(org.kuali.kra.protocol.ProtocolBase, org.kuali.kra.protocol.personnel.ProtocolPersonBase)protected abstract String getSequenceNumberNameHook()
public void deleteProtocolPerson(ProtocolBase protocol)
ProtocolPersonnelServicedeleteProtocolPerson in interface ProtocolPersonnelServiceprotocol - which contains list of ProtocolPersonsorg.kuali.kra.protocol.personnel.ProtocolPersonnelService#deleteProtocolPerson(org.kuali.kra.protocol.ProtocolBase, int)protected void deleteAssociatedPersonnelAttachments(Integer protocolPersonId, Collection<ProtocolAttachmentPersonnelBase> toDelete)
Implementation note: This method manually deletes personnel attachments from a ProtocolBase because the ProtocolBase contains the personnel attachments rather than the ProtocolPersonBase containing the personnel attachments. If the ProtocolPersonBase contained the personnel attachments obj could be used to delete records. The reason for the "ProtocolBase"-"personnel attachment" relationship is to makes all "ProtocolBase"-"note/attachment" relationships consistent.
protocolPersonId - the person id that is deleted.toDelete - the Collection to delete from.public void addProtocolPersonAttachment(ProtocolBase protocol, ProtocolAttachmentPersonnelBase newAttachment, int selectedPersonIndex)
ProtocolPersonnelServiceaddProtocolPersonAttachment in interface ProtocolPersonnelServiceprotocol - - the protocolnewAttachment - - the new attachment to be addedselectedPersonIndex - - the attachment is added to the specific person in the listProtocolPersonnelService.addProtocolPersonAttachment(org.kuali.kra.protocol.ProtocolBase, org.kuali.kra.protocol.noteattachment.ProtocolAttachmentPersonnelBase, int)public void addProtocolPersonUnit(List<ProtocolUnitBase> protocolPersonUnits, ProtocolPersonBase protocolPerson, int selectedPersonIndex)
ProtocolPersonnelServiceaddProtocolPersonUnit in interface ProtocolPersonnelServiceprotocolPersonUnits - - New list of protocol units for each personprotocolPerson - - Selected protocol person from the listselectedPersonIndex - - Unit is added to specific person in the listorg.kuali.kra.protocol.personnel.ProtocolPersonnelService#addProtocolPersonUnit(org.kuali.kra.protocol.ProtocolBase, org.kuali.kra.protocol.personnel.ProtocolPersonBase)protected abstract ProtocolUnitBase createNewProtocolUnitInstanceHook()
public void deleteProtocolPersonUnit(ProtocolBase protocol, int selectedPersonIndex, int lineNumber)
ProtocolPersonnelServicedeleteProtocolPersonUnit in interface ProtocolPersonnelServiceselectedPersonIndex - - Unit is removed from specific person in the listlineNumber - - deleted line numberorg.kuali.kra.protocol.personnel.ProtocolPersonnelService#deleteProtocolPersonUnit(java.util.List, org.kuali.kra.protocol.personnel.ProtocolPersonBase, int)public void switchInvestigatorCoInvestigatorRole(List<ProtocolPersonBase> protocolPersons)
ProtocolPersonnelServiceswitchInvestigatorCoInvestigatorRole in interface ProtocolPersonnelServiceProtocolPersonnelService.switchInvestigatorCoInvestigatorRole(java.util.List)protected int getPIOrCoIChanged(List<ProtocolPersonBase> protocolPersons)
protocolPersons - protected void updatePersonRole(ProtocolPersonBase protocolPerson, String targetRole)
protocolPerson - targetRole - protected boolean isRoleChangedToNewRole(ProtocolPersonBase protocolPerson, String newRole)
protocolPerson - newRole - protected ProtocolPersonBase getPreviousInvestigator(List<ProtocolPersonBase> protocolPersons, String role)
protocolPersons - role - public List<ProtocolPersonRoleMappingBase> getPersonRoleMapping(String sourceRoleId)
getPersonRoleMapping in interface ProtocolPersonnelServicesourceRoleId - public abstract Class<? extends ProtocolPersonRoleMappingBase> getProtocolPersonRoleMappingClassHook()
public ProtocolPersonRoleBase getProtocolPersonRole(String sourceRoleId)
ProtocolPersonnelServicegetProtocolPersonRole in interface ProtocolPersonnelServiceProtocolPersonnelService.getProtocolPersonRole(java.lang.String)public abstract Class<? extends ProtocolPersonRoleBase> getProtocolPersonRoleClassHook()
public void syncProtocolPersonRoleChanges(List<ProtocolPersonBase> protocolPersons)
ProtocolPersonnelServicesyncProtocolPersonRoleChanges in interface ProtocolPersonnelServiceProtocolPersonnelService.syncProtocolPersonRoleChanges(java.util.List)protected void setLeadUnit(ProtocolPersonBase protocolPerson)
protocolPerson - protected boolean isUnitDetailsRequired(ProtocolPersonBase protocolPerson)
protocolPerson - protected boolean isAffiliationDetailsRequired(ProtocolPersonBase protocolPerson)
protocolPerson - protected void setLeadUnitFlag(ProtocolPersonBase protocolPerson)
protocolPerson - public void selectProtocolUnit(List<ProtocolPersonBase> protocolPersons)
ProtocolPersonnelServiceselectProtocolUnit in interface ProtocolPersonnelServiceProtocolPersonnelService.selectProtocolUnit(java.util.List)public boolean isPIExists(List<ProtocolPersonBase> protocolPersons)
ProtocolPersonnelServiceisPIExists in interface ProtocolPersonnelServiceorg.kuali.kra.protocol.personnel.ProtocolPersonnelService#isPIExists()public boolean isDuplicateUnit(ProtocolPersonBase protocolPerson, ProtocolUnitBase newProtocolUnit)
ProtocolPersonnelServiceisDuplicateUnit in interface ProtocolPersonnelServiceorg.kuali.kra.protocol.personnel.ProtocolPersonnelService#isDuplicateUnit(java.util.List, org.kuali.kra.protocol.personnel.ProtocolUnitBase)public boolean isPISameAsCoI(ProtocolPersonBase pi, ProtocolPersonBase newProtocolPerson)
ProtocolPersonnelServiceisPISameAsCoI in interface ProtocolPersonnelServicepublic boolean isDuplicatePerson(List<ProtocolPersonBase> protocolPersons, ProtocolPersonBase newProtocolPerson)
ProtocolPersonnelServiceisDuplicatePerson in interface ProtocolPersonnelServiceProtocolPersonnelService.isDuplicatePerson(java.util.List, org.kuali.kra.protocol.personnel.ProtocolPersonBase)public ProtocolPersonBase getPrincipalInvestigator(List<ProtocolPersonBase> protocolPersons)
ProtocolPersonnelServicegetPrincipalInvestigator in interface ProtocolPersonnelServiceProtocolPersonnelService.getPrincipalInvestigator(java.util.List)public boolean isPrincipalInvestigator(ProtocolPersonBase protocolPerson)
isPrincipalInvestigator in interface ProtocolPersonnelServiceprotocolPerson - protected boolean isCoInvestigator(ProtocolPersonBase protocolPerson)
protocolPerson - public ProtocolUnitBase getLeadUnit(ProtocolPersonBase principalInvestigator)
getLeadUnit in interface ProtocolPersonnelServiceprincipalInvestigator - The principal investigator to searchProtocolPersonnelService.getLeadUnit(org.kuali.kra.protocol.personnel.ProtocolPersonBase)public void setLeadUnit(ProtocolUnitBase newLeadUnit, ProtocolPersonBase principalInvestigator, ProtocolBase protocol)
setLeadUnit in interface ProtocolPersonnelServicenewLeadUnit - The new instance of the lead unitprincipalInvestigator - The principal investigator to setprotocol - The protocol that contains the principal investigatorProtocolPersonnelService.setLeadUnit(org.kuali.kra.protocol.personnel.ProtocolUnitBase,
org.kuali.kra.protocol.personnel.ProtocolPersonBase, org.kuali.kra.protocol.ProtocolBase)public void syncPersonRoleAndUnit(ProtocolPersonBase protocolPerson)
ProtocolPersonnelServicesyncPersonRoleAndUnit in interface ProtocolPersonnelServiceProtocolPersonnelService.syncPersonRoleAndUnit(org.kuali.kra.protocol.personnel.ProtocolPersonBase)public void syncPersonRoleAndAffiliation(ProtocolPersonBase protocolPerson)
ProtocolPersonnelServicepublic boolean isValidStudentFacultyMatch(List<ProtocolPersonBase> protocolPersons)
ProtocolPersonnelServiceisValidStudentFacultyMatch in interface ProtocolPersonnelServiceProtocolPersonnelService.isValidStudentFacultyMatch(java.util.List)protected boolean isAffiliationStudentInvestigatorOrFacultySupervisor(ProtocolPersonBase protocolPerson)
protocolPerson - protected void updateAffiliationCount(ProtocolPersonBase protocolPerson, HashMap<Integer,Integer> investigatorAffiliation)
protocolPerson - investigatorAffiliation - public List<Integer> getAffiliationStudentMap(List<ProtocolPersonBase> protocolPersons)
ProtocolPersonnelServicegetAffiliationStudentMap in interface ProtocolPersonnelServicepublic org.kuali.rice.krad.service.BusinessObjectService getBusinessObjectService()
public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
businessObjectService - The businessObjectService to set.public org.kuali.rice.krad.service.SequenceAccessorService getSequenceAccessorService()
public void setSequenceAccessorService(org.kuali.rice.krad.service.SequenceAccessorService sequenceAccessorService)
sequenceAccessorService - The SequenceAccessorService to set.protected String getPrincipalInvestigatorRole()
protected String getCoInvestigatorRole()
protected Integer getStudentAffiliationType()
protected Integer getFacultySupervisorAffiliationType()
public ProtocolPersonTrainingService getProtocolPersonTrainingService()
public void setPersonEditableService(PersonEditableService personEditableService)
public KcPersonService getKcPersonService()
public void setKcPersonService(KcPersonService kcPersonService)
public UnitService getUnitService()
public void setUnitService(UnitService unitService)
protected void populateUnitFromPrimaryDepartmentCode(ProtocolBase protocol, ProtocolPersonBase protocolPerson)
Copyright © 2013 The Kuali Foundation. All Rights Reserved.