org.riotfamily.common.web.mapping
Class AttributePattern

java.lang.Object
  extended by org.riotfamily.common.web.mapping.AttributePattern

public class AttributePattern
extends Object


Field Summary
static String EXPOSED_ATTRIBUTES
          Name of the request attribute under which a Map of matched wildcards is exposed.
 
Constructor Summary
AttributePattern(String attributePattern)
           
 
Method Summary
 boolean canFillIn(Map<String,?> required, Map<String,?> optional, int anonymous)
           
 boolean canFillIn(Set<String> required, Set<String> optional, int anonymous)
           
 void expose(String urlPath, HttpServletRequest request)
           
 String fillInAttribute(Object value)
           
 String fillInAttribute(Object value, Map<String,?> defaults)
           
 String fillInAttributes(Map<String,?> attributes, Map<String,?> defaults)
           
 String fillInAttributes(Object[] values)
           
 String fillInAttributes(PropertyAccessor attributes)
           
 String fillInAttributes(PropertyAccessor attributes, Map<String,?> defaults)
           
 List<String> getAttributeNames()
           
 boolean isMoreSpecific(AttributePattern other)
           
 boolean matches(String path)
           
 boolean startsWith(String prefix)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EXPOSED_ATTRIBUTES

public static final String EXPOSED_ATTRIBUTES
Name of the request attribute under which a Map of matched wildcards is exposed.

Constructor Detail

AttributePattern

public AttributePattern(String attributePattern)
Method Detail

getAttributeNames

public List<String> getAttributeNames()

expose

public void expose(String urlPath,
                   HttpServletRequest request)

canFillIn

public boolean canFillIn(Map<String,?> required,
                         Map<String,?> optional,
                         int anonymous)

canFillIn

public boolean canFillIn(Set<String> required,
                         Set<String> optional,
                         int anonymous)

matches

public boolean matches(String path)

startsWith

public boolean startsWith(String prefix)

isMoreSpecific

public boolean isMoreSpecific(AttributePattern other)

fillInAttributes

public String fillInAttributes(PropertyAccessor attributes)

fillInAttributes

public String fillInAttributes(Map<String,?> attributes,
                               Map<String,?> defaults)

fillInAttributes

public String fillInAttributes(PropertyAccessor attributes,
                               Map<String,?> defaults)

fillInAttribute

public String fillInAttribute(Object value)

fillInAttribute

public String fillInAttribute(Object value,
                              Map<String,?> defaults)

fillInAttributes

public String fillInAttributes(Object[] values)

toString

public String toString()
Overrides:
toString in class Object