Package org.lockss.laaws.rs.impl
Class WaybackApiServiceImpl
java.lang.Object
org.lockss.spring.base.BaseSpringApiServiceImpl
org.lockss.laaws.rs.impl.WaybackApiServiceImpl
- All Implemented Interfaces:
WaybackApiDelegate
@Service
public class WaybackApiServiceImpl
extends BaseSpringApiServiceImpl
implements WaybackApiDelegate
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lockss.spring.base.BaseSpringApiServiceImpl
BaseSpringApiServiceImpl.MapMessageListener -
Field Summary
Fields 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<String>getCdxOwb(String namespace, String q, Integer count, Integer startPage, String accept, String acceptEncoding) Provides the OpenWayback CDX records of a URL in a namespace.org.springframework.http.ResponseEntity<String>getCdxPywb(String namespace, String url, Integer limit, String matchType, String sort, String closest, String output, String fl, String accept, String acceptEncoding) Provides the PyWayback CDX records of a URL in a namespace.org.springframework.http.ResponseEntity<org.springframework.core.io.Resource>getWarcArchive(String fileName, String accept, String acceptEncoding, String range) Provides the contents of a WARC archive.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.WaybackApiDelegate
getAcceptHeader, getObjectMapper, getRequest
-
Constructor Details
-
WaybackApiServiceImpl
@Autowired public WaybackApiServiceImpl(jakarta.servlet.http.HttpServletRequest request)
-
-
Method Details
-
getCdxOwb
public org.springframework.http.ResponseEntity<String> getCdxOwb(String namespace, String q, Integer count, Integer startPage, String accept, String acceptEncoding) Provides the OpenWayback CDX records of a URL in a namespace.- Specified by:
getCdxOwbin interfaceWaybackApiDelegate- Parameters:
namespace- A String with the namespace.q- A String with the query string. Supported fields are url, type (urlquery/prefixquery), offset, limit, request.anchordate, startdate and enddate.count- An Integer with the count of results per page to be returned.startPage- An Integer with the page number of results, 1 based.accept- A String with the Accept request header.acceptEncoding- A String with the Accept-Encoding request header.- Returns:
- a
ResponseEntity<String>with the requested OpenWayback CDX records. - See Also:
-
getCdxPywb
public org.springframework.http.ResponseEntity<String> getCdxPywb(String namespace, String url, Integer limit, String matchType, String sort, String closest, String output, String fl, String accept, String acceptEncoding) Provides the PyWayback CDX records of a URL in a namespace.- Specified by:
getCdxPywbin interfaceWaybackApiDelegate- Parameters:
namespace- A String with of the namespace.url- A String with the URL for which the CDX records are requested.limit- An Integer with the limit.matchType- A String with the type of match requested.sort- A String with the type of sort requested.closest- A String with the timestamp for the sort=closest mode.output- A String with the output format requested.fl- A String with the comma-separated list of fields to include in the result.accept- A String with the Accept request header.acceptEncoding- A String with the Accept-Encoding request header.- Returns:
- a
ResponseEntity<String>with the requested PyWayback CDX records. - See Also:
-
getWarcArchive
public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getWarcArchive(String fileName, String accept, String acceptEncoding, String range) Provides the contents of a WARC archive.- Specified by:
getWarcArchivein interfaceWaybackApiDelegate- Parameters:
fileName- A String with the name of the requested WARC archive.accept- A String with the Accept request header.acceptEncoding- A String with the Accept-Encoding request header.range- A String with the Range request header.- Returns:
- a
ResponseEntity<Resource>with the contents of the requested WARC archive. - See Also:
-