public class MedusaServiceImpl extends Object implements MedusaService
| Constructor and Description |
|---|
MedusaServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addEdge(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph,
org.kuali.rice.krad.bo.BusinessObject bo1,
org.kuali.rice.krad.bo.BusinessObject bo2)
First adds both bos into the graph as vertexes(using addVertex) and then if the links do not already
exist, adds a bi-directional link to the graph.
|
protected void |
addSpecialReviewLinksToGraph(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph,
List<? extends SpecialReview> specialReviews,
org.kuali.rice.krad.bo.BusinessObject existingBo) |
protected void |
addToGraph(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph,
org.kuali.rice.krad.bo.BusinessObject newBo,
org.kuali.rice.krad.bo.BusinessObject existingBo) |
protected org.kuali.rice.krad.bo.BusinessObject |
addVertex(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph,
org.kuali.rice.krad.bo.BusinessObject bo)
Adds a new bo to the graph like hash after checking to make sure the same bo is not already added.
|
protected boolean |
areBusinessObjectsEqual(org.kuali.rice.krad.bo.BusinessObject bo1,
org.kuali.rice.krad.bo.BusinessObject bo2)
Checks the buisness objects for equality assuming they are medusa supported BOs
(Development Proposal, Institutional Proposal or Award), this is because the current
BOs do not support equality checking.
|
protected void |
buildGraph(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph,
Award award)
Builds the graph recursively by finding links from the Award.
|
protected void |
buildGraph(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph,
DevelopmentProposal devProp)
Continues to build the graph finding links from the development proposal
|
protected void |
buildGraph(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph,
IacucProtocol protocol) |
protected void |
buildGraph(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph,
InstitutionalProposal proposal)
Builds the graph using links found from the institutional proposal.
|
protected void |
buildGraph(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph,
Negotiation negotiation) |
protected void |
buildGraph(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph,
Protocol protocol) |
protected void |
buildGraph(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph,
SubAward subAward) |
protected org.kuali.rice.krad.bo.BusinessObject |
findMatchingBo(Collection<org.kuali.rice.krad.bo.BusinessObject> boSet,
org.kuali.rice.krad.bo.BusinessObject bo)
Looks through the boSet for a matching medusa BO.
|
protected SequenceOwner |
getActiveOrCurrentVersion(Class clazz,
String sequenceName)
Gets the active or if not available the most current, not cancelled version of a
versioned BO.
|
protected Award |
getAward(Long awardId)
Returns the newest active if available or the newest no cancelled award if it is not
|
protected Award |
getAward(String awardNumber) |
protected AwardAmountInfoService |
getAwardAmountInfoService()
Gets the awardAmountInfoService attribute.
|
protected Collection<Award> |
getAwards(InstitutionalProposal ip)
Generates and returns a collection of all awards linked to the
institutional proposal
|
protected Collection<Award> |
getAwards(SubAward subAward) |
org.kuali.rice.krad.service.BusinessObjectService |
getBusinessObjectService()
Gets the businessObjectService attribute.
|
protected DevelopmentProposal |
getDevelopmentProposal(String proposalNumber) |
protected Collection<DevelopmentProposal> |
getDevelopmentProposals(InstitutionalProposal instProposal)
Returns a list of the Development Proposals linked to the institutional proposal.
|
protected Map<String,Object> |
getFieldValues(String key,
Object value) |
protected IacucProtocol |
getIacuc(Long protocolId) |
protected IacucProtocol |
getIacuc(String protocolNumber) |
protected InstitutionalProposal |
getInstitutionalProposal(Long proposalId)
Returns the newest active institutional proposal if its available otherwise the newest pending and then archived proposal is returned.
|
protected InstitutionalProposal |
getInstitutionalProposal(String proposalNumber) |
List<MedusaNode> |
getMedusaByAward(String moduleName,
Long moduleIdentifier)
Returns a list of MedusaNode objects that describe the top level of
the tree-like structure of the Medusa object passed in using the Awards(if available)
as the top level nodes.
|
List<MedusaNode> |
getMedusaByProposal(String moduleName,
Long moduleIdentifier)
Returns a list of MedusaNode objects that describe the top level of
the tree-like structure of the Medusa object passed in using the Institutional Proposals(if available)
as the top level nodes.
|
MedusaNode |
getMedusaNode(String moduleName,
Long moduleId)
Returns a single MedusaNode that can be used to render the lazy-loaded summary for the
BO contained in that node
|
protected List<MedusaNode> |
getMedusaTree(String moduleName,
Long moduleIdentifier,
String preferredModule)
Builds the tree-like structure of MedusaNode objects using the module name and identifier
|
protected Negotiation |
getNegotiation(Long negotiationId) |
protected Collection<Negotiation> |
getNegotiations(org.kuali.rice.krad.bo.BusinessObject bo) |
protected NegotiationService |
getNegotiationService() |
protected InstitutionalProposal |
getNewestProposalByStatus(String proposalNumber,
VersionStatus status)
Gets and returns the newest active proposal version for the proposal number.
|
protected MedusaNode |
getNode(Award award) |
protected MedusaNode |
getNode(org.kuali.rice.krad.bo.BusinessObject bo)
Creates a MedusaNode for the BO given the BO is supported by Medusa(Award, Dev Prop or Inst Prop).
|
protected MedusaNode |
getNode(DevelopmentProposal proposal) |
protected MedusaNode |
getNode(IacucProtocol protocol) |
protected MedusaNode |
getNode(InstitutionalProposal proposal) |
protected MedusaNode |
getNode(Negotiation negotiation) |
protected MedusaNode |
getNode(Protocol protocol) |
protected MedusaNode |
getNode(SubAward subAward) |
protected NsfCode |
getNsfCode(String nsfCode)
Helper function as nsfCode has been wired up such that it needs
outside help getting the actual BO loaded.
|
protected org.kuali.rice.coreservice.framework.parameter.ParameterService |
getParameterService() |
protected List<MedusaNode> |
getParentNodes(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph,
String[] preferedOrder)
Searches through the graph using the preferred order for Bos to occupy the top level(or parent nodes)
and then populates all child nodes of each top level node.
|
protected Collection<InstitutionalProposal> |
getProposals(Award award)
Returns all institutional proposals linked to this award.
|
protected Collection<InstitutionalProposal> |
getProposals(DevelopmentProposal devProposal)
Gets all institutional proposals linked to this development proposal via the ProposalAdminDetails.
|
protected Protocol |
getProtocol(Long protocolId) |
protected Protocol |
getProtocol(String protocolNumber) |
protected Map<String,Boolean> |
getSpecialReviewLinkingEnabled(org.kuali.rice.krad.bo.BusinessObject existingBo) |
protected SubAward |
getSubAward(Long subAwardId) |
protected SubAward |
getSubAward(String subAwardCode) |
protected Collection<SubAward> |
getSubAwards(Award award) |
protected SubAwardService |
getSubAwardService() |
protected VersionHistoryService |
getVersionHistoryService() |
protected boolean |
isBoInList(List<MedusaNode> nodes,
org.kuali.rice.krad.bo.BusinessObject bo)
Looks through the list of MedusaNodes to see if the BO is equal to the BO of one of the nodes.
|
protected void |
populateChildNodes(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph,
MedusaNode node,
List<MedusaNode> parentNodes)
Using the links defined in the graph hash, add all nodes linked to the current node
|
void |
setAwardAmountInfoService(AwardAmountInfoService awardAmountInfoService)
Sets the awardAmountInfoService attribute value.
|
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
Sets the businessObjectService attribute value.
|
void |
setNegotiationService(NegotiationService negotiationService) |
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService) |
void |
setSubAwardService(SubAwardService subAwardService) |
void |
setVersionHistoryService(VersionHistoryService versionHistoryService) |
public MedusaNode getMedusaNode(String moduleName, Long moduleId)
MedusaServicegetMedusaNode in interface MedusaServicemoduleName - name of the module to be looked up (ie. award, IP, DP)moduleId - the primary key of the object to be looked up in the specified moduleMedusaService.getMedusaNode(java.lang.String, java.lang.Long)protected NsfCode getNsfCode(String nsfCode)
nsfCode - public List<MedusaNode> getMedusaByProposal(String moduleName, Long moduleIdentifier)
MedusaServicegetMedusaByProposal in interface MedusaServicemoduleName - name of the module to be looked up (ie. award, IP, DP)moduleIdentifier - the primary key of the object to be looked up in the specified moduleMedusaService.getMedusaByProposal(java.lang.String, java.lang.Long)public List<MedusaNode> getMedusaByAward(String moduleName, Long moduleIdentifier)
MedusaServicegetMedusaByAward in interface MedusaServicemoduleName - name of the module to be looked up (ie. award, IP, DP)moduleIdentifier - the primary key of the object to be looked up in the specified moduleMedusaService.getMedusaByAward(java.lang.String, java.lang.Long)protected List<MedusaNode> getMedusaTree(String moduleName, Long moduleIdentifier, String preferredModule)
moduleName - name of the module to be looked up (ie. award, IP, DP)moduleIdentifier - the primary key of the object to be looked up in the specified modulepreferredModule - defines the object type that should be placed at the top level when possibleprotected org.kuali.rice.krad.bo.BusinessObject addVertex(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph, org.kuali.rice.krad.bo.BusinessObject bo)
graph - bo - protected void addEdge(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph, org.kuali.rice.krad.bo.BusinessObject bo1, org.kuali.rice.krad.bo.BusinessObject bo2)
graph - bo1 - bo2 - protected List<MedusaNode> getParentNodes(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph, String[] preferedOrder)
graph - preferedOrder - an array of module names (ie. award, DP, IP)protected void populateChildNodes(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph, MedusaNode node, List<MedusaNode> parentNodes)
graph - node - parentNodes - protected boolean isBoInList(List<MedusaNode> nodes, org.kuali.rice.krad.bo.BusinessObject bo)
nodes - bo - protected void buildGraph(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph, SubAward subAward)
protected void buildGraph(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph, Protocol protocol)
protected void buildGraph(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph, IacucProtocol protocol)
protected void addSpecialReviewLinksToGraph(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph, List<? extends SpecialReview> specialReviews, org.kuali.rice.krad.bo.BusinessObject existingBo)
protected Map<String,Boolean> getSpecialReviewLinkingEnabled(org.kuali.rice.krad.bo.BusinessObject existingBo)
protected void buildGraph(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph, Award award)
graph - award - protected void buildGraph(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph, InstitutionalProposal proposal)
graph - proposal - protected void buildGraph(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph, DevelopmentProposal devProp)
graph - devProp - protected void buildGraph(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph, Negotiation negotiation)
protected void addToGraph(HashMap<org.kuali.rice.krad.bo.BusinessObject,List<org.kuali.rice.krad.bo.BusinessObject>> graph, org.kuali.rice.krad.bo.BusinessObject newBo, org.kuali.rice.krad.bo.BusinessObject existingBo)
protected org.kuali.rice.krad.bo.BusinessObject findMatchingBo(Collection<org.kuali.rice.krad.bo.BusinessObject> boSet, org.kuali.rice.krad.bo.BusinessObject bo)
boSet - bo - protected boolean areBusinessObjectsEqual(org.kuali.rice.krad.bo.BusinessObject bo1,
org.kuali.rice.krad.bo.BusinessObject bo2)
bo1 - bo2 - protected DevelopmentProposal getDevelopmentProposal(String proposalNumber)
protected InstitutionalProposal getInstitutionalProposal(Long proposalId)
proposalId - protected InstitutionalProposal getInstitutionalProposal(String proposalNumber)
protected Award getAward(Long awardId)
awardId - protected Negotiation getNegotiation(Long negotiationId)
protected IacucProtocol getIacuc(Long protocolId)
protected IacucProtocol getIacuc(String protocolNumber)
protected SequenceOwner getActiveOrCurrentVersion(Class clazz, String sequenceName)
clazz - sequenceName - protected MedusaNode getNode(org.kuali.rice.krad.bo.BusinessObject bo)
bo - protected MedusaNode getNode(Award award)
protected MedusaNode getNode(InstitutionalProposal proposal)
protected MedusaNode getNode(DevelopmentProposal proposal)
protected MedusaNode getNode(Negotiation negotiation)
protected MedusaNode getNode(SubAward subAward)
protected MedusaNode getNode(Protocol protocol)
protected MedusaNode getNode(IacucProtocol protocol)
protected Collection<DevelopmentProposal> getDevelopmentProposals(InstitutionalProposal instProposal)
instProposal - protected Collection<Award> getAwards(SubAward subAward)
protected Collection<SubAward> getSubAwards(Award award)
protected Collection<Award> getAwards(InstitutionalProposal ip)
ip - protected InstitutionalProposal getNewestProposalByStatus(String proposalNumber, VersionStatus status)
proposalNumber - protected Collection<InstitutionalProposal> getProposals(Award award)
award - protected Collection<InstitutionalProposal> getProposals(DevelopmentProposal devProposal)
devProposal - protected Collection<Negotiation> getNegotiations(org.kuali.rice.krad.bo.BusinessObject bo)
public org.kuali.rice.krad.service.BusinessObjectService getBusinessObjectService()
public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
businessObjectService - The businessObjectService to set.protected AwardAmountInfoService getAwardAmountInfoService()
public void setAwardAmountInfoService(AwardAmountInfoService awardAmountInfoService)
awardAmountInfoService - The awardAmountInfoService to set.protected VersionHistoryService getVersionHistoryService()
public void setVersionHistoryService(VersionHistoryService versionHistoryService)
protected NegotiationService getNegotiationService()
public void setNegotiationService(NegotiationService negotiationService)
protected SubAwardService getSubAwardService()
public void setSubAwardService(SubAwardService subAwardService)
protected org.kuali.rice.coreservice.framework.parameter.ParameterService getParameterService()
public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
Copyright © 2013 The Kuali Foundation. All Rights Reserved.