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 Details

    • NOT_ANSWERED

      protected static final String NOT_ANSWERED
      See Also:
    • AREAS_AFFECTED_ABSTRACT_TYPE_CODE

      protected static final String 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

      protected static final String 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

      public List<org.kuali.coeus.s2sgen.api.generate.AttachmentData> 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:
      getAttachments in interface S2SFormGenerator<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

      protected void addAttachment(org.kuali.coeus.s2sgen.api.generate.AttachmentData attachment)
      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 for ProposalPersonContract. For a given person or rolodex ID, it will fetch the document of required type, also passed alongside as documentType
      Parameters:
      pdDoc - ProposalDevelopmentDocumentContract from which the attachments are to be fetched
      personId - ID of the proposal person
      rolodexId - Rolodex ID of the person
      documentType - type of document thats to be fetched
      Returns:
      AttachedFileDataType containing 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

      protected String cleanFileName(String fileName)
    • getPerson

      protected org.kuali.coeus.propdev.api.person.ProposalPersonContract getPerson(org.kuali.coeus.propdev.api.core.DevelopmentProposalContract developmentProposal, Integer proposalPersonNumber)
    • getAuditErrors

      public List<org.kuali.coeus.s2sgen.api.core.AuditError> getAuditErrors()
      Specified by:
      getAuditErrors in interface S2SFormGenerator<T extends org.apache.xmlbeans.XmlObject>
    • setAuditErrors

      public void setAuditErrors(List<org.kuali.coeus.s2sgen.api.core.AuditError> auditErrors)
    • isSponsorNIH

      protected boolean isSponsorNIH(org.kuali.coeus.propdev.api.core.ProposalDevelopmentDocumentContract document)
    • saveNarrative

      protected org.kuali.coeus.propdev.api.attachment.NarrativeContract saveNarrative(byte[] attachment, String narrativeTypeCode, String fileName, String comment)
    • setAttachments

      public void setAttachments(List<org.kuali.coeus.s2sgen.api.generate.AttachmentData> attachments)
    • 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

      protected String getAnswers(Integer questionSeqId, List<? extends org.kuali.coeus.common.questionnaire.api.answer.AnswerHeaderContract> answerHeaders)
    • getBeanName

      public String getBeanName()
      Specified by:
      getBeanName in interface Named
    • setBeanName

      public void setBeanName(String beanName)
      Specified by:
      setBeanName in interface org.springframework.beans.factory.BeanNameAware
    • getStylesheets

      public List<org.springframework.core.io.Resource> getStylesheets()
      Specified by:
      getStylesheets in interface S2SFormGenerator<T extends org.apache.xmlbeans.XmlObject>
    • supportsPdfFilling

      public boolean supportsPdfFilling()
      Specified by:
      supportsPdfFilling in interface S2SFormGenerator<T extends org.apache.xmlbeans.XmlObject>
    • supportsXslTransform

      public boolean supportsXslTransform()
      Specified by:
      supportsXslTransform in interface S2SFormGenerator<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

      public org.kuali.coeus.s2sgen.api.hash.GrantApplicationHashService getGrantApplicationHashService()
    • setGrantApplicationHashService

      public void setGrantApplicationHashService(org.kuali.coeus.s2sgen.api.hash.GrantApplicationHashService grantApplicationHashService)
    • getGlobLibV20Generator

      public GlobalLibraryV2_0Generator getGlobLibV20Generator()
    • setGlobLibV20Generator

      public void setGlobLibV20Generator(GlobalLibraryV2_0Generator globLibV20Generator)