@Scope(value="request") @Path(value="/{path: .*}/fcr:versions") public class FedoraVersioning extends ContentExposingResource
Modifier and Type | Field and Description |
---|---|
protected String |
externalPath |
static String |
MEMENTO_DATETIME_HEADER |
protected javax.ws.rs.core.Request |
request |
protected javax.servlet.http.HttpServletResponse |
servletResponse |
protected javax.ws.rs.core.UriInfo |
uriInfo |
ACCEPT_DATETIME, context, extContentHandlerFactory, lockManager, namespaceRegistry, prefer, RFC3230_SPLITTER
idTranslator, securityContext, session
binaryService, containerService, defaultPidMinter, headers, nodeService, pidMinter, timeMapService, versionService
Constructor and Description |
---|
FedoraVersioning()
Default JAX-RS entry point
|
FedoraVersioning(String externalPath)
Create a new FedoraNodes instance for a given path
|
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
addVersion(String datetimeHeader,
javax.ws.rs.core.MediaType requestContentType,
String digest,
InputStream requestBodyStream,
List<String> rawLinks)
Create a new version of a resource.
|
protected String |
externalPath() |
javax.ws.rs.core.Response |
getVersionList(String rangeValue,
String acceptValue)
Get the list of versions for the object
|
javax.ws.rs.core.Response |
options()
Outputs information about the supported HTTP methods, etc.
|
addCacheControlHeaders, addExternalContentHeaders, addLinkAndOptionsHttpHeaders, addResourceHttpHeaders, buildLink, checkCacheControlHeaders, checkForInsufficientStorageException, checksumURI, createUpdateResponse, evaluateRequestPreconditions, getBinaryResourceMediaType, getChildrenLimit, getContent, getResourceTriples, getSimpleContentType, getUri, hasRestrictedPath, isRdfContentType, parseDigestHeader, patchResourcewithSparql, postConstruct, replaceResourceBinaryWithStream, replaceResourceWithStream, resource, setVaryAndPreferenceAppliedHeaders, unpackLinks
asNode, getResourceFromPath, getUserPrincipal, setUpJMSInfo, translator
toPath
public static final String MEMENTO_DATETIME_HEADER
@Context protected javax.ws.rs.core.Request request
@Context protected javax.servlet.http.HttpServletResponse servletResponse
@Context protected javax.ws.rs.core.UriInfo uriInfo
@PathParam(value="path") protected String externalPath
public FedoraVersioning()
public FedoraVersioning(String externalPath)
externalPath
- the external path@POST public javax.ws.rs.core.Response addVersion(@HeaderParam(value="Memento-Datetime") String datetimeHeader, @HeaderParam(value="Content-Type") javax.ws.rs.core.MediaType requestContentType, @HeaderParam(value="Digest") String digest, InputStream requestBodyStream, @HeaderParam(value="Link") List<String> rawLinks) throws InvalidChecksumException, MementoDatetimeFormatException
datetimeHeader
- memento-datetime headerrequestContentType
- Content-Type of the request bodydigest
- digests of the request bodyrequestBodyStream
- request body streamInvalidChecksumException
- thrown if one of the provided digests does not match the contentMementoDatetimeFormatException
- if the header value of memento-datetime is not RFC-1123 format@GET @Produces(value={"text/turtle;charset=utf-8;qs=1.0","application/ld+json;qs=0.8","text/rdf+n3;charset=utf-8","text/n3;charset=utf-8","application/rdf+xml","application/n-triples","text/plain;charset=utf-8","application/x-turtle","text/html;charset=utf-8","application/link-format"}) public javax.ws.rs.core.Response getVersionList(@HeaderParam(value="Range") String rangeValue, @HeaderParam(value="Accept") String acceptValue) throws IOException
rangeValue
- starting and ending byte offsetsacceptValue
- the rdf media-typeIOException
- in case of error extracting content@OPTIONS public javax.ws.rs.core.Response options()
protected String externalPath()
externalPath
in class ContentExposingResource
Copyright © 2013–2019 DuraSpace, Inc.. All rights reserved.