Package fr.gouv.vitam.worker.core.plugin.common

# Class CheckResourceAvailability

java.lang.Object
fr.gouv.vitam.worker.core.handler.ActionHandler
fr.gouv.vitam.worker.core.plugin.common.CheckResourceAvailability

All Implemented Interfaces:
  `VitamAutoCloseable`, `AutoCloseable`

Direct Known Subclasses:
  `DataRectificationCheckResourceAvailability`, `ExportCheckResourceAvailability`, `PreservationCheckResourceAvailability`

public abstract class CheckResourceAvailability extends ActionHandler
Abstract service of resource availability plugins. These plugins should be added at the beginning of any workflow step who contains an action that download or copy from a resource that could be stored on an async offer.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `CheckResourceAvailability()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `checkResourcesAvailability(HandlerIO handlerIO, Map<AccessRequestContext,List<String>> objectIdsByContext, DataCategory type)`
  Check resource synchronous availability in storage and create access requests for unavailable objects
  `protected void`
  `checkResourcesAvailabilityByTypes(HandlerIO handlerIO, Map<DataCategory,Map<AccessRequestContext,List<String>>> objectIdsByContextbyType)`
  Check for multiple types resource synchronous availability in storage and create access requests for unavailable objects

  ### Methods inherited from class fr.gouv.vitam.worker.core.handler.ActionHandler

  `checkMandatoryIOParameter, checkMandatoryParameters, close, execute, executeList, updateDetailItemStatus`

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

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

- ## Constructor Details

  - ### CheckResourceAvailability

    protected CheckResourceAvailability()

- ## Method Details

  - ### checkResourcesAvailabilityByTypes

    protected void checkResourcesAvailabilityByTypes(HandlerIO handlerIO, Map<DataCategory,Map<AccessRequestContext,List<String>>> objectIdsByContextbyType) throws StorageServerClientException, ProcessingRetryAsyncException
    Check for multiple types resource synchronous availability in storage and create access requests for unavailable objects
    Parameters:
      `objectIdsByContextbyType` - object ids by context (strategy/offer) by type
    Throws:
      `StorageServerClientException` - exception from storage
      `ProcessingRetryAsyncException` - exception thrown when some resources are unavailable

  - ### checkResourcesAvailability

    protected void checkResourcesAvailability(HandlerIO handlerIO, Map<AccessRequestContext,List<String>> objectIdsByContext, DataCategory type) throws StorageServerClientException, ProcessingRetryAsyncException
    Check resource synchronous availability in storage and create access requests for unavailable objects
    Parameters:
      `objectIdsByContext` - object ids by context (strategy/offer)
      `type` - data category type
    Throws:
      `StorageServerClientException` - exception from storage
      `ProcessingRetryAsyncException` - exception thrown when some resources are unavailable