Class Match
- java.lang.Object
-
- org.springframework.extensions.webscripts.Match
-
public final class Match extends java.lang.ObjectRepresents a URI to Web Script match This class is immutable.- Author:
- davidc
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMatch.KindKind 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)ConstructMatch(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.KindgetKind()Gets the kind of Matchjava.lang.StringgetPath()Gets the static (i.e.java.lang.StringgetTemplate()Gets the template request URL that matched the Web Script URL Templatejava.util.Map<java.lang.String,java.lang.String>getTemplateVars()Gets the template variable substitutionsWebScriptgetWebScript()Gets the matching web scriptjava.lang.StringtoString()
-
-
-
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- StringtemplateVars- MapmatchPath- Stringscript- 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- StringtemplateVars- MapmatchPath- 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:
toStringin classjava.lang.Object
-
-