org.springframework.extensions.webscripts
Class PrefixTemplateUriIndex

java.lang.Object
  extended by org.springframework.extensions.webscripts.PrefixTemplateUriIndex
All Implemented Interfaces:
UriIndex

public class PrefixTemplateUriIndex
extends Object
implements UriIndex

Uri index supporting simple URI templates where matching is performed on static prefix of the URI. e.g. /a/{b} is matched on /a Note: this index was used until Alfresco v3.0

Author:
davidc

Constructor Summary
PrefixTemplateUriIndex()
           
 
Method Summary
 void clear()
          Clear the index
 Match findWebScript(String method, String uri)
          Gets a Web Script given an HTTP Method and URI
 int getSize()
          Gets size of index (i.e.
 void registerUri(WebScript script, String uri)
          Register a URI with a Web Script
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrefixTemplateUriIndex

public PrefixTemplateUriIndex()
Method Detail

clear

public void clear()
Description copied from interface: UriIndex
Clear the index

Specified by:
clear in interface UriIndex

getSize

public int getSize()
Description copied from interface: UriIndex
Gets size of index (i.e. number of Uris indexed)

Specified by:
getSize in interface UriIndex
Returns:
index size

registerUri

public void registerUri(WebScript script,
                        String uri)
Description copied from interface: UriIndex
Register a URI with a Web Script

Specified by:
registerUri in interface UriIndex

findWebScript

public Match findWebScript(String method,
                           String uri)
Description copied from interface: UriIndex
Gets a Web Script given an HTTP Method and URI

Specified by:
findWebScript in interface UriIndex
Parameters:
method - http method
uri - uri
Returns:
script match (pair of script and uri that matched)


Copyright © 2009 SpringSource, Inc. All Rights Reserved.