org.springframework.extensions.webscripts
Class Match

java.lang.Object
  extended by org.springframework.extensions.webscripts.Match

public final class Match
extends Object

Represents a URI to Web Script match This class is immutable.

Author:
davidc

Nested Class Summary
static class Match.Kind
          Kind of Match
 
Constructor Summary
Match(String templatePath, Map<String,String> templateVars, String matchPath)
          Construct
Match(String templatePath, Map<String,String> templateVars, String matchPath, WebScript script)
          Construct
 
Method Summary
 Match.Kind getKind()
          Gets the kind of Match
 String getPath()
          Gets the static (i.e.
 String getTemplate()
          Gets the template request URL that matched the Web Script URL Template
 Map<String,String> getTemplateVars()
          Gets the template variable substitutions
 WebScript getWebScript()
          Gets the matching web script
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Match

public Match(String templatePath,
             Map<String,String> templateVars,
             String matchPath,
             WebScript script)
Construct

Parameters:
templateVars -
script -

Match

public Match(String templatePath,
             Map<String,String> templateVars,
             String matchPath)
Construct

Parameters:
templatePath -
Method Detail

getKind

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


getTemplate

public String getTemplate()
Gets the template request URL that matched the Web Script URL Template

Returns:
matching url template

getTemplateVars

public Map<String,String> getTemplateVars()
Gets the template variable substitutions

Returns:
template variable values (value indexed by name)

getPath

public 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 String toString()
Overrides:
toString in class Object


Copyright © 2009 SpringSource, Inc. All Rights Reserved.