Interface I_KnowledgeCache

All Known Implementing Classes:
KnowledgeCacheService

public interface I_KnowledgeCache
  • Field Details

  • Method Details

    • getAllTemplateIds

      Set<String> getAllTemplateIds()
    • addOperationalTemplate

      String addOperationalTemplate(InputStream content, String tenantIdentifier)
      Adds operational template to system and also in current cache.
      Parameters:
      content - operational template input
      Returns:
      resulting template ID, when successful
      Throws:
      InvalidApiParameterException - when input can't be pared to OPT instance
      StateConflictException - when template with same template ID is already in the system
      InternalServerException - when an unspecified problem occurs
    • addOperationalTemplate

      String addOperationalTemplate(org.openehr.schemas.v1.OPERATIONALTEMPLATE template, String tenantIdentifier)
    • listAllOperationalTemplates

      List<TemplateMetaData> listAllOperationalTemplates() throws IOException
      Throws:
      IOException
    • retrieveOperationalTemplate

      Optional<org.openehr.schemas.v1.OPERATIONALTEMPLATE> retrieveOperationalTemplate(String key)
      retrieve an operational template document instance
      Parameters:
      key - the name of the operational template
      Returns:
      an OPERATIONALTEMPLATE document instance or null
      See Also:
      • OPERATIONALTEMPLATE
    • retrieveOperationalTemplate

      Optional<org.openehr.schemas.v1.OPERATIONALTEMPLATE> retrieveOperationalTemplate(UUID uuid)
      retrieve a cached operational template document instance using its unique Id
      Parameters:
      uuid - the name of the operational template
      Returns:
      an OPERATIONALTEMPLATE document instance or null
      Throws:
      Exception
      See Also:
      • OPERATIONALTEMPLATE
    • deleteOperationalTemplate

      boolean deleteOperationalTemplate(org.openehr.schemas.v1.OPERATIONALTEMPLATE template)
      Deletes a given operational template physically from cache and from template storage and from cache. Should only be executed if the template is no longer referenced by any Composition. Make sure you check for references before deleting a template otherwise this causes inconsistencies and no longer deliverable Composition entries.
      Parameters:
      template - - The template instance to delete
      Returns:
      - Template has been deleted
    • resolveForTemplate

      JsonPathQueryResult resolveForTemplate(String templateId, Collection<org.ehrbase.webtemplate.parser.NodeId> jsonQueryExpression)