org.skyscreamer.yoga.selector.parser
Class MapSelectorResolver
java.lang.Object
org.skyscreamer.yoga.selector.parser.MapSelectorResolver
- All Implemented Interfaces:
- AliasSelectorResolver
public class MapSelectorResolver
- extends Object
- implements AliasSelectorResolver
An implementation of AliasSelectorResolver that uses an injected Map to translate the alias. The key of each
map entry is the alias, and the value is the fully-formed selector expression.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MapSelectorResolver
public MapSelectorResolver()
resolveSelector
public String resolveSelector(String aliasSelectorExpression)
throws ParseSelectorException
- Description copied from interface:
AliasSelectorResolver
- The method that translates an alias into a fully-formed selector expression
- Specified by:
resolveSelector in interface AliasSelectorResolver
- Parameters:
aliasSelectorExpression - the alias expression passed in on the URI
- Returns:
- the complete selector expression represented by the alias
- Throws:
ParseSelectorException - thrown if the input alias expression is not valid
setDefinedSelectors
public void setDefinedSelectors(Map<String,String> definedSelectors)
- Injects the map that will be used to resolve selector expressions
- Parameters:
definedSelectors - Your map of aliases
Copyright © 2013. All Rights Reserved.