Class DirectoryServiceImp

java.lang.Object
org.ehrbase.service.DirectoryServiceImp
All Implemented Interfaces:
org.ehrbase.api.service.DirectoryService, InternalDirectoryService

@Service @Transactional public class DirectoryServiceImp extends Object implements InternalDirectoryService
  • Field Summary

    Fields inherited from interface org.ehrbase.api.service.DirectoryService

    EHR_DIRECTORY_FOLDER_IDX
  • Constructor Summary

    Constructors
    Constructor
    Description
    DirectoryServiceImp(org.ehrbase.api.service.SystemService systemService, org.ehrbase.api.service.EhrService ehrService, EhrFolderRepository ehrFolderRepository)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    adminDeleteFolder(UUID ehrId, UUID folderId)
     
    com.nedap.archie.rm.directory.Folder
    create(UUID ehrId, com.nedap.archie.rm.directory.Folder folder)
     
    com.nedap.archie.rm.directory.Folder
    create(UUID ehrId, com.nedap.archie.rm.directory.Folder folder, UUID contributionId, UUID auditId)
    Create a new folder for Ehr with id equal ehrId
    void
    delete(UUID ehrId, com.nedap.archie.rm.support.identification.ObjectVersionId ifMatches)
     
    void
    delete(UUID ehrId, com.nedap.archie.rm.support.identification.ObjectVersionId ifMatches, UUID contributionId, UUID auditId)
    delete the folder for Ehr with id equal ehrId
    Optional<com.nedap.archie.rm.directory.Folder>
    get(UUID ehrId, com.nedap.archie.rm.support.identification.ObjectVersionId folderId, String path)
     
    Optional<com.nedap.archie.rm.directory.Folder>
    getByTime(UUID ehrId, OffsetDateTime time, String path)
     
    com.nedap.archie.rm.directory.Folder
    update(UUID ehrId, com.nedap.archie.rm.directory.Folder folder, com.nedap.archie.rm.support.identification.ObjectVersionId ifMatches)
     
    com.nedap.archie.rm.directory.Folder
    update(UUID ehrId, com.nedap.archie.rm.directory.Folder folder, com.nedap.archie.rm.support.identification.ObjectVersionId ifMatches, UUID contributionId, UUID auditId)
    Update the folder for Ehr with id equal ehrId

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DirectoryServiceImp

      public DirectoryServiceImp(org.ehrbase.api.service.SystemService systemService, org.ehrbase.api.service.EhrService ehrService, EhrFolderRepository ehrFolderRepository)
  • Method Details

    • get

      public Optional<com.nedap.archie.rm.directory.Folder> get(UUID ehrId, com.nedap.archie.rm.support.identification.ObjectVersionId folderId, String path)
      Specified by:
      get in interface org.ehrbase.api.service.DirectoryService
    • getByTime

      public Optional<com.nedap.archie.rm.directory.Folder> getByTime(UUID ehrId, OffsetDateTime time, String path)
      Specified by:
      getByTime in interface org.ehrbase.api.service.DirectoryService
    • create

      public com.nedap.archie.rm.directory.Folder create(UUID ehrId, com.nedap.archie.rm.directory.Folder folder)
      Specified by:
      create in interface org.ehrbase.api.service.DirectoryService
    • create

      public com.nedap.archie.rm.directory.Folder create(UUID ehrId, com.nedap.archie.rm.directory.Folder folder, UUID contributionId, UUID auditId)
      Description copied from interface: InternalDirectoryService
      Create a new folder for Ehr with id equal ehrId
      Specified by:
      create in interface InternalDirectoryService
      Parameters:
      ehrId -
      folder -
      contributionId - If null default contribution will be created ContributionRepository.createDefault(UUID, ContributionDataType, ContributionChangeType)
      auditId - If null default audit will be created
      invalid reference
      ContributionRepository#createDefaultAudit(ContributionChangeType)
      Returns:
    • update

      public com.nedap.archie.rm.directory.Folder update(UUID ehrId, com.nedap.archie.rm.directory.Folder folder, com.nedap.archie.rm.support.identification.ObjectVersionId ifMatches)
      Specified by:
      update in interface org.ehrbase.api.service.DirectoryService
    • update

      public com.nedap.archie.rm.directory.Folder update(UUID ehrId, com.nedap.archie.rm.directory.Folder folder, com.nedap.archie.rm.support.identification.ObjectVersionId ifMatches, UUID contributionId, UUID auditId)
      Description copied from interface: InternalDirectoryService
      Update the folder for Ehr with id equal ehrId
      Specified by:
      update in interface InternalDirectoryService
      Parameters:
      ehrId -
      folder -
      ifMatches - expected version before update for optimistic looking
      contributionId - If null default contribution will be created ContributionRepository.createDefault(UUID, ContributionDataType, ContributionChangeType)
      auditId - If null default audit will be created
      invalid reference
      ContributionRepository#createDefaultAudit(ContributionChangeType)
      Returns:
    • delete

      public void delete(UUID ehrId, com.nedap.archie.rm.support.identification.ObjectVersionId ifMatches)
      Specified by:
      delete in interface org.ehrbase.api.service.DirectoryService
    • delete

      public void delete(UUID ehrId, com.nedap.archie.rm.support.identification.ObjectVersionId ifMatches, UUID contributionId, UUID auditId)
      Description copied from interface: InternalDirectoryService
      delete the folder for Ehr with id equal ehrId
      Specified by:
      delete in interface InternalDirectoryService
      Parameters:
      ehrId -
      ifMatches - expected version before delete for optimistic looking
      contributionId - If null default contribution will be created ContributionRepository.createDefault(UUID, ContributionDataType, ContributionChangeType)
      auditId - If null default audit will be created
      invalid reference
      ContributionRepository#createDefaultAudit(ContributionChangeType)
    • adminDeleteFolder

      @PreAuthorize("hasRole(\'ADMIN\')") public void adminDeleteFolder(UUID ehrId, UUID folderId)
      Specified by:
      adminDeleteFolder in interface org.ehrbase.api.service.DirectoryService