Class TemplateDBStorageService

    • Constructor Detail

      • TemplateDBStorageService

        public TemplateDBStorageService​(org.jooq.DSLContext context,
                                        ServerConfig serverConfig)
    • Method Detail

      • storeTemplate

        public void storeTemplate​(org.openehr.schemas.v1.OPERATIONALTEMPLATE template)
        Description copied from interface: TemplateStorage
        Save a template in the store
        Specified by:
        storeTemplate in interface TemplateStorage
      • adminUpdateTemplate

        public String adminUpdateTemplate​(org.openehr.schemas.v1.OPERATIONALTEMPLATE template)
        Replaces the content of an existing template with the same id as in the provided template with the new content from provided one. Check that the old template is no longer referenced to avoid data inconsistencies
        Specified by:
        adminUpdateTemplate in interface TemplateStorage
        Parameters:
        template - - Template with new data and id of target to be replaced
        Returns:
        - XML content of the updated template
      • deleteTemplate

        public boolean deleteTemplate​(String templateId)
        Deletes an operational template from template storage. The template will be removed physically so ensure that there are no compositions referencing the template.
        Specified by:
        deleteTemplate in interface TemplateStorage
        Parameters:
        templateId - - Template id to delete from storage, e.g. "IDCR Allergies List.v0"
        Returns:
        - Deletion was successful or not
      • adminDeleteAllTemplates

        public int adminDeleteAllTemplates​(List<TemplateMetaData> templateMetaDataList)
        Removes all templates from template storage and returns the number of deleted entries.
        Specified by:
        adminDeleteAllTemplates in interface TemplateStorage
        Returns:
        - Count of deleted templates