public class ProposalCopyServiceImpl extends Object implements ProposalCopyService
| Modifier and Type | Class and Description |
|---|---|
protected class |
ProposalCopyServiceImpl.DocProperty
Each property in the document that can be copied is represented
by its getter and setter method.
|
| Constructor and Description |
|---|
ProposalCopyServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearCertifyQuestions(ProposalDevelopmentDocument doc)
Clear the Certify questions for each investigator.
|
protected void |
copyAndFinalizeBudgetVersion(String documentNumber,
ProposalDevelopmentDocument dest,
int budgetVersionNumber,
boolean resetRates) |
protected void |
copyAttachments(ProposalDevelopmentDocument src,
ProposalDevelopmentDocument dest)
Copy the Attachments (proposal, personal, and institutional) to the new document.
|
protected void |
copyBudget(ProposalDevelopmentDocument src,
ProposalDevelopmentDocument dest,
String budgetVersions)
This method...
|
protected void |
copyCustomData(ProposalDevelopmentDocument src,
ProposalDevelopmentDocument dest)
This method copies all custom data from one document to another.
|
protected void |
copyOverviewProperties(ProposalDevelopmentDocument src,
ProposalDevelopmentDocument dest)
Copies the document overview properties.
|
protected void |
copyProperties(DevelopmentProposal src,
DevelopmentProposal dest,
List<ProposalCopyServiceImpl.DocProperty> properties) |
String |
copyProposal(ProposalDevelopmentDocument doc,
ProposalCopyCriteria criteria)
Copy a proposal development document.
|
protected void |
copyProposal(ProposalDevelopmentDocument src,
ProposalDevelopmentDocument dest,
ProposalCopyCriteria criteria)
Copies the source proposal development document to the destination document.
|
protected void |
copyProposalProperties(ProposalDevelopmentDocument src,
ProposalDevelopmentDocument dest)
Copies over the "normal" Proposal Development Document properties.
|
protected void |
copyRequiredProperties(ProposalDevelopmentDocument srcDoc,
ProposalDevelopmentDocument destDoc)
Copy over the required properties so we can do an initial save of the document
in order to obtain a proposal number.
|
protected ProposalDevelopmentDocument |
createNewProposal(ProposalDevelopmentDocument srcDoc,
ProposalCopyCriteria criteria)
Create a new proposal based upon a source proposal.
|
protected ProposalPersonUnit |
createProposalPersonUnit(ProposalPerson person,
String unitNumber,
boolean isLeadUnit,
boolean isDeletable,
List<ProposalPersonUnit> oldProposalPersonUnits) |
protected ProposalPersonUnit |
findProposalPersonUnit(String unitNumber,
List<ProposalPersonUnit> proposalPersonUnits) |
protected void |
fixBudgetVersions(ProposalDevelopmentDocument doc)
Fix data related to Budget Versions.
|
protected void |
fixCongressionalDistricts(ProposalDevelopmentDocument doc)
This method sets all congressional district ids to null, so new ids get assigned to them.
|
protected void |
fixKeyPersonnel(ProposalDevelopmentDocument doc,
String oldLeadUnitNumber,
String newLeadUnitNumber)
Fix the Key Personnel.
|
protected void |
fixKeyPersonnelUnits(ProposalDevelopmentDocument doc,
String oldLeadUnitNumber,
String newLeadUnitNumber)
Fix the Key Personnel.
|
protected void |
fixNextValues(ProposalDevelopmentDocument oldDoc,
ProposalDevelopmentDocument newDoc)
The document next values must be the same in the new version as in
the old document.
|
protected void |
fixNumericProperty(Object object,
String methodName,
Class clazz,
Object propertyValue,
Map<String,Object> objectMap)
Recurse through all of the BOs and if a BO has a specific property,
set its value to the new value.
|
protected void |
fixOrganizationAndLocations(ProposalDevelopmentDocument doc)
If the Lead Unit has changed in the previous
Document, then this method corrects related
properties Organization and ProposalSite instances |
protected void |
fixProposal(ProposalDevelopmentDocument srcDoc,
ProposalDevelopmentDocument newDoc,
ProposalCopyCriteria criteria)
Fix the proposal.
|
protected void |
fixProposalNumbers(Object object,
String proposalNumber,
List<Object> list)
Recurse through all of the BOs and if a BO has a ProposalNumber property,
set its value to the new proposal number.
|
BudgetService<DevelopmentProposal> |
getBudgetService()
Gets the budgetService attribute.
|
BudgetSummaryService |
getBudgetSummaryService()
Gets the budgetSummaryService attribute.
|
protected List<ProposalCopyServiceImpl.DocProperty> |
getCopyableProperties()
Get the list of DevelopmentProposal properties that can be copied.
|
protected org.kuali.rice.core.api.datetime.DateTimeService |
getDateTimeService() |
protected Method |
getGetter(String name,
Method[] methods)
Gets the getter method for a property.
|
protected org.kuali.rice.krad.service.KualiRuleService |
getKualiRuleService()
Get the Kuali Rule Service.
|
protected String |
getPropertyName(Method method)
Get the name of a property.
|
QuestionnaireAnswerService |
getQuestionnaireAnswerService()
Gets the questionnaireAnswerService attribute.
|
QuestionnaireService |
getQuestionnaireService()
Gets the questionnaireService attribute.
|
protected void |
initializeAuthorization(ProposalDevelopmentDocument doc)
Initialize the Authorizations for a new proposal.
|
protected boolean |
isFilteredProperty(String name)
Is this a filtered property?
|
protected boolean |
isPropertyGetterMethod(Method method,
Method[] methods)
Is the given method a getter method for a property? Must conform to
the following:
Must start with the get
Must have a corresponding setter method
Must have zero arguments.
|
protected boolean |
isProposalTypeRenewalRevisionContinuation(String proposalTypeCode)
Is the Proposal Type set to Renewal, Revision, or a Continuation?
|
protected void |
loadAttachmentContent(Narrative narrative)
Load the attachment content for a specific narrative from the database.
|
protected void |
loadAttachmentContents(ProposalDevelopmentDocument doc)
Load the attachment contents from the database.
|
protected void |
loadBioContent(ProposalPersonBiography bio)
Load the attachment content for a specific personal attachment from the database.
|
protected void |
removePersonNarrativePermission(String personId,
Narrative narrative) |
void |
setBudgetService(BudgetService<DevelopmentProposal> budgetService)
Sets the budgetService attribute value.
|
void |
setBudgetSummaryService(BudgetSummaryService budgetSummaryService)
Sets the budgetSummaryService attribute value.
|
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
Set the Business Object Service.
|
void |
setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService) |
void |
setDocumentService(org.kuali.rice.krad.service.DocumentService documentService) |
void |
setKeyPersonnelService(KeyPersonnelService keyPersonnelService)
Set the Key Personnel Service.
|
protected void |
setLeadUnit(ProposalDevelopmentDocument doc,
String newLeadUnitNumber)
Set the lead unit for the new proposal.
|
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
Sets the ParameterService.
|
void |
setQuestionnaireAnswerService(QuestionnaireAnswerService questionnaireAnswerService)
Sets the questionnaireAnswerService attribute value.
|
void |
setQuestionnaireService(QuestionnaireService questionnaireService)
Sets the questionnaireService attribute value.
|
public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
parameterService - the parameter service.public String copyProposal(ProposalDevelopmentDocument doc, ProposalCopyCriteria criteria) throws Exception
ProposalCopyServicecopyProposal in interface ProposalCopyServicedoc - the proposal development document to copy.criteria - the user-specified criteria that controls various copy operations.Exception - if anything really bad happensProposalCopyService.copyProposal(org.kuali.kra.proposaldevelopment.document.ProposalDevelopmentDocument, org.kuali.kra.proposaldevelopment.bo.ProposalCopyCriteria)protected ProposalDevelopmentDocument createNewProposal(ProposalDevelopmentDocument srcDoc, ProposalCopyCriteria criteria) throws Exception
srcDoc - criteria - Exceptionprotected void copyRequiredProperties(ProposalDevelopmentDocument srcDoc, ProposalDevelopmentDocument destDoc)
srcDoc - destDoc - protected void copyProposal(ProposalDevelopmentDocument src, ProposalDevelopmentDocument dest, ProposalCopyCriteria criteria) throws Exception
src - the source document, i.e. the original.dest - the destination document, i.e. the new document.criteria - the user-specified criteria.Exception - if the copy fails for any reason.protected void copyProposalProperties(ProposalDevelopmentDocument src, ProposalDevelopmentDocument dest) throws Exception
src - the source proposal development document, i.e. the original.dest - the destination proposal development document, i.e. the new document.Exception - if the copy fails for any reason.protected void fixNextValues(ProposalDevelopmentDocument oldDoc, ProposalDevelopmentDocument newDoc)
oldDoc - newDoc - protected void copyProperties(DevelopmentProposal src, DevelopmentProposal dest, List<ProposalCopyServiceImpl.DocProperty> properties) throws Exception
Exceptionprotected void copyOverviewProperties(ProposalDevelopmentDocument src, ProposalDevelopmentDocument dest)
src - the source proposal development document, i.e. the original.dest - the destination proposal development document, i.e. the new document.protected List<ProposalCopyServiceImpl.DocProperty> getCopyableProperties()
protected String getPropertyName(Method method)
method - the setter method.protected boolean isFilteredProperty(String name)
name - the name of the property.protected Method getGetter(String name, Method[] methods)
name - the name of the property.methods - the list of methods to look in for the getter method.protected void setLeadUnit(ProposalDevelopmentDocument doc, String newLeadUnitNumber)
doc - the new proposal development documentnewLeadUnitNumber - the new lead unit numberprotected void fixProposal(ProposalDevelopmentDocument srcDoc, ProposalDevelopmentDocument newDoc, ProposalCopyCriteria criteria) throws Exception
criteria - the copy criteriaExceptionprotected void fixOrganizationAndLocations(ProposalDevelopmentDocument doc)
Document, then this method corrects related
properties Organization and ProposalSite instancesdoc - ProposalDevelopmentDocument to fixprotected void fixProposalNumbers(Object object, String proposalNumber, List<Object> list) throws Exception
object - the objectproposalNumber - the proposal numberlist - I assume this is the list of objects that have already been processed.Exceptionprotected boolean isPropertyGetterMethod(Method method, Method[] methods)
method - the method to checkmethods - the other methods in the objectprotected void fixKeyPersonnel(ProposalDevelopmentDocument doc, String oldLeadUnitNumber, String newLeadUnitNumber) throws Exception
doc - the proposal development documentoldLeadUnitNumber - the old lead unit numbernewLeadUnitNumber - the new lead unit numberExceptionprotected void fixCongressionalDistricts(ProposalDevelopmentDocument doc)
doc - protected void fixBudgetVersions(ProposalDevelopmentDocument doc)
doc - the proposal development documentoldLeadUnitNumber - the old lead unit numbernewLeadUnitNumber - the new lead unit numberprotected void clearCertifyQuestions(ProposalDevelopmentDocument doc)
doc - the Proposal Development Documentprotected void fixKeyPersonnelUnits(ProposalDevelopmentDocument doc, String oldLeadUnitNumber, String newLeadUnitNumber) throws Exception
doc - the proposal development documentoldLeadUnitNumber - the old lead unit numbernewLeadUnitNumber - the new lead unit numberExceptionprotected ProposalPersonUnit createProposalPersonUnit(ProposalPerson person, String unitNumber, boolean isLeadUnit, boolean isDeletable, List<ProposalPersonUnit> oldProposalPersonUnits)
protected ProposalPersonUnit findProposalPersonUnit(String unitNumber, List<ProposalPersonUnit> proposalPersonUnits)
protected void initializeAuthorization(ProposalDevelopmentDocument doc)
doc - the proposal development documentprotected void copyAttachments(ProposalDevelopmentDocument src, ProposalDevelopmentDocument dest) throws Exception
src - the source proposal development document, i.e. the original.dest - the destination proposal development document, i.e. the new document.Exceptionprotected void removePersonNarrativePermission(String personId, Narrative narrative)
protected void loadAttachmentContents(ProposalDevelopmentDocument doc)
doc - the proposal development document to load attachment contents into.protected void loadAttachmentContent(Narrative narrative)
narrative - the narrative for which to load the contents.protected void loadBioContent(ProposalPersonBiography bio)
bio - the personal attachment for which to load the contents.protected void copyBudget(ProposalDevelopmentDocument src, ProposalDevelopmentDocument dest, String budgetVersions) throws Exception
src - the source proposal development document, i.e. the original.dest - the destination proposal development document, i.e. the new document.budgetVersions - Exceptionprotected void copyAndFinalizeBudgetVersion(String documentNumber, ProposalDevelopmentDocument dest, int budgetVersionNumber, boolean resetRates) throws Exception
Exceptionprotected void fixNumericProperty(Object object, String methodName, Class clazz, Object propertyValue, Map<String,Object> objectMap) throws Exception
object - the objectpropertyValue - Exceptionprotected void copyCustomData(ProposalDevelopmentDocument src, ProposalDevelopmentDocument dest)
src - dest - public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
businessObjectService - the Business Object Servicepublic void setDocumentService(org.kuali.rice.krad.service.DocumentService documentService)
public void setKeyPersonnelService(KeyPersonnelService keyPersonnelService)
keyPersonnelService - the Key Personnel Serviceprotected org.kuali.rice.krad.service.KualiRuleService getKualiRuleService()
public QuestionnaireService getQuestionnaireService()
public void setQuestionnaireService(QuestionnaireService questionnaireService)
questionnaireService - The questionnaireService to set.public QuestionnaireAnswerService getQuestionnaireAnswerService()
public void setQuestionnaireAnswerService(QuestionnaireAnswerService questionnaireAnswerService)
questionnaireAnswerService - The questionnaireAnswerService to set.protected boolean isProposalTypeRenewalRevisionContinuation(String proposalTypeCode)
proposalTypeCode - proposal type codeprotected org.kuali.rice.core.api.datetime.DateTimeService getDateTimeService()
public void setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService)
public BudgetService<DevelopmentProposal> getBudgetService()
public void setBudgetService(BudgetService<DevelopmentProposal> budgetService)
budgetService - The budgetService to set.public BudgetSummaryService getBudgetSummaryService()
public void setBudgetSummaryService(BudgetSummaryService budgetSummaryService)
budgetSummaryService - The budgetSummaryService to set.Copyright © 2013 The Kuali Foundation. All Rights Reserved.