Class S2SBaseFormGenerator<T extends org.apache.xmlbeans.XmlObject>
java.lang.Object
org.kuali.coeus.s2sgen.impl.generate.S2SBaseFormGenerator<T>
- All Implemented Interfaces:
Factory<T>,Named,S2SFormGenerator<T>,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
- Direct Known Subclasses:
Attachments_1_2V1_2Generator,AttachmentsV1_1Generator,BudgetBaseGenerator,CD511V1_1Generator,CommonSF424BaseGenerator,ED524BudgetBaseGenerator,EDAbstractBaseGenerator,EDGEPA427BaseGenerator,EDGEPA427V2_0Generator,EDSF424SupplementBaseGenerator,FaithBasedSurveyOnEEOV1_2Generator,GGLobbyingFormBaseGenerator,NASAOtherProjectInformationV1_0Generator,NasaPIandAORSupplementalDataSheetV1_0Generator,NSFApplicationChecklistBaseGenerator,NSFCoverPageBaseGenerator,NSFDeviationAuthorizationBaseGenerator,NSFKeyPersonExpandedV1_0Generator,NSFKeyPersonExpandedV1_1Generator,NSFKeyPersonExpandedV1_2Generator,NSFKeyPersonExpandedV2_0Generator,NSFKeyPersonExpandedV3_0Generator,NSFKeyPersonExpandedV3_1Generator,NSFKeyPersonExpandedV3_3Generator,NSFSuggestedReviewersBaseGenerator,OtherBaseGenerator,PerformanceSiteBaseGenerator,PHS398CareerDevelopmentAwardSupBaseGenerator,PHS398ChecklistBaseGenerator,PHS398CoverLetterBaseGenerator,PHS398CoverPageSupplementBaseGenerator,PHS398FellowshipSupplementalBaseGenerator,PHS398ModularBudgetBaseGenerator,PHS398ResearchPlanBaseGenerator,PHS398ResTrainProgPlanV1_0Generator,PHS398ResTrainProgPlanV2_0Generator,PHS398ResTrainProgPlanV3_0Generator,PHS398ResTrainProgPlanV4_0Generator,PHS398ResTrainProgPlanV5_0Generator,PHS398ResTrainProgPlanV6_0Generator,PHS398TrainingBudgetV1_0Generator,PHS398TrainingBudgetV2_0Generator,PHSCoverLetterBaseGenerator,PHSHumanSubjectsAndClinicalTrialsInfo_2_0V2_0Generator,PHSHumanSubjectsAndClinicalTrialsInfo_3_0V3_0Generator,PHSHumanSubjectsAndClinicalTrialsInfoV1_0Generator,ProjectBaseGenerator,RRBudgetBaseGenerator,RRFedNonFedBudgetBaseGenerator,RRKeyPersonBase,RROtherProjectInfoBaseGenerator,RRPerformanceSiteBaseGenerator,RRPersonalDataBaseGenerator,RRSF424BV1_1Generator,S2SAdobeFormAttachmentBaseGenerator,SFLLLBaseGenerator,SupplementaryCoverSheetforNEHGrantPrograms_3_0V3_0
public abstract class S2SBaseFormGenerator<T extends org.apache.xmlbeans.XmlObject>
extends Object
implements S2SFormGenerator<T>, org.springframework.beans.factory.BeanNameAware
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final intprotected static final Stringprotected static final intprotected GlobalLibraryV2_0Generatorprotected static final Stringprotected static final intprotected static final intprotected org.kuali.coeus.propdev.api.core.ProposalDevelopmentDocumentContractprotected static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected gov.grants.apply.system.attachmentsV10.AttachedFileDataTypeaddAttachedFileType(org.kuali.coeus.propdev.api.attachment.NarrativeContract narrative) protected voidaddAttachment(AttachmentData attachment) This is for adding attachment for the forms during form generation.protected StringcleanFileName(String fileName) protected StringcreateContentId(org.kuali.coeus.propdev.api.attachment.NarrativeContract narrative) Generates the contentId or href for narrative attachments in S2Sprotected StringcreateContentId(org.kuali.coeus.propdev.api.person.attachment.ProposalPersonBiographyContract biography) protected StringgetAnswer(Integer questionSeqId, List<? extends org.kuali.coeus.common.questionnaire.api.answer.AnswerHeaderContract> answerHeaders) This method is used to get the answer for a particular Questionnaire question question based on the question id.protected LonggetAnswerId(Integer questionSeqId, List<? extends org.kuali.coeus.common.questionnaire.api.answer.AnswerHeaderContract> answerHeaders) This method is used to get the answerId for a particular Questionnaire question question based on the question id.protected StringgetAnswers(Integer questionSeqId, List<? extends org.kuali.coeus.common.questionnaire.api.answer.AnswerHeaderContract> answerHeaders) protected gov.grants.apply.system.attachmentsV10.AttachedFileDataTypegetAttachedFileDataType(String narrativeTypeCode) This method is used to get List of Other attachments from NarrativeAttachmentprotected gov.grants.apply.system.attachmentsV10.AttachedFileDataType[]getAttachedFileDataTypes(String narrativeTypeCode) This method is used to get List of Other attachments from NarrativeAttachmentGets the list of attachments associated with a form.protected StringgetChildQuestionAnswer(Integer parentQuestionSeqId, Integer questionSeqId, List<? extends org.kuali.coeus.common.questionnaire.api.answer.AnswerHeaderContract> answerHeaders) This method is used to get the child question answer for a particular Questionnaire question question based on the question id.protected gov.grants.apply.system.globalV10.HashValueDocument.HashValuegetHashValue(byte[] fileData) This method is used to generate the HashValue for a particular file stream.org.kuali.coeus.propdev.api.attachment.NarrativeServiceprotected org.kuali.coeus.propdev.api.person.ProposalPersonContractgetPerson(org.kuali.coeus.propdev.api.core.DevelopmentProposalContract developmentProposal, Integer proposalPersonNumber) protected gov.grants.apply.system.attachmentsV10.AttachedFileDataTypegetPersonnelAttachments(org.kuali.coeus.propdev.api.core.ProposalDevelopmentDocumentContract pdDoc, String personId, Integer rolodexId, String documentType) This method fetches the attachments forProposalPersonContract.org.kuali.coeus.propdev.api.questionnaire.PropDevQuestionAnswerServiceorg.kuali.coeus.common.questionnaire.api.core.QuestionAnswerServiceprotected StringgetS2sNarrativeFileName(org.kuali.coeus.propdev.api.attachment.NarrativeContract narrative) protected StringgetS2sPersonnelAttachmentFileName(org.kuali.coeus.propdev.api.core.DevelopmentProposalContract developmentProposal, org.kuali.coeus.propdev.api.person.attachment.ProposalPersonBiographyContract biography) org.kuali.coeus.common.api.sponsor.hierarchy.SponsorHierarchyServiceList<org.springframework.core.io.Resource> protected booleanisSponsorNIH(org.kuali.coeus.propdev.api.core.ProposalDevelopmentDocumentContract document) protected org.kuali.coeus.propdev.api.attachment.NarrativeContractsaveNarrative(byte[] attachment, String narrativeTypeCode, String fileName, String comment) voidsetAttachments(List<AttachmentData> attachments) voidsetAuditErrors(List<AuditError> auditErrors) voidsetBeanName(String beanName) voidsetGlobLibV20Generator(GlobalLibraryV2_0Generator globLibV20Generator) voidsetGrantApplicationHashService(GrantApplicationHashService grantApplicationHashService) voidsetNarrativeService(org.kuali.coeus.propdev.api.attachment.NarrativeService narrativeService) voidsetPropDevQuestionAnswerService(org.kuali.coeus.propdev.api.questionnaire.PropDevQuestionAnswerService propDevQuestionAnswerService) voidsetQuestionAnswerService(org.kuali.coeus.common.questionnaire.api.core.QuestionAnswerService questionAnswerService) voidsetSponsorHierarchyService(org.kuali.coeus.common.api.sponsor.hierarchy.SponsorHierarchyService sponsorHierarchyService) booleanbooleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kuali.coeus.s2sgen.impl.generate.S2SFormGenerator
getFormName, getFormObject, getNamespace, getSortIndex
-
Field Details
-
NOT_ANSWERED
- See Also:
-
AREAS_AFFECTED_ABSTRACT_TYPE_CODE
- See Also:
-
ORGANIZATON_NAME_MAX_LENGTH
protected static final int ORGANIZATON_NAME_MAX_LENGTH- See Also:
-
ORGANIZATION_UEI_MAX_LENGTH
protected static final int ORGANIZATION_UEI_MAX_LENGTH- See Also:
-
DUNS_NUMBER_MAX_LENGTH
protected static final int DUNS_NUMBER_MAX_LENGTH- See Also:
-
PRIMARY_TITLE_MAX_LENGTH
protected static final int PRIMARY_TITLE_MAX_LENGTH- See Also:
-
CONGRESSIONAL_DISTRICT_MAX_LENGTH
protected static final int CONGRESSIONAL_DISTRICT_MAX_LENGTH- See Also:
-
DEFAULT_SORT_INDEX
- See Also:
-
pdDoc
protected org.kuali.coeus.propdev.api.core.ProposalDevelopmentDocumentContract pdDoc -
globLibV20Generator
@Autowired @Qualifier("GlobalLibraryV2_0Generator") protected GlobalLibraryV2_0Generator globLibV20Generator
-
-
Constructor Details
-
S2SBaseFormGenerator
public S2SBaseFormGenerator()
-
-
Method Details
-
getAttachments
Gets the list of attachments associated with a form. As the form generator fills the form data, the attachment information is stored into the instance variable- Specified by:
getAttachmentsin interfaceS2SFormGenerator<T extends org.apache.xmlbeans.XmlObject>- Returns:
- List<AttachementData> List of attachments associated with the the form. Returns an empty list if no attachment is available.
-
addAttachment
This is for adding attachment for the forms during form generation.- Parameters:
attachment- - The attachment data to add.
-
getHashValue
protected gov.grants.apply.system.globalV10.HashValueDocument.HashValue getHashValue(byte[] fileData) This method is used to generate the HashValue for a particular file stream. The hashing algorithm is defined in constant S2SConstants.HASH_ALGORITHM- Parameters:
fileData- - They byte[] containing the file data.- Returns:
- HashValue - The hash value calculated for the fileData input.
-
createContentId
protected String createContentId(org.kuali.coeus.propdev.api.attachment.NarrativeContract narrative) Generates the contentId or href for narrative attachments in S2S -
createContentId
protected String createContentId(org.kuali.coeus.propdev.api.person.attachment.ProposalPersonBiographyContract biography) -
addAttachedFileType
protected gov.grants.apply.system.attachmentsV10.AttachedFileDataType addAttachedFileType(org.kuali.coeus.propdev.api.attachment.NarrativeContract narrative) -
getAttachedFileDataTypes
protected gov.grants.apply.system.attachmentsV10.AttachedFileDataType[] getAttachedFileDataTypes(String narrativeTypeCode) This method is used to get List of Other attachments from NarrativeAttachment- Returns:
- AttachedFileDataType[] based on the narrative type code.
-
getAttachedFileDataType
protected gov.grants.apply.system.attachmentsV10.AttachedFileDataType getAttachedFileDataType(String narrativeTypeCode) This method is used to get List of Other attachments from NarrativeAttachment- Returns:
- AttachedFileDataType[] based on the narrative type code.
-
getPersonnelAttachments
protected gov.grants.apply.system.attachmentsV10.AttachedFileDataType getPersonnelAttachments(org.kuali.coeus.propdev.api.core.ProposalDevelopmentDocumentContract pdDoc, String personId, Integer rolodexId, String documentType) This method fetches the attachments forProposalPersonContract. For a given person or rolodex ID, it will fetch the document of required type, also passed alongside as documentType- Parameters:
pdDoc-ProposalDevelopmentDocumentContractfrom which the attachments are to be fetchedpersonId- ID of the proposal personrolodexId- Rolodex ID of the persondocumentType- type of document thats to be fetched- Returns:
AttachedFileDataTypecontaining the required document
-
getS2sNarrativeFileName
protected String getS2sNarrativeFileName(org.kuali.coeus.propdev.api.attachment.NarrativeContract narrative) -
getS2sPersonnelAttachmentFileName
protected String getS2sPersonnelAttachmentFileName(org.kuali.coeus.propdev.api.core.DevelopmentProposalContract developmentProposal, org.kuali.coeus.propdev.api.person.attachment.ProposalPersonBiographyContract biography) -
cleanFileName
-
getPerson
protected org.kuali.coeus.propdev.api.person.ProposalPersonContract getPerson(org.kuali.coeus.propdev.api.core.DevelopmentProposalContract developmentProposal, Integer proposalPersonNumber) -
getAuditErrors
- Specified by:
getAuditErrorsin interfaceS2SFormGenerator<T extends org.apache.xmlbeans.XmlObject>
-
setAuditErrors
-
isSponsorNIH
protected boolean isSponsorNIH(org.kuali.coeus.propdev.api.core.ProposalDevelopmentDocumentContract document) -
saveNarrative
-
setAttachments
-
getAnswer
protected String getAnswer(Integer questionSeqId, List<? extends org.kuali.coeus.common.questionnaire.api.answer.AnswerHeaderContract> answerHeaders) This method is used to get the answer for a particular Questionnaire question question based on the question id.- Parameters:
questionSeqId- the question seq id to be passed.- Returns:
- returns the answer for a particular question based on the question id passed.
-
getAnswerId
protected Long getAnswerId(Integer questionSeqId, List<? extends org.kuali.coeus.common.questionnaire.api.answer.AnswerHeaderContract> answerHeaders) This method is used to get the answerId for a particular Questionnaire question question based on the question id.- Parameters:
questionSeqId- the question seq id to be passed.- Returns:
- returns the answer for a particular question based on the question id passed.
-
getChildQuestionAnswer
protected String getChildQuestionAnswer(Integer parentQuestionSeqId, Integer questionSeqId, List<? extends org.kuali.coeus.common.questionnaire.api.answer.AnswerHeaderContract> answerHeaders) This method is used to get the child question answer for a particular Questionnaire question question based on the question id.- Parameters:
parentQuestionSeqId- the parentQuestion id to be passed.questionSeqId- the question id to be passed.- Returns:
- returns the answer for a particular question based on the question id passed.
-
getAnswers
-
getBeanName
- Specified by:
getBeanNamein interfaceNamed
-
setBeanName
- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware
-
getStylesheets
- Specified by:
getStylesheetsin interfaceS2SFormGenerator<T extends org.apache.xmlbeans.XmlObject>
-
supportsPdfFilling
public boolean supportsPdfFilling()- Specified by:
supportsPdfFillingin interfaceS2SFormGenerator<T extends org.apache.xmlbeans.XmlObject>
-
supportsXslTransform
public boolean supportsXslTransform()- Specified by:
supportsXslTransformin interfaceS2SFormGenerator<T extends org.apache.xmlbeans.XmlObject>
-
getNarrativeService
public org.kuali.coeus.propdev.api.attachment.NarrativeService getNarrativeService() -
getPropDevQuestionAnswerService
public org.kuali.coeus.propdev.api.questionnaire.PropDevQuestionAnswerService getPropDevQuestionAnswerService() -
getQuestionAnswerService
public org.kuali.coeus.common.questionnaire.api.core.QuestionAnswerService getQuestionAnswerService() -
setNarrativeService
public void setNarrativeService(org.kuali.coeus.propdev.api.attachment.NarrativeService narrativeService) -
setPropDevQuestionAnswerService
public void setPropDevQuestionAnswerService(org.kuali.coeus.propdev.api.questionnaire.PropDevQuestionAnswerService propDevQuestionAnswerService) -
setQuestionAnswerService
public void setQuestionAnswerService(org.kuali.coeus.common.questionnaire.api.core.QuestionAnswerService questionAnswerService) -
getSponsorHierarchyService
public org.kuali.coeus.common.api.sponsor.hierarchy.SponsorHierarchyService getSponsorHierarchyService() -
setSponsorHierarchyService
public void setSponsorHierarchyService(org.kuali.coeus.common.api.sponsor.hierarchy.SponsorHierarchyService sponsorHierarchyService) -
getGrantApplicationHashService
-
setGrantApplicationHashService
-
getGlobLibV20Generator
-
setGlobLibV20Generator
-