public abstract class AbstractResource extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.fcrepo.kernel.services.DatastreamService |
datastreamService
The fcrepo datastream service
|
protected com.google.common.eventbus.EventBus |
eventBus |
protected static org.modeshape.jcr.api.JcrTools |
jcrTools
A convenience object provided by ModeShape for acting against the JCR
repository.
|
protected org.fcrepo.kernel.services.LockService |
lockService
The fcrepo lock service
|
protected org.fcrepo.kernel.services.NodeService |
nodeService
The fcrepo node service
|
protected org.fcrepo.kernel.services.ObjectService |
objectService
The fcrepo object service
|
protected org.fcrepo.kernel.identifiers.PidMinter |
pidMinter
A resource that can mint new Fedora PIDs.
|
protected org.fcrepo.kernel.services.RepositoryService |
repositoryService
The fcrepo repository service
|
protected SessionFactory |
sessions |
protected javax.ws.rs.core.UriInfo |
uriInfo
Useful for constructing URLs
|
protected org.fcrepo.kernel.services.VersionService |
versionService
The fcrepo version service
|
| Constructor and Description |
|---|
AbstractResource() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
addCacheControlHeaders(javax.servlet.http.HttpServletResponse servletResponse,
org.fcrepo.kernel.FedoraResource resource,
javax.jcr.Session session)
Add ETag and Last-Modified cache control headers to the response
|
protected void |
addResponseInformationToStream(org.fcrepo.kernel.FedoraResource resource,
org.fcrepo.kernel.utils.iterators.RdfStream dataset,
javax.ws.rs.core.UriInfo uriInfo,
org.fcrepo.kernel.rdf.IdentifierTranslator subjects) |
protected static void |
checkCacheControlHeaders(javax.ws.rs.core.Request request,
javax.servlet.http.HttpServletResponse servletResponse,
org.fcrepo.kernel.FedoraResource resource,
javax.jcr.Session session)
Evaluate the cache control headers for the request to see if it can be served from
the cache.
|
protected static URI |
checksumURI(String checksum)
Create a checksum URI object.
|
protected static void |
evaluateRequestPreconditions(javax.ws.rs.core.Request request,
javax.servlet.http.HttpServletResponse servletResponse,
org.fcrepo.kernel.FedoraResource resource,
javax.jcr.Session session)
Evaluate request preconditions to ensure the resource is the expected state
|
protected static javax.ws.rs.core.MediaType |
getSimpleContentType(javax.ws.rs.core.MediaType requestContentType) |
protected static boolean |
isRdfContentType(String contentTypeString) |
protected static String |
originalFileName(String contentDisposition)
Parse Content-Disposition header and extract original filename.
|
static String |
toPath(List<javax.ws.rs.core.PathSegment> paths)
Convert a JAX-RS list of PathSegments to a JCR path
|
@Context protected javax.ws.rs.core.UriInfo uriInfo
@Autowired protected SessionFactory sessions
@Autowired protected org.fcrepo.kernel.services.NodeService nodeService
@Autowired protected org.fcrepo.kernel.services.ObjectService objectService
@Autowired protected org.fcrepo.kernel.services.DatastreamService datastreamService
@Autowired protected org.fcrepo.kernel.services.VersionService versionService
@Autowired protected org.fcrepo.kernel.services.RepositoryService repositoryService
@Autowired protected org.fcrepo.kernel.services.LockService lockService
@Autowired(required=false) protected com.google.common.eventbus.EventBus eventBus
@Autowired protected org.fcrepo.kernel.identifiers.PidMinter pidMinter
protected static final org.modeshape.jcr.api.JcrTools jcrTools
public static final String toPath(List<javax.ws.rs.core.PathSegment> paths)
paths - protected static void checkCacheControlHeaders(javax.ws.rs.core.Request request,
javax.servlet.http.HttpServletResponse servletResponse,
org.fcrepo.kernel.FedoraResource resource,
javax.jcr.Session session)
throws javax.jcr.RepositoryException
request - servletResponse - resource - session - javax.jcr.RepositoryExceptionprotected static void addCacheControlHeaders(javax.servlet.http.HttpServletResponse servletResponse,
org.fcrepo.kernel.FedoraResource resource,
javax.jcr.Session session)
throws javax.jcr.RepositoryException
servletResponse - resource - javax.jcr.RepositoryExceptionprotected static void evaluateRequestPreconditions(javax.ws.rs.core.Request request,
javax.servlet.http.HttpServletResponse servletResponse,
org.fcrepo.kernel.FedoraResource resource,
javax.jcr.Session session)
throws javax.jcr.RepositoryException
request - resource - javax.jcr.RepositoryExceptionprotected static javax.ws.rs.core.MediaType getSimpleContentType(javax.ws.rs.core.MediaType requestContentType)
protected static boolean isRdfContentType(String contentTypeString)
protected void addResponseInformationToStream(org.fcrepo.kernel.FedoraResource resource,
org.fcrepo.kernel.utils.iterators.RdfStream dataset,
javax.ws.rs.core.UriInfo uriInfo,
org.fcrepo.kernel.rdf.IdentifierTranslator subjects)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionprotected static String originalFileName(String contentDisposition) throws ParseException
ParseExceptionprotected static URI checksumURI(String checksum) throws URISyntaxException
URISyntaxExceptionCopyright © 2013–2014 DuraSpace, Inc.. All rights reserved.