@Service public class ArtifactsApiServiceImpl extends org.lockss.spring.base.BaseSpringApiServiceImpl implements ArtifactsApiDelegate, org.lockss.spring.base.LockssConfigurableService
| Modifier and Type | Field and Description |
|---|---|
static org.springframework.http.MediaType |
APPLICATION_HTTP_RESPONSE |
static String |
APPLICATION_HTTP_RESPONSE_VALUE |
static long |
DEFAULT_ARTIFACT_ITERATOR_TIMEOUT |
static int |
DEFAULT_DEFAULT_ARTIFACT_PAGESIZE |
static int |
DEFAULT_MAX_ARTIFACT_PAGESIZE |
static long |
DEFAULT_SMALL_CONTENT_THRESHOLD |
static String |
PARAM_ARTIFACT_ITERATOR_TIMEOUT
Interval after which unused Artifact iterator continuations will
be discarded.
|
static String |
PARAM_DEFAULT_ARTIFACT_PAGESIZE
Default number of Artifacts that will be returned in a single (paged)
response
|
static String |
PARAM_MAX_ARTIFACT_PAGESIZE
Max number of Artifacts that will be returned in a single (paged)
response
|
static String |
PARAM_SMALL_CONTENT_THRESHOLD
Largest Artifact content that will be included in a response to a
getArtifactData call with includeContent == IF_SMALL
|
static String |
PREFIX |
| Constructor and Description |
|---|
ArtifactsApiServiceImpl(javax.servlet.http.HttpServletRequest request) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<org.lockss.util.rest.repo.model.Artifact> |
createArtifact(String properties,
org.springframework.web.multipart.MultipartFile payload,
String httpResponseHeader)
POST /artifacts:
Adds artifacts to the repository
|
org.springframework.http.ResponseEntity<Void> |
deleteArtifact(String artifactid,
String namespace)
DELETE /artifacts/{artifactid}:
Deletes an artifact from this repository.
|
org.springframework.http.ResponseEntity |
getArtifactDataByMultipart(String artifactid,
String namespace,
String includeContent)
GET /artifacts/{artifactid}:
Retrieves an artifact from the repository.
|
org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> |
getArtifactDataByPayload(String artifactId,
String namespace,
String includeContentParam)
GET /artifacts/{artifactid}/payload:
Retrieves an artifact from the repository.
|
org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> |
getArtifactDataByResponse(String artifactId,
String namespace,
String includeContentParam)
GET /artifacts/{artifactid}/response:
Retrieves an artifact from the repository.
|
org.springframework.http.ResponseEntity<org.lockss.util.rest.repo.model.ArtifactPageInfo> |
getArtifactsFromAllAus(String namespace,
String url,
String urlPrefix,
String versions,
Integer limit,
String continuationToken)
GET /artifacts: Returns the committed artifacts of all versions
of a given URL, from a specified namespace.
|
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 |
sendCacheInvalidateArtifact(org.lockss.util.rest.repo.util.ArtifactCache.InvalidateOp op,
String key) |
protected void |
sendPingResponse(String key) |
void |
setConfig(org.lockss.config.Configuration newConfig,
org.lockss.config.Configuration prevConfig,
org.lockss.config.Configuration.Differences changedKeys) |
org.springframework.http.ResponseEntity |
updateArtifact(String artifactid,
Boolean committed,
String namespace)
PUT /artifacts/{artifactid}: Updates an artifact's properties
|
configMgrCreated, getClassName, getConfigWaitTime, getJMSManager, getPluginManager, getReadyWaitTime, getRunningLockssDaemon, getStateManager, getWaitTime, jsonResponse, receiveMessage, registerConfigCallback, setUpJms, setUpJms, setUpJms, stopJms, stringResponse, waitConfig, waitConfig, waitReady, waitReadyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAcceptHeader, getObjectMapper, getRequestpublic static final String APPLICATION_HTTP_RESPONSE_VALUE
public static final org.springframework.http.MediaType APPLICATION_HTTP_RESPONSE
public static final String PREFIX
public static final String PARAM_SMALL_CONTENT_THRESHOLD
public static final long DEFAULT_SMALL_CONTENT_THRESHOLD
public static final String PARAM_DEFAULT_ARTIFACT_PAGESIZE
public static final int DEFAULT_DEFAULT_ARTIFACT_PAGESIZE
public static final String PARAM_MAX_ARTIFACT_PAGESIZE
public static final int DEFAULT_MAX_ARTIFACT_PAGESIZE
public static final String PARAM_ARTIFACT_ITERATOR_TIMEOUT
public static final long DEFAULT_ARTIFACT_ITERATOR_TIMEOUT
@Autowired public ArtifactsApiServiceImpl(javax.servlet.http.HttpServletRequest request)
public void setConfig(org.lockss.config.Configuration newConfig,
org.lockss.config.Configuration prevConfig,
org.lockss.config.Configuration.Differences changedKeys)
setConfig in interface org.lockss.spring.base.LockssConfigurableServicepublic org.springframework.http.ResponseEntity<org.lockss.util.rest.repo.model.Artifact> createArtifact(String properties, org.springframework.web.multipart.MultipartFile payload, String httpResponseHeader)
createArtifact in interface ArtifactsApiDelegateproperties - payload - httpResponseHeader - ResponseEntity<Artifact>.ArtifactsApi.createArtifact(java.lang.String, org.springframework.web.multipart.MultipartFile, java.lang.String)public org.springframework.http.ResponseEntity<Void> deleteArtifact(String artifactid, String namespace)
deleteArtifact in interface ArtifactsApiDelegateartifactid - A String with the Identifier of the artifact.namespace - A String with the namespace of the artifact.ResponseEntity<Void>.ArtifactsApi.deleteArtifact(java.lang.String, java.lang.String)public org.springframework.http.ResponseEntity getArtifactDataByMultipart(String artifactid, String namespace, String includeContent)
getArtifactDataByMultipart in interface ArtifactsApiDelegateartifactid - A String with the Identifier of the artifact.namespace - A String with the namespace of the artifact.includeContent - A Boolean indicating whether the artifact content part should be included in the
multipart response.ResponseEntity containing a MultipartResponse.ArtifactsApi.getArtifactDataByMultipart(java.lang.String, java.lang.String, java.lang.String)public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getArtifactDataByPayload(String artifactId, String namespace, String includeContentParam)
getArtifactDataByPayload in interface ArtifactsApiDelegateartifactId - A String with the Identifier of the artifact.namespace - A String with the namespace of the artifact.includeContentParam - A Boolean indicating whether the artifact content part should be included in the
multipart response.ResponseEntity containing a MultipartResponse.ArtifactsApi.getArtifactDataByPayload(java.lang.String, java.lang.String, java.lang.String)public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getArtifactDataByResponse(String artifactId, String namespace, String includeContentParam)
getArtifactDataByResponse in interface ArtifactsApiDelegateartifactId - A String with the Identifier of the artifact.namespace - A String with the namespace of the artifact.includeContentParam - A Boolean indicating whether the artifact content part should be included in the
multipart response.ResponseEntity containing a MultipartResponse.ArtifactsApi.getArtifactDataByResponse(java.lang.String, java.lang.String, java.lang.String)public org.springframework.http.ResponseEntity<org.lockss.util.rest.repo.model.ArtifactPageInfo> getArtifactsFromAllAus(String namespace, String url, String urlPrefix, String versions, Integer limit, String continuationToken)
getArtifactsFromAllAus in interface ArtifactsApiDelegatenamespace - 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.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.ArtifactsApi.getArtifactsFromAllAus(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Integer, java.lang.String)public org.springframework.http.ResponseEntity updateArtifact(String artifactid, Boolean committed, String namespace)
Currently limited to updating an artifact's committed status.
updateArtifact in interface ArtifactsApiDelegateartifactid - A String with the Identifier of the artifact.committed - A Boolean with the artifact committed status.namespace - A String with the namespace of the artifact.ResponseEntity<Artifact>.ArtifactsApi.updateArtifact(java.lang.String, java.lang.Boolean, java.lang.String)protected void sendCacheInvalidateArtifact(org.lockss.util.rest.repo.util.ArtifactCache.InvalidateOp op,
String key)
protected void jmsSetUpDone()
jmsSetUpDone in class org.lockss.spring.base.BaseSpringApiServiceImplprotected void sendCacheFlush()
protected void sendPingResponse(String key)
Copyright © 2000–2023 LOCKSS Program. All rights reserved.