Package org.lockss.laaws.rs.impl
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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lockss.spring.base.BaseSpringApiServiceImpl
BaseSpringApiServiceImpl.MapMessageListener -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final longstatic final intstatic final booleanstatic final intstatic final intstatic final intstatic final intstatic final StringInterval after which unused Artifact iterator continuations will be discarded.static final StringInterval after which unused AUID iterator continuations will be discarded.static final StringBatch size when adding Artifacts in bulk, when using aDispatchingArtifactIndex.static final StringSet false to disable putting AUs into bulk modestatic final StringDefault number of Artifacts that will be returned in a single (paged) responsestatic final StringDefault number of AUIDs that will be returned in a single (paged) responsestatic final StringMax number of Artifacts that will be returned in a single (paged) responsestatic final StringMax number of AUIDs that will be returned in a single (paged) responsestatic final StringFields inherited from class org.lockss.spring.base.BaseSpringApiServiceImpl
DEFAULT_CONFIG_WAIT_TIME, DEFAULT_READY_WAIT_TIME, JMS_BOTH, JMS_RECEIVE, JMS_SEND, jmsConsumer, jmsProducer, PARAM_CONFIG_WAIT_TIME, PARAM_READY_WAIT_TIME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.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.org.springframework.http.ResponseEntity<AuSize>getArtifactsSize(String auid, String namespace) GET /aus/{auid}/size: Get the size of Archival Unit artifacts in a namespace.org.springframework.http.ResponseEntity<AuidPageInfo>GET /aus: Get all Archival Unit IDs (AUIDs) in a namespace or a pageful of the list defined by the continuation token and size.org.springframework.http.ResponseEntity<Void>handleBulkAuOp(String auid, String op, String namespace) Handles bulk transfer operations for an AUID in a namespace.voidsetConfig(org.lockss.config.Configuration newConfig, org.lockss.config.Configuration prevConfig, org.lockss.config.Configuration.Differences changedKeys) Methods inherited from class org.lockss.spring.base.BaseSpringApiServiceImpl
configMgrCreated, getClassName, getConfigWaitTime, getJMSManager, getPluginManager, getReadyWaitTime, getRunningLockssDaemon, getStateManager, getWaitTime, jmsSetUpDone, jsonResponse, receiveMessage, registerConfigCallback, setUpJms, setUpJms, setUpJms, stopJms, stringResponse, waitConfig, waitConfig, waitReady, waitReadyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.lockss.laaws.rs.api.AusApiDelegate
getAcceptHeader, getObjectMapper, getRequest
-
Field Details
-
PREFIX
- See Also:
-
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
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
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
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
Batch size when adding Artifacts in bulk, when using aDispatchingArtifactIndex.- See Also:
-
DEFAULT_BULK_INDEX_BATCH_SIZE
public static final int DEFAULT_BULK_INDEX_BATCH_SIZE- See Also:
-
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
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
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:
setConfigin interfaceLockssConfigurableService
-
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:
getArtifactsin interfaceAusApiDelegate- 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:
getArtifactsSizein interfaceAusApiDelegate- 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:
getAusin interfaceAusApiDelegate- 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 arestartandfinish.- Specified by:
handleBulkAuOpin interfaceAusApiDelegate- Parameters:
auid- AStringcontaining the AUID to operate on.op- AStringwith the operation to perform. Must be eitherstartorfinish.namespace- AStringcontaining the namespace of the AUID to operate on.- Returns:
- TBD
- See Also:
-