Interface VarExploder
-
- All Known Implementing Classes:
DefaultVarExploder
public interface VarExploderA
VarExploderis invoked when an explode modifier "*" is encountered within a variable name within a URI expression expression and the replacement value is a complex type, such a some type of POJO or other data type. For most use cases, theDefaultVarExploderwill be sufficient. Please refer to theDefaultVarExploderJavaDoc for more details on how it works.Should the
DefaultVarExplodernot be suitable for your needs, customVarExploderimplementations can be added by rolling your own implementation. A customVarExploderimplementation can be registered in one of two ways. By wrapping your object in yourVarExploder:UriTemplate.fromTemplate("/mapper{?address*}").set("address", new MyCustomVarExploder(address)).expand();Note:
VarExploderimplementations are ONLY invoked when the explode modifier "*" is declared in the URI Template expression. If the variable declaration does not specify the explode modifier, aVariableExpansionExceptionwill be raised.Please see the unit test on example usage of a custom
VarExploder.- Since:
- 1.0
- Version:
- $Revision: 1.1 $
- Author:
- Ryan J. McDonough
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,Object>getNameValuePairs()Returns the properties of the source object aMapof name/value pairs.Collection<Object>getValues()Returns the properties of the source object aCollectionof object values.
-
-
-
Method Detail
-
getNameValuePairs
Map<String,Object> getNameValuePairs() throws VariableExpansionException
Returns the properties of the source object aMapof name/value pairs.- Returns:
- the object properties as name/value pairs.
- Throws:
VariableExpansionException
-
getValues
Collection<Object> getValues() throws VariableExpansionException
Returns the properties of the source object aCollectionof object values.- Returns:
- Throws:
VariableExpansionException
-
-