@Service public class CollectionsApiServiceImpl extends BaseSpringApiServiceImpl implements CollectionsApiDelegate
BaseSpringApiServiceImpl.MapMessageListenerDEFAULT_CONFIG_WAIT_TIME, DEFAULT_READY_WAIT_TIME, JMS_BOTH, JMS_RECEIVE, JMS_SEND, jmsConsumer, jmsProducer, PARAM_CONFIG_WAIT_TIME, PARAM_READY_WAIT_TIME| Constructor and Description |
|---|
CollectionsApiServiceImpl(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
javax.servlet.http.HttpServletRequest request)
Constructor for autowiring.
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<Artifact> |
createArtifact(String collectionid,
String auid,
String uri,
org.springframework.web.multipart.MultipartFile content,
org.springframework.web.multipart.MultipartFile aspectParts)
POST /collections/{collectionid}/artifacts:
Adds artifacts to the repository
|
org.springframework.http.ResponseEntity<Void> |
deleteArtifact(String collectionid,
String artifactid)
DELETE /collections/{collectionid}/artifacts/{artifactid}:
Deletes an artifact from a collection managed by this repository.
|
org.springframework.http.ResponseEntity<org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody> |
getArtifact(String collectionid,
String artifactid,
String accept)
GET /collections/{collectionid}/artifacts/{artifactid}:
Retrieves an artifact from the repository.
|
org.springframework.http.ResponseEntity<ArtifactPageInfo> |
getArtifacts(String collectionid,
String auid,
String url,
String urlPrefix,
String version,
Boolean includeUncommitted,
Integer limit,
String continuationToken)
GET /collections/{collectionid}/aus/{auid}/artifacts: Get a list with all
the artifacts in a collection and Archival Unit or a pageful of the list
defined by the continuation token and size.
|
org.springframework.http.ResponseEntity<Long> |
getArtifactsSize(String collectionid,
String auid,
String url,
String urlPrefix,
String version)
GET /collections/{collectionid}/aus/{auid}/size:
Get the size of Archival Unit artifacts in a collection.
|
org.springframework.http.ResponseEntity<AuidPageInfo> |
getAus(String collectionid,
Integer limit,
String continuationToken)
GET /collections/{collectionid}/aus: Get all Archival Unit IDs (AUIDs) in a
collection or a pageful of the list defined by the continuation token and
size.
|
org.springframework.http.ResponseEntity<List<String>> |
getCollections()
GET /collections:
Returns a list of collection names managed by this repository.
|
Optional<com.fasterxml.jackson.databind.ObjectMapper> |
getObjectMapper() |
Optional<javax.servlet.http.HttpServletRequest> |
getRequest() |
protected void |
jmsSetUpDone()
When JMS connection is established, tell clients to flush their
artifact cache to ensure that no stale cached artifacts.
|
protected void |
sendCacheFlush() |
protected void |
sendCacheInvalidate(ArtifactCache.InvalidateOp op,
String key) |
protected void |
sendPingResponse(String key) |
org.springframework.http.ResponseEntity<Artifact> |
updateArtifact(String collectionid,
String artifactid,
Boolean committed)
PUT /collections/{collectionid}/artifacts/{artifactid}:
Updates an artifact's properties
Currently limited to updating an artifact's committed status.
|
getClassName, getConfigWaitTime, getJMSManager, getReadyWaitTime, getRunningLockssDaemon, getWaitTime, receiveMessage, setUpJms, setUpJms, setUpJms, stopJms, waitConfig, waitConfig, waitReady, waitReadyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAcceptHeader@Autowired
public CollectionsApiServiceImpl(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
javax.servlet.http.HttpServletRequest request)
objectMapper - An ObjectMapper for JSON processing.request - An HttpServletRequest with the HTTP request.protected void jmsSetUpDone()
jmsSetUpDone in class BaseSpringApiServiceImplpublic org.springframework.http.ResponseEntity<List<String>> getCollections()
getCollections in interface CollectionsApiDelegateCollectionsApi.getCollections()public org.springframework.http.ResponseEntity<Void> deleteArtifact(String collectionid, String artifactid)
deleteArtifact in interface CollectionsApiDelegatecollectionid - A String with the name of the collection containing the artifact.artifactid - A String with the Identifier of the artifact.ResponseEntity<Void>.CollectionsApi.deleteArtifact(java.lang.String, java.lang.String)public org.springframework.http.ResponseEntity<org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody> getArtifact(String collectionid, String artifactid, String accept)
getArtifact in interface CollectionsApiDelegatecollectionid - A String with the name of the collection containing the artifact.artifactid - A String with the Identifier of the artifact.ResponseEntity<StreamingResponseBody>.CollectionsApi.getArtifact(java.lang.String, java.lang.String, java.lang.String)public org.springframework.http.ResponseEntity<Artifact> updateArtifact(String collectionid, String artifactid, Boolean committed)
updateArtifact in interface CollectionsApiDelegatecollectionid - A String with the name of the collection containing the artifact.artifactid - A String with the Identifier of the artifact.committed - A Boolean with the artifact committed status.ResponseEntity<Artifact>.CollectionsApi.updateArtifact(java.lang.String, java.lang.String, java.lang.Boolean)public org.springframework.http.ResponseEntity<Artifact> createArtifact(String collectionid, String auid, String uri, org.springframework.web.multipart.MultipartFile content, org.springframework.web.multipart.MultipartFile aspectParts)
createArtifact in interface CollectionsApiDelegatecollectionid - A String with the name of the collection containing the artifact.auid - A String with the Archival Unit ID (AUID) of new artifact.uri - A String with the URI represented by this artifact.content - A MultipartFile with the artifact content.aspectParts - A MultipartFile... with the artifact aspects.ResponseEntity<Artifact>.CollectionsApi.createArtifact(java.lang.String, java.lang.String, java.lang.String, org.springframework.web.multipart.MultipartFile, org.springframework.web.multipart.MultipartFile)public org.springframework.http.ResponseEntity<ArtifactPageInfo> getArtifacts(String collectionid, String auid, String url, String urlPrefix, String version, Boolean includeUncommitted, Integer limit, String continuationToken)
getArtifacts in interface CollectionsApiDelegatecollectionid - A String with the name of the collection
containing the artifact.auid - A String with the Archival Unit ID (AUID) of
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.ResponseEntity<ArtifactPageInfo> with the requested
artifacts.CollectionsApi.getArtifacts(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Boolean, java.lang.Integer, java.lang.String)public org.springframework.http.ResponseEntity<Long> getArtifactsSize(String collectionid, String auid, String url, String urlPrefix, String version)
getArtifactsSize in interface CollectionsApiDelegatecollectionid - A String with the name of the collection containing the Archival
Unit.auid - A String with the Archival Unit ID (AUID).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.ResponseEntity<Long>.CollectionsApi.getArtifactsSize(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)public org.springframework.http.ResponseEntity<AuidPageInfo> getAus(String collectionid, Integer limit, String continuationToken)
getAus in interface CollectionsApiDelegatecollectionid - A String with the name of the collection
containing 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.ResponseEntity<AuidPageInfo>.CollectionsApi.getAus(java.lang.String, java.lang.Integer, java.lang.String)public Optional<com.fasterxml.jackson.databind.ObjectMapper> getObjectMapper()
getObjectMapper in interface CollectionsApiDelegatepublic Optional<javax.servlet.http.HttpServletRequest> getRequest()
getRequest in interface CollectionsApiDelegateprotected void sendCacheInvalidate(ArtifactCache.InvalidateOp op, String key)
protected void sendCacheFlush()
protected void sendPingResponse(String key)
Copyright © 2000–2020 LOCKSS Program. All rights reserved.