org.mmbase.util.jumpers
Class UrlStrategy

java.lang.Object
  extended by org.mmbase.util.jumpers.JumperStrategy
      extended by org.mmbase.util.jumpers.UrlStrategy

public class UrlStrategy
extends JumperStrategy

UrlStrategy. This will return the url-field when the type of the object is 'urls'.

Version:
$Id: UrlStrategy.java 35335 2009-05-21 08:14:41Z michiel $
Author:
Marcel Maatkamp, VPRO Digitaal
See Also:
Urls.getDefaultUrl(int)

Constructor Summary
UrlStrategy()
           
 
Method Summary
 String calculate(MMObjectNode node)
          calculates an url for this node.
 boolean contains(MMObjectNode node)
          signals whether this strategy can calculate an url for this node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlStrategy

public UrlStrategy()
Method Detail

contains

public boolean contains(MMObjectNode node)
signals whether this strategy can calculate an url for this node.

Overrides:
contains in class JumperStrategy
Parameters:
node - node for which an url has to be calculated for
Returns:
url for this node

calculate

public String calculate(MMObjectNode node)
calculates an url for this node. call this method only when the contains(node) returns true.

Specified by:
calculate in class JumperStrategy
Parameters:
node - node for which an url has to be calculated for
Returns:
the url for this node
See Also:
JumperStrategy.contains(MMObjectNode)


MMBase 2.0-SNAPSHOT - null