public abstract class AbstractResourceContainer extends Object implements ResourceContainer
ResourceContainer.getNodeType()
is not yet implemented, but must be done by the concrete implementations. When you have
a resource container that has its complete custom methods for resolving from and to pathInfo of the resource, then, those classes
should implement their own resolveToPathInfo(Node, Node, Mount)
and resolveToResourceNode(Session, String)
Constructor and Description |
---|
AbstractResourceContainer() |
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getMappings()
returns the mapping from nodename to url prefix.
|
String |
getPrimaryItem() |
String |
resolveToPathInfo(javax.jcr.Node resourceContainerNode,
javax.jcr.Node resourceNode,
Mount mount)
Implementations should here do their logic, possibly linkrewriting.
|
javax.jcr.Node |
resolveToResourceNode(javax.jcr.Session session,
String pathInfo)
This is the reverse of
ResourceContainer.resolveToPathInfo(Node, Node, Mount) . |
void |
setMappings(Map<String,String> mappings) |
void |
setPrimaryItem(String primaryItem) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNodeType
public Map<String,String> getMappings()
ResourceContainer
getMappings
in interface ResourceContainer
public void setPrimaryItem(String primaryItem)
public String getPrimaryItem()
getPrimaryItem
in interface ResourceContainer
public String resolveToPathInfo(javax.jcr.Node resourceContainerNode, javax.jcr.Node resourceNode, Mount mount)
ResourceContainer
HstLink
object
is createdresolveToPathInfo
in interface ResourceContainer
resourceContainerNode
- The parent node of the resource noderesourceNode
- The resource node itself containing the binarymount
- the Mount
the link is meant fornull
when not able to create onepublic javax.jcr.Node resolveToResourceNode(javax.jcr.Session session, String pathInfo)
ResourceContainer
ResourceContainer.resolveToPathInfo(Node, Node, Mount)
. If this ResourceContainer can resolve
the pathInfo to a resource node of type ResourceContainer.getNodeType()
, it returns the resourceNode. If it cannot resolve the
pathInfo, null is returned
resolveToResourceNode
in interface ResourceContainer
pathInfo
- : the path from the url after the context and servlet path. It starts with a slashnull
if this resource container does not know how to resolve this pathInfoCopyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.