Package org.ehrbase.service
Interface TemplateStorage
- All Known Implementing Classes:
TemplateDBStorageService
public interface TemplateStorage
-
Method Summary
Modifier and TypeMethodDescriptionbooleanDeterminate if template overwriting is enabled for this storagevoiddeleteTemplate(String templateId) Deletes an operational template from template storage.findTemplateIdByUuid(UUID uuid) findUuidByTemplateId(String templateId) List all Templates in the store;readTemplate(String templateId) Find and return a saved Template by templateIdstoreTemplate(org.openehr.schemas.v1.OPERATIONALTEMPLATE template) Save a template in the store
-
Method Details
-
allowTemplateOverwrite
boolean allowTemplateOverwrite()Determinate if template overwriting is enabled for this storage- Returns:
- allowTemplateOverwrite
-
listAllOperationalTemplates
List<TemplateMetaData> listAllOperationalTemplates()List all Templates in the store;- Returns:
- @see
TemplateMetaData
-
findAllTemplateIds
-
storeTemplate
Save a template in the store- Parameters:
template- @seeOPERATIONALTEMPLATE- Throws:
RuntimeException- template Id or uuid are not unique
-
readTemplate
Find and return a saved Template by templateId- Parameters:
templateId-- Returns:
- the template @see
OPERATIONALTEMPLATEorOptional.empty()if not found.
-
deleteTemplate
Deletes an operational template from template storage. The template will be removed physically so ensure that there are no compositions referencing the template.- Parameters:
templateId- - Template id to delete from storage, e.g. "IDCR Allergies List.v0"
-
deleteAllTemplates
-
findTemplateIdByUuid
-
findUuidByTemplateId
-