org.mmbase.module.core
Class SmartPathFunction

java.lang.Object
  extended by org.mmbase.module.core.SmartPathFunction

public class SmartPathFunction
extends Object

Returns the path to use for TREEPART, TREEFILE, LEAFPART and LEAFFILE. The system searches in a provided base path for a filename that matches the supplied number/alias of a node (possibly extended with a version number). See the documentation on the TREEPART SCAN command for more info. This class can be overriden to make an even smarter search possible.

Since:
MMBase-1.8.5
Version:
$Id: SmartPathFunction.java 34900 2009-05-01 16:29:42Z michiel $

Field Summary
protected  boolean backwardsCompatible
           
protected  String documentRoot
           
protected  String nodeNumber
           
protected  MMObjectBuilder parent
           
protected  String path
           
protected static Cache<String,String> smartPathCache
           
protected  String version
           
protected  ResourceLoader webRoot
           
 
Constructor Summary
SmartPathFunction(MMObjectBuilder p)
           
 
Method Summary
 boolean getBackwardsCompatible()
           
 ResourceLoader getLoader()
           
protected  String getSmartPath()
          The found path as a String, or null if not found
 void setBackwardsCompatible(boolean b)
           
 void setLoader(ResourceLoader r)
           
 void setNode(Node n)
           
 void setNodeNumber(String nm)
          The number or alias of the node to filter on
 void setPath(String p)
          The subpath of the path to search
 void setRoot(String r)
          Deprecated. Use setLoader(ResourceLoader).
 void setVersion(String v)
          The version number (or null if not applicable) to filter on
 String smartKey()
           
 String smartpath()
          The found path as a String, or null if not found
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

smartPathCache

protected static Cache<String,String> smartPathCache

parent

protected final MMObjectBuilder parent

nodeNumber

protected String nodeNumber

version

protected String version

path

protected String path

documentRoot

protected String documentRoot

backwardsCompatible

protected boolean backwardsCompatible

webRoot

protected ResourceLoader webRoot
Constructor Detail

SmartPathFunction

public SmartPathFunction(MMObjectBuilder p)
Method Detail

setNodeNumber

public void setNodeNumber(String nm)
The number or alias of the node to filter on


setNode

public void setNode(Node n)

setVersion

public void setVersion(String v)
The version number (or null if not applicable) to filter on


setRoot

public void setRoot(String r)
Deprecated. Use setLoader(ResourceLoader).

the root of the path to search.


setLoader

public void setLoader(ResourceLoader r)

getLoader

public ResourceLoader getLoader()

setPath

public void setPath(String p)
The subpath of the path to search


setBackwardsCompatible

public void setBackwardsCompatible(boolean b)

getBackwardsCompatible

public boolean getBackwardsCompatible()

smartKey

public String smartKey()

smartpath

public final String smartpath()
The found path as a String, or null if not found


getSmartPath

protected String getSmartPath()
The found path as a String, or null if not found



MMBase 2.0-SNAPSHOT - null