public class ResolvingTemplate extends Template
Modifier and Type | Field and Description |
---|---|
static String |
CALL_RESOLVER_CONSTRUCTOR
Attribute of the call resolver constructor for an
Application . |
static String |
MAP_RESOLVER_CONSTRUCTOR
Attribute of the map resolver constructor for an
Application . |
MODE_EQUALS, MODE_STARTS_WITH
Constructor and Description |
---|
ResolvingTemplate(String pattern)
Constructor.
|
ResolvingTemplate(String pattern,
int matchingMode)
Constructor.
|
ResolvingTemplate(String pattern,
int matchingMode,
int defaultType,
String defaultDefaultValue,
boolean defaultRequired,
boolean defaultFixed)
Constructor.
|
ResolvingTemplate(String pattern,
int matchingMode,
int defaultType,
String defaultDefaultValue,
boolean defaultRequired,
boolean defaultFixed,
boolean encodingVariables)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
format(Map<String,?> values) |
String |
format(Request request,
Response response) |
static Constructor<Resolver<?>> |
getCallResolverConstructor()
The constructor for the call resolver for the current application.
|
static Constructor<Resolver<?>> |
getCallResolverConstructor(Application application)
The constructor for the call resolver.
|
static Constructor<Resolver<?>> |
getMapResolverConstructor()
The constructor for the map resolver for the current application.
|
static Constructor<Resolver<?>> |
getMapResolverConstructor(Application application)
The constructor for the map resolver.
|
static void |
setCallResolverClass(Application application,
Class<Resolver<?>> theClass)
Configures the call resolver class.
|
void |
setCallResolverClass(Class<Resolver<?>> theClass)
Instances of this class will be created to resolve calls.
|
static void |
setMapResolverClass(Application application,
Class<Resolver<?>> theClass)
Configures the map resolver class.
|
void |
setMapResolverClass(Class<Resolver<?>> theClass)
Instances of this class will be created to resolve maps.
|
format, getDefaultVariable, getLogger, getMatchingMode, getPattern, getVariableNames, getVariables, isEncodingVariables, match, parse, parse, parse, setDefaultVariable, setEncodingVariables, setLogger, setMatchingMode, setPattern, setVariables
public static final String MAP_RESOLVER_CONSTRUCTOR
Application
.getMapResolverConstructor()
public static final String CALL_RESOLVER_CONSTRUCTOR
Application
.getCallResolverConstructor()
public ResolvingTemplate(String pattern, int matchingMode, int defaultType, String defaultDefaultValue, boolean defaultRequired, boolean defaultFixed, boolean encodingVariables)
pattern
- The pattern to use for formatting or parsingmatchingMode
- The matching mode to use when parsing a formatted referencedefaultType
- The default type of variables with no descriptordefaultDefaultValue
- The default value for null variables with no descriptordefaultRequired
- The default required flag for variables with no descriptordefaultFixed
- The default fixed value for variables with no descriptorencodingVariables
- True if the variables must be encoded when formatting the templatepublic ResolvingTemplate(String pattern, int matchingMode, int defaultType, String defaultDefaultValue, boolean defaultRequired, boolean defaultFixed)
pattern
- The pattern to use for formatting or parsingmatchingMode
- The matching mode to use when parsing a formatted referencedefaultType
- The default type of variables with no descriptordefaultDefaultValue
- The default value for null variables with no descriptordefaultRequired
- The default required flag for variables with no descriptordefaultFixed
- The default fixed value for variables with no descriptorpublic ResolvingTemplate(String pattern, int matchingMode)
pattern
- The pattern to use for formatting or parsingmatchingMode
- The matching mode to use when parsing a formatted referencepublic ResolvingTemplate(String pattern)
pattern
- The pattern to use for formatting or parsingpublic static Constructor<Resolver<?>> getMapResolverConstructor()
The constructor accepts a Map
argument.
public static Constructor<Resolver<?>> getMapResolverConstructor(Application application)
The constructor accepts a Map
argument.
application
- The applicationpublic static void setMapResolverClass(Application application, Class<Resolver<?>> theClass) throws NoSuchMethodException, SecurityException
The class must have a constructor that accepts a Map
argument.
application
- The applicationtheClass
- The map resolver classNoSuchMethodException
- In case the appropriate constructor does not existSecurityException
- In case we do not have access rights to the constructorpublic static Constructor<Resolver<?>> getCallResolverConstructor()
public static Constructor<Resolver<?>> getCallResolverConstructor(Application application)
application
- The applicationpublic static void setCallResolverClass(Application application, Class<Resolver<?>> theClass) throws NoSuchMethodException, SecurityException
The class must have a constructor that accepts Request
and
Response
arguments.
application
- The applicationtheClass
- The call resolver classNoSuchMethodException
- In case the appropriate constructor does not existSecurityException
- In case we do not have access rights to the constructorpublic void setMapResolverClass(Class<Resolver<?>> theClass) throws NoSuchMethodException, SecurityException
The class must have have a constructor that accepts a Map
argument.
theClass
- The resolver class or nullNoSuchMethodException
- In case the appropriate constructor does not existSecurityException
- In case we do not have access rights to the constructorpublic void setCallResolverClass(Class<Resolver<?>> theClass) throws NoSuchMethodException, SecurityException
The class must have have a constructor that accepts a Request
and
a Response
as arguments.
theClass
- The class or nullNoSuchMethodException
- In case the appropriate constructor does not existSecurityException
- In case we do not have access rights to the constructorCopyright © 2009-2016 Three Crickets LLC.