Package com.epimorphics.webapi.dispatch
Class TemplateSet<T>
- java.lang.Object
-
- com.epimorphics.webapi.dispatch.TemplateSet<T>
-
public class TemplateSet<T> extends Object
A MatchSearchermaintains a collection of MatchTemplate s. The collection can be added to and removed from [TBD]. It can be searched for an entry matching a supplied path; if there is one, bindings are updated and an associated value returned. - Author:
- eh
-
-
Constructor Summary
Constructors Constructor Description TemplateSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tlookup(Map<String,String> bindings, String path, javax.ws.rs.core.MultivaluedMap<String,String> queryParams)Search the collection for the most specific entry that matchespath.voidregister(String path, T result)Add the templatepathto the collection, associated with the supplied result value.List<String>templates()voidunregister(String path)Remove the entry with the given template path from the collection.
-
-
-
Method Detail
-
register
public void register(String path, T result)
Add the templatepathto the collection, associated with the supplied result value.
-
unregister
public void unregister(String path)
Remove the entry with the given template path from the collection.
-
lookup
public T lookup(Map<String,String> bindings, String path, javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
Search the collection for the most specific entry that matchespath. If there isn't one, return null. If there is, return the associated value, and update the bindings with the matches variables.
-
-