Class AusApiServiceImpl

java.lang.Object
org.lockss.spring.base.BaseSpringApiServiceImpl
org.lockss.laaws.rs.impl.AusApiServiceImpl
All Implemented Interfaces:
AusApiDelegate, LockssConfigurableService

@Service public class AusApiServiceImpl extends BaseSpringApiServiceImpl implements AusApiDelegate, LockssConfigurableService
  • Field Details

    • PREFIX

      public static final String PREFIX
      See Also:
    • PARAM_DEFAULT_ARTIFACT_PAGESIZE

      public static final String PARAM_DEFAULT_ARTIFACT_PAGESIZE
      Default number of Artifacts that will be returned in a single (paged) response
      See Also:
    • DEFAULT_DEFAULT_ARTIFACT_PAGESIZE

      public static final int DEFAULT_DEFAULT_ARTIFACT_PAGESIZE
      See Also:
    • PARAM_MAX_ARTIFACT_PAGESIZE

      public static final String PARAM_MAX_ARTIFACT_PAGESIZE
      Max number of Artifacts that will be returned in a single (paged) response
      See Also:
    • DEFAULT_MAX_ARTIFACT_PAGESIZE

      public static final int DEFAULT_MAX_ARTIFACT_PAGESIZE
      See Also:
    • PARAM_DEFAULT_AUID_PAGESIZE

      public static final String PARAM_DEFAULT_AUID_PAGESIZE
      Default number of AUIDs that will be returned in a single (paged) response
      See Also:
    • DEFAULT_DEFAULT_AUID_PAGESIZE

      public static final int DEFAULT_DEFAULT_AUID_PAGESIZE
      See Also:
    • PARAM_MAX_AUID_PAGESIZE

      public static final String PARAM_MAX_AUID_PAGESIZE
      Max number of AUIDs that will be returned in a single (paged) response
      See Also:
    • DEFAULT_MAX_AUID_PAGESIZE

      public static final int DEFAULT_MAX_AUID_PAGESIZE
      See Also:
    • PARAM_BULK_INDEX_BATCH_SIZE

      public static final String PARAM_BULK_INDEX_BATCH_SIZE
      Batch size when adding Artifacts in bulk, when using a DispatchingArtifactIndex.
      See Also:
    • DEFAULT_BULK_INDEX_BATCH_SIZE

      public static final int DEFAULT_BULK_INDEX_BATCH_SIZE
      See Also:
    • PARAM_BULK_INDEX_ENABLED

      public static final String PARAM_BULK_INDEX_ENABLED
      Set false to disable putting AUs into bulk mode
      See Also:
    • DEFAULT_BULK_INDEX_ENABLED

      public static final boolean DEFAULT_BULK_INDEX_ENABLED
      See Also:
    • PARAM_ARTIFACT_ITERATOR_TIMEOUT

      public static final String PARAM_ARTIFACT_ITERATOR_TIMEOUT
      Interval after which unused Artifact iterator continuations will be discarded. Change requires restart to take effect.
      See Also:
    • DEFAULT_ARTIFACT_ITERATOR_TIMEOUT

      public static final long DEFAULT_ARTIFACT_ITERATOR_TIMEOUT
      See Also:
    • PARAM_AUID_ITERATOR_TIMEOUT

      public static final String PARAM_AUID_ITERATOR_TIMEOUT
      Interval after which unused AUID iterator continuations will be discarded. Change requires restart to take effect.
      See Also:
    • DEFAULT_AUID_ITERATOR_TIMEOUT

      public static final long DEFAULT_AUID_ITERATOR_TIMEOUT
      See Also:
  • Constructor Details

    • AusApiServiceImpl

      @Autowired public AusApiServiceImpl(jakarta.servlet.http.HttpServletRequest request)
  • Method Details

    • setConfig

      public void setConfig(org.lockss.config.Configuration newConfig, org.lockss.config.Configuration prevConfig, org.lockss.config.Configuration.Differences changedKeys)
      Specified by:
      setConfig in interface LockssConfigurableService
    • getArtifacts

      public org.springframework.http.ResponseEntity<ArtifactPageInfo> getArtifacts(String auid, String namespace, String url, String urlPrefix, String version, Boolean includeUncommitted, Integer limit, String continuationToken)
      GET /aus/{auid}/artifacts: Get a list with all the artifacts in a namespace and Archival Unit or a pageful of the list defined by the continuation token and size.
      Specified by:
      getArtifacts in interface AusApiDelegate
      Parameters:
      auid - A String with the Archival Unit ID (AUID) of artifact.
      namespace - A String with the namespace of the artifact.
      url - A String with the URL contained by the artifacts.
      urlPrefix - A String with the prefix to be matched by the artifact URLs.
      version - An Integer with the version of the URL contained by the artifacts.
      includeUncommitted - A boolean with the indication of whether uncommitted artifacts should be returned.
      limit - An Integer with the maximum number of artifacts to be returned.
      continuationToken - A String with the continuation token of the next page of artifacts to be returned.
      Returns:
      a ResponseEntity<ArtifactPageInfo> with the requested artifacts.
      See Also:
    • getArtifactsSize

      public org.springframework.http.ResponseEntity<AuSize> getArtifactsSize(String auid, String namespace)
      GET /aus/{auid}/size: Get the size of Archival Unit artifacts in a namespace.
      Specified by:
      getArtifactsSize in interface AusApiDelegate
      Parameters:
      auid - A String with the Archival Unit ID (AUID).
      namespace - A String with the namespace of the Archival Unit.
      Returns:
      a org.springframework.http.ResponseEntity<AuSize>.
      See Also:
    • getAus

      public org.springframework.http.ResponseEntity<AuidPageInfo> getAus(String namespace, Integer limit, String continuationToken)
      GET /aus: Get all Archival Unit IDs (AUIDs) in a namespace or a pageful of the list defined by the continuation token and size.
      Specified by:
      getAus in interface AusApiDelegate
      Parameters:
      namespace - A String with the namespace of the Archival Units.
      limit - An Integer with the maximum number of archival unit identifiers to be returned.
      continuationToken - A String with the continuation token of the next page of archival unit identifiers to be returned.
      Returns:
      a ResponseEntity<AuidPageInfo>.
      See Also:
    • handleBulkAuOp

      public org.springframework.http.ResponseEntity<Void> handleBulkAuOp(String auid, String op, String namespace)
      Handles bulk transfer operations for an AUID in a namespace. Possible operations are start and finish.
      Specified by:
      handleBulkAuOp in interface AusApiDelegate
      Parameters:
      auid - A String containing the AUID to operate on.
      op - A String with the operation to perform. Must be either start or finish.
      namespace - A String containing the namespace of the AUID to operate on.
      Returns:
      TBD
      See Also: