Class PrefixTemplateUriIndex

  • All Implemented Interfaces:
    UriIndex

    public class PrefixTemplateUriIndex
    extends java.lang.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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Clear the index
      Match findWebScript​(java.lang.String method, java.lang.String uri)
      Gets a Web Script given an HTTP Method and URI
      int getSize()
      Gets size of index (i.e.
      void registerUri​(WebScript script, java.lang.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,
                                java.lang.String uri)
        Description copied from interface: UriIndex
        Register a URI with a Web Script
        Specified by:
        registerUri in interface UriIndex
        Parameters:
        script - WebScript
        uri - String
      • findWebScript

        public Match findWebScript​(java.lang.String method,
                                   java.lang.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)