org.hippoecm.hst.core.linking.resolvers
Class HippoResourceLocationResolver

java.lang.Object
  extended by org.hippoecm.hst.core.linking.resolvers.HippoResourceLocationResolver
All Implemented Interfaces:
LocationResolver, ResourceLocationResolver

public class HippoResourceLocationResolver
extends Object
implements ResourceLocationResolver


Constructor Summary
HippoResourceLocationResolver()
           
 
Method Summary
 String getBinariesPrefix()
           
 String getNodeType()
           
 List<ResourceContainer> getResourceContainers()
          for example known containers of resources are nodetypes 'hippogallery:exampleAssetSet' and 'hippogallery:exampleImageSet'
 boolean isBinaryLocation(String path)
           
 HstLink resolve(javax.jcr.Node node, Mount mount)
          Implementations should here do their logic, possibly linkrewriting.
 void setBinariesPrefix(String binariesPrefix)
           
 void setBinaryLocations(String[] binaryLocations)
           
 void setLocationMapTree(LocationMapTree locationMapTree)
          this setter will always be called when a LocationResolver implementation class is created.
 void setResourceContainers(List<ResourceContainer> resourceContainers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HippoResourceLocationResolver

public HippoResourceLocationResolver()
Method Detail

setLocationMapTree

public void setLocationMapTree(LocationMapTree locationMapTree)
Description copied from interface: LocationResolver
this setter will always be called when a LocationResolver implementation class is created. The locationMapTree can be used for linkrewriting: it is some sort of inversed HstSiteMapItem's object: the relativecontentpath items of the HstSiteMap tree are the 'tree' in the locationMapTree. Of course, your LocationResolver might not need the locationMapTree at all. Then, just keep this method empty

Specified by:
setLocationMapTree in interface LocationResolver

setBinariesPrefix

public void setBinariesPrefix(String binariesPrefix)

setBinaryLocations

public void setBinaryLocations(String[] binaryLocations)

setResourceContainers

public void setResourceContainers(List<ResourceContainer> resourceContainers)

getResourceContainers

public List<ResourceContainer> getResourceContainers()
Description copied from interface: ResourceLocationResolver
for example known containers of resources are nodetypes 'hippogallery:exampleAssetSet' and 'hippogallery:exampleImageSet'

Specified by:
getResourceContainers in interface ResourceLocationResolver
Returns:
the list of configured containers of this resource.

getNodeType

public String getNodeType()
Specified by:
getNodeType in interface LocationResolver
Returns:
the node type this resolver works on

resolve

public HstLink resolve(javax.jcr.Node node,
                       Mount mount)
Description copied from interface: LocationResolver
Implementations should here do their logic, possibly linkrewriting. With the resolved path from this method, a HstLink object is created

Specified by:
resolve in interface LocationResolver
mount - the Mount where the HstLink should be created for
Returns:
the resolved HstLink for the node, or null when not able to create one

isBinaryLocation

public boolean isBinaryLocation(String path)

getBinariesPrefix

public String getBinariesPrefix()


Copyright © 2008-2012 Hippo. All Rights Reserved.