@Scope(value="request") @Path(value="/{path: .*}/fcr:versions/{labelAndOptionalPathIntoVersion: .*}") public class FedoraVersions extends ContentExposingResource
Modifier and Type | Field and Description |
---|---|
protected FedoraResource |
baseResource |
protected String |
externalPath |
protected String |
label |
protected String |
path |
protected String |
pathIntoVersion |
protected String |
pathListIntoVersion |
protected javax.jcr.Session |
session |
MESSAGE_EXTERNAL_BODY, prefer, request, resource, servletResponse
idTranslator
binaryService, containerService, defaultPidMinter, eventBus, headers, nodeService, pidMinter, sessions, uriInfo, versionService
Constructor and Description |
---|
FedoraVersions()
Default JAX-RS entry point
|
FedoraVersions(String path,
String label,
String pathIntoVersion)
Create a new FedoraNodes instance for a given path
|
Modifier and Type | Method and Description |
---|---|
protected void |
addResourceHttpHeaders(FedoraResource resource)
Add any resource-specific headers to the response
|
protected String |
externalPath() |
javax.ws.rs.core.Response |
getVersion(String rangeValue)
Retrieve a version of an object.
|
javax.ws.rs.core.Response |
removeVersion()
Removes the version specified by the label.
|
protected FedoraResource |
resource() |
javax.ws.rs.core.Response |
revertToVersion()
Reverts the resource at the given path to the version specified by
the label.
|
protected javax.jcr.Session |
session() |
protected String |
unversionedResourcePath() |
addCacheControlHeaders, checkCacheControlHeaders, evaluateRequestPreconditions, getBinaryContent, getContent, getContent, getResourceTriples, getResourceTriples, getSimpleContentType, getTriples, getTriples, getUri, isRdfContentType, patchResourcewithSparql, replaceResourceBinaryWithStream, replaceResourceWithStream
getBaseUrlProperty, getResourceFromPath, setUpJMSInfo, translator
toPath
@Inject protected javax.jcr.Session session
@PathParam(value="path") protected String externalPath
@PathParam(value="labelAndOptionalPathIntoVersion") protected String pathListIntoVersion
protected String pathIntoVersion
protected FedoraResource baseResource
public FedoraVersions()
public FedoraVersions(String path, String label, String pathIntoVersion)
path
- the pathlabel
- the labelpathIntoVersion
- the string value of pathIntoVersionpublic javax.ws.rs.core.Response revertToVersion() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
- if repository exception occurred@DELETE public javax.ws.rs.core.Response removeVersion() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
- if repository exception occurred@GET @Produces(value={"text/turtle;qs=10","application/ld+json;qs=8","text/rdf+n3","text/n3","application/rdf+xml","application/n-triples","application/xml","text/plain","application/x-turtle","text/html","application/xhtml+xml","*/*"}) public javax.ws.rs.core.Response getVersion(@HeaderParam(value="Range") String rangeValue) throws IOException
rangeValue
- the range valueIOException
- if IO exception occurredprotected String unversionedResourcePath()
protected FedoraResource resource()
resource
in class ContentExposingResource
protected void addResourceHttpHeaders(FedoraResource resource)
ContentExposingResource
addResourceHttpHeaders
in class ContentExposingResource
resource
- the resourceprotected String externalPath()
externalPath
in class ContentExposingResource
protected javax.jcr.Session session()
session
in class FedoraBaseResource
Copyright © 2013–2016 DuraSpace, Inc.. All rights reserved.