Class TemplateVersionDao

    • Constructor Detail

      • TemplateVersionDao

        public TemplateVersionDao()
    • Method Detail

      • getTemplateVersionFromPK

        public TemplateVersion getTemplateVersionFromPK​(Object id)
        Return the template version with the specified OID
        Parameters:
        id - the OID
        Returns:
        the matching template version, or null if not found
      • getTemplateVersionForFormCode

        public TemplateVersion getTemplateVersionForFormCode​(String formCode,
                                                             String versionNumber)
        Return the template version for a specified form and version number
        Parameters:
        formCode - the non-empty form code of the form associated with the template version
        versionNumber - the non-empty version number
        Returns:
        the matching template version
      • getCurrentTemplateVersionForFormCode

        public TemplateVersion getCurrentTemplateVersionForFormCode​(String formCode)
        Return the current template version for a specified form
        Parameters:
        formCode - the non-empty form code of the form associated with the template version
        Returns:
        the current template version for the form
      • getTemplateVersionForForm

        public TemplateVersion getTemplateVersionForForm​(Form form,
                                                         String versionNumber)
        Return the template version for a specified form and version number
        Parameters:
        form - the non-null form
        versionNumber - the non-empty version number
        Returns:
        the matching template version
      • getTemplateVersionForFormNoCache

        public TemplateVersion getTemplateVersionForFormNoCache​(Form form,
                                                                String versionNumber)
        Return the template version for a specified form and version number
        Parameters:
        form - the non-null form
        versionNumber - the non-empty version number
        Returns:
        the matching template version
        Since:
        5.1.4
      • getVersionsForForm

        public List<TemplateVersion> getVersionsForForm​(String formCode)
        Return all versions for a form, sorted ascending by version number
        Parameters:
        formCode - the form code of the form (required)
        Returns:
        the form versions, sorted ascending by version number
        Since:
        4.1.0
      • getAll

        public List<TemplateVersion> getAll()
        Return all template versions defined in the system, with no fetch limit and a limited page size
        Returns:
        the list of template versions
      • getLiveCycleTemplates

        public List<TemplateVersion> getLiveCycleTemplates()
        Return the list of Template Versions which have a LC Form or LC Receipt and with a active form.
        Returns:
        the list of Template Versions which have a LC Form or LC Receipt and with a active form
      • getTemplateVersionsWithNullMD5

        public List<TemplateVersion> getTemplateVersionsWithNullMD5()
        Return the list of template versions that are missing the md5 hash, with no fetch limit and a limited page size
        Returns:
        the list of matching template versions
      • getVersionsForPromotion

        public List<TemplateVersion> getVersionsForPromotion​(Form form)
        Return the list of template versions that have no promotion log records
        Parameters:
        form - the non-null form object for which template versions shall be found
        Returns:
        the list of matching template versions
      • copyTemplateVersionAttributes

        public void copyTemplateVersionAttributes​(TemplateVersion lastVersion,
                                                  TemplateVersion newVersion)
        Copy the last template version attributes and properties to the new template version.
        Parameters:
        lastVersion - the latest template version (ordered by version number) copy source
        newVersion - the new template version to copy to
      • getVersionForFormDesignVersion

        public TemplateVersion getVersionForFormDesignVersion​(Long formDesignVersionId)
        Return the template version with the specified form design version OID.
        Parameters:
        formDesignVersionId - the form design version ID (required)
        Returns:
        the template version, or null if none was found
        Since:
        4.0.0
      • getDesignMetaDataVersionsToPublish

        public List<TemplateVersion> getDesignMetaDataVersionsToPublish()
        Return the list TemplateVersions with Form Design Metadata to publish.
        Returns:
        the list TemplateVersions with Form Design Metadata to publish
        Since:
        5.1.0
      • hasRequiredAttachments

        public boolean hasRequiredAttachments​(TemplateVersion version)
        Return true if the template version has required version attachments.
        Parameters:
        version - the template version (required)
        Returns:
        true if the template version has required version attachments.
        Since:
        17.10.0