org.springframework.extensions.surf.uri
Class UriTemplateListIndex

java.lang.Object
  extended by org.springframework.extensions.surf.uri.UriTemplateListIndex

public class UriTemplateListIndex
extends Object

Index of application URI templates. Each template uses a simple form of the JAX-RS JSR-311 URI Template format - only basic variables are specified in the URI template for matching. Example config:

    
       /page/site/{site}/{page}
       /page/site/{site}
       /page/user/{userid}/{page}
       /page/user/{userid}
    
 

Author:
Kevin Roast

Constructor Summary
UriTemplateListIndex(ConfigElement config)
          Constructor
 
Method Summary
 Map<String,String> findMatch(String uri)
          Search the URI index to locale a match for the specified URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UriTemplateListIndex

public UriTemplateListIndex(ConfigElement config)
Constructor

Parameters:
config - ConfigElement pointing to the sections (see above)
Method Detail

findMatch

public Map<String,String> findMatch(String uri)
Search the URI index to locale a match for the specified URI. If found, return the args that represent the matched URI pattern tokens and the values as per the supplied URI value.

Parameters:
uri - URI to match against the URI Templates in the index
Returns:
Map of token args to values or null if no match was found.


Copyright © 2009 SpringSource, Inc. All Rights Reserved.