Package fr.gouv.vitam.storage.offers.tape.cas

# Class AccessRequestReferentialRepository

java.lang.Object
fr.gouv.vitam.storage.offers.tape.cas.AccessRequestReferentialRepository

public class AccessRequestReferentialRepository extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AccessRequestReferentialRepository(com.mongodb.client.MongoCollection<org.bson.Document> collection)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<TapeAccessRequestReferentialEntity>`
  `cleanupAndGetExpiredAccessRequests()`
  `long`
  `countExpiredAccessRequests()`
  `long`
  `countNonReadyAccessRequests()`
  `long`
  `countReadyAccessRequests()`
  `boolean`
  `deleteAccessRequestById(String accessRequestId)`
  `Set<String>`
  `excludeArchiveIdsStillRequiredByAccessRequests(Set<String> archiveIdsToCheck)`
  `Optional<TapeAccessRequestReferentialEntity>`
  `findByRequestId(String requestId)`
  `List<TapeAccessRequestReferentialEntity>`
  `findByRequestIds(Set<String> requestIds)`
  `List<TapeAccessRequestReferentialEntity>`
  `findByUnavailableArchiveId(String archiveId)`
  `List<TapeAccessRequestReferentialEntity>`
  `findNonReadyAccessRequests()`
  `void`
  `insert(TapeAccessRequestReferentialEntity accessRequestReferentialEntity)`
  `CloseableIterator<TapeLibraryObjectReferentialId>`
  `listObjectIdsForActiveAccessRequests()`
  `boolean`
  `updateAccessRequest(TapeAccessRequestReferentialEntity updatedAccessRequestEntity, int expectedVersion)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AccessRequestReferentialRepository

    public AccessRequestReferentialRepository(com.mongodb.client.MongoCollection<org.bson.Document> collection)

- ## Method Details

  - ### insert

    public void insert(TapeAccessRequestReferentialEntity accessRequestReferentialEntity) throws AccessRequestReferentialException
    Throws:
      `AccessRequestReferentialException`

  - ### findByRequestId

    public Optional<TapeAccessRequestReferentialEntity> findByRequestId(String requestId) throws AccessRequestReferentialException
    Throws:
      `AccessRequestReferentialException`

  - ### findByRequestIds

    public List<TapeAccessRequestReferentialEntity> findByRequestIds(Set<String> requestIds) throws AccessRequestReferentialException
    Throws:
      `AccessRequestReferentialException`

  - ### countNonReadyAccessRequests

    public long countNonReadyAccessRequests() throws AccessRequestReferentialException
    Throws:
      `AccessRequestReferentialException`

  - ### countReadyAccessRequests

    public long countReadyAccessRequests() throws AccessRequestReferentialException
    Throws:
      `AccessRequestReferentialException`

  - ### countExpiredAccessRequests

    public long countExpiredAccessRequests() throws AccessRequestReferentialException
    Throws:
      `AccessRequestReferentialException`

  - ### findNonReadyAccessRequests

    public List<TapeAccessRequestReferentialEntity> findNonReadyAccessRequests() throws AccessRequestReferentialException
    Throws:
      `AccessRequestReferentialException`

  - ### findByUnavailableArchiveId

    public List<TapeAccessRequestReferentialEntity> findByUnavailableArchiveId(String archiveId) throws AccessRequestReferentialException
    Throws:
      `AccessRequestReferentialException`

  - ### deleteAccessRequestById

    public boolean deleteAccessRequestById(String accessRequestId) throws AccessRequestReferentialException
    Throws:
      `AccessRequestReferentialException`

  - ### cleanupAndGetExpiredAccessRequests

    public List<TapeAccessRequestReferentialEntity> cleanupAndGetExpiredAccessRequests() throws AccessRequestReferentialException
    Throws:
      `AccessRequestReferentialException`

  - ### excludeArchiveIdsStillRequiredByAccessRequests

    public Set<String> excludeArchiveIdsStillRequiredByAccessRequests(Set<String> archiveIdsToCheck)

  - ### updateAccessRequest

    public boolean updateAccessRequest(TapeAccessRequestReferentialEntity updatedAccessRequestEntity, int expectedVersion) throws AccessRequestReferentialException
    Throws:
      `AccessRequestReferentialException`

  - ### listObjectIdsForActiveAccessRequests

    public CloseableIterator<TapeLibraryObjectReferentialId> listObjectIdsForActiveAccessRequests() throws AccessRequestReferentialException
    Throws:
      `AccessRequestReferentialException`