public class JcrResourceOrigin extends AbstractResourceOrigin<JcrResource>
ResourceOrigin
which loads resources from JCR.ResourceOrigin.ResourceNotFoundException
Modifier and Type | Field and Description |
---|---|
static String |
BINARY_NODE_NAME |
static String |
BYPASS_PROPERTY |
static String |
RESOURCES_WORKSPACE |
static String |
TEXT_PROPERTY |
Modifier and Type | Method and Description |
---|---|
protected InputStream |
doOpenStream(JcrResource resource) |
JcrResource |
getByPath(String path)
Retrieves a
Resource object based on the given path. |
protected Charset |
getCharsetFor(JcrResource resource)
|
protected Optional<javax.jcr.Session> |
getJcrSession() |
protected long |
getLastModified(JcrResource resource) |
protected String |
getName(JcrResource resource) |
protected JcrResource |
getParent(JcrResource resource) |
protected String |
getPath(JcrResource resource) |
JcrResource |
getRoot()
Returns the
Resource for this origin's declared root. |
protected InputStream |
getStream(javax.jcr.Node resourceNode) |
boolean |
hasPath(String path) |
protected void |
initializeResourceChangeMonitoring()
Start monitoring underlying resource changes.
|
protected boolean |
isBinaryResource(javax.jcr.Node resourceNode) |
protected boolean |
isBypassed(javax.jcr.Node node) |
protected boolean |
isDirectory(JcrResource resource) |
protected boolean |
isDirectory(javax.jcr.Node node) |
protected boolean |
isEditable(JcrResource resource) |
protected boolean |
isFile(JcrResource resource) |
protected boolean |
isFile(javax.jcr.Node node) |
protected boolean |
isTextResource(javax.jcr.Node resourceNode) |
protected List<JcrResource> |
listChildren(JcrResource resource) |
protected JcrResource |
newResource(javax.jcr.Node node) |
protected Reader |
openReader(JcrResource resource) |
dispatchResourceChange, getName, openStream, registerResourceChangeHandler, traverseWith, watchForChanges
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
find, find
public static final String RESOURCES_WORKSPACE
public static final String BINARY_NODE_NAME
public static final String TEXT_PROPERTY
public static final String BYPASS_PROPERTY
protected void initializeResourceChangeMonitoring()
AbstractResourceOrigin
initializeResourceChangeMonitoring
in class AbstractResourceOrigin<JcrResource>
public JcrResource getRoot()
ResourceOrigin
Resource
for this origin's declared root.public JcrResource getByPath(String path)
ResourceOrigin
Resource
object based on the given path. The given path may or may not start with a
leading /, but will always be considered relative to whatever root path this origin uses; for the user of this
class, such paths should thus be considered absolute, depending on the implementation, they may be relative
to some other path. Directory traversal navigation should be prohibited by implementations for security reasons.public boolean hasPath(String path)
protected boolean isFile(JcrResource resource)
isFile
in class AbstractResourceOrigin<JcrResource>
Resource.isFile()
protected boolean isDirectory(JcrResource resource)
isDirectory
in class AbstractResourceOrigin<JcrResource>
Resource.isDirectory()
protected boolean isEditable(JcrResource resource)
isEditable
in class AbstractResourceOrigin<JcrResource>
Resource.isEditable()
protected String getPath(JcrResource resource)
getPath
in class AbstractResourceOrigin<JcrResource>
Resource.getPath()
protected String getName(JcrResource resource)
getName
in class AbstractResourceOrigin<JcrResource>
Resource.getName()
protected long getLastModified(JcrResource resource)
getLastModified
in class AbstractResourceOrigin<JcrResource>
Resource.getLastModified()
protected List<JcrResource> listChildren(JcrResource resource)
listChildren
in class AbstractResourceOrigin<JcrResource>
Resource.listChildren()
protected JcrResource getParent(JcrResource resource)
getParent
in class AbstractResourceOrigin<JcrResource>
Resource.getParent()
protected Reader openReader(JcrResource resource) throws IOException
openReader
in class AbstractResourceOrigin<JcrResource>
IOException
Resource.openReader()
protected InputStream doOpenStream(JcrResource resource)
doOpenStream
in class AbstractResourceOrigin<JcrResource>
protected Charset getCharsetFor(JcrResource resource)
AbstractResourceOrigin
getCharsetFor
in class AbstractResourceOrigin<JcrResource>
protected JcrResource newResource(javax.jcr.Node node)
protected Optional<javax.jcr.Session> getJcrSession()
protected InputStream getStream(javax.jcr.Node resourceNode)
protected boolean isTextResource(javax.jcr.Node resourceNode)
protected boolean isBinaryResource(javax.jcr.Node resourceNode)
protected boolean isFile(javax.jcr.Node node)
protected boolean isDirectory(javax.jcr.Node node)
protected boolean isBypassed(javax.jcr.Node node)
Copyright © 2003–2020 Magnolia International Ltd.. All rights reserved.