Package org.hippoecm.hst.core.linking
Interface ResourceContainer
public interface ResourceContainer
Implementations that know how to rewrite a link for a nodetype containing resources,
like hippogallery:exampleImageSet or hippogallery:exampleAssetSet
-
Method Summary
Modifier and TypeMethodDescriptionreturns the mapping from nodename to url prefix.resolveToPathInfo
(Node resourceContainerNode, Node resourceNode, Mount mount) Implementations should here do their logic, possibly linkrewriting.resolveToResourceNode
(Session session, String pathInfo) This is the reverse ofresolveToPathInfo(Node, Node, Mount)
.
-
Method Details
-
resolveToPathInfo
Implementations should here do their logic, possibly linkrewriting. With the resolved path from this method, aHstLink
object is created- Parameters:
resourceContainerNode
- The parent node of the resource noderesourceNode
- The resource node itself containing the binarymount
- theMount
the link is meant for- Returns:
- the resolved pathInfo for the node, or
null
when not able to create one
-
resolveToResourceNode
This is the reverse ofresolveToPathInfo(Node, Node, Mount)
. If this ResourceContainer can resolve the pathInfo to a resource node of typegetNodeType()
, it returns the resourceNode. If it cannot resolve the pathInfo,null is returned
- Parameters:
session
-pathInfo
- : the path from the url after the context and servlet path. It starts with a slash- Returns:
- the resourceNode or
null
if this resource container does not know how to resolve this pathInfo
-
getNodeType
String getNodeType()- Returns:
- the node type this resource container works on
-
getPrimaryItem
String getPrimaryItem()- Returns:
- the primary item for this resource container
-
getMappings
returns the mapping from nodename to url prefix. For example, hippogallery:thumbnail <--> thumbnail- Returns:
- the mapping from nodename to url prefix
-