Class Match


  • public final class Match
    extends java.lang.Object
    Represents a URI to Web Script match This class is immutable.
    Author:
    davidc
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Match.Kind
      Kind of Match
    • Constructor Summary

      Constructors 
      Constructor Description
      Match​(java.lang.String templatePath, java.util.Map<java.lang.String,​java.lang.String> templateVars, java.lang.String matchPath)
      Construct
      Match​(java.lang.String templatePath, java.util.Map<java.lang.String,​java.lang.String> templateVars, java.lang.String matchPath, WebScript script)
      Construct
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Match.Kind getKind()
      Gets the kind of Match
      java.lang.String getPath()
      Gets the static (i.e.
      java.lang.String getTemplate()
      Gets the template request URL that matched the Web Script URL Template
      java.util.Map<java.lang.String,​java.lang.String> getTemplateVars()
      Gets the template variable substitutions
      WebScript getWebScript()
      Gets the matching web script
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Match

        public Match​(java.lang.String templatePath,
                     java.util.Map<java.lang.String,​java.lang.String> templateVars,
                     java.lang.String matchPath,
                     WebScript script)
        Construct
        Parameters:
        templatePath - String
        templateVars - Map
        matchPath - String
        script - WebScript
      • Match

        public Match​(java.lang.String templatePath,
                     java.util.Map<java.lang.String,​java.lang.String> templateVars,
                     java.lang.String matchPath)
        Construct
        Parameters:
        templatePath - String
        templateVars - Map
        matchPath - String
    • Method Detail

      • getKind

        public Match.Kind getKind()
        Gets the kind of Match
      • getTemplate

        public java.lang.String getTemplate()
        Gets the template request URL that matched the Web Script URL Template
        Returns:
        matching url template
      • getTemplateVars

        public java.util.Map<java.lang.String,​java.lang.String> getTemplateVars()
        Gets the template variable substitutions
        Returns:
        template variable values (value indexed by name)
      • getPath

        public java.lang.String getPath()
        Gets the static (i.e. without tokens) part of the request URL that matched the Web Script URL Template
        Returns:
        matching static url path
      • getWebScript

        public WebScript getWebScript()
        Gets the matching web script
        Returns:
        service (or null, if match kind is URI)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object