Interface KeyTypeConverterService
-
- All Superinterfaces:
KeyTypeConverters
- All Known Implementing Classes:
LinkedListKeyTypeConverterService
public interface KeyTypeConverterService extends KeyTypeConverters
A key type converter service.- Author:
- Carl Harris
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
toModelKey(Class<?> keyType, String viewKey, ViewNode node, ViewContext context)
Converts a map key from a view to the corresponding model key value.String
toViewKey(Object modelKey, ViewNode node, ViewContext context)
Converts a map key from the model to a string value.-
Methods inherited from interface org.soulwing.prospecto.api.converter.KeyTypeConverters
append, prepend, remove, toList
-
-
-
-
Method Detail
-
toViewKey
String toViewKey(Object modelKey, ViewNode node, ViewContext context) throws Exception
Converts a map key from the model to a string value.- Parameters:
modelKey
- model keynode
- the subject nodecontext
- view context- Returns:
- key value
- Throws:
Exception
-
toModelKey
Object toModelKey(Class<?> keyType, String viewKey, ViewNode node, ViewContext context) throws Exception
Converts a map key from a view to the corresponding model key value.- Parameters:
keyType
- model key typeviewKey
- string representation of the key from a viewnode
- the subject nodecontext
- view context- Returns:
- key value
- Throws:
Exception
-
-