@Component(value="cuba_TimeTodayQueryMacroHandler") @Scope(value="prototype") public class TimeTodayQueryMacroHandler extends AbstractQueryMacroHandler
Modifier and Type | Class and Description |
---|---|
protected static class |
TimeTodayQueryMacroHandler.ArgDef |
Modifier and Type | Field and Description |
---|---|
protected TimeSource |
timeSource |
protected DateTimeTransformations |
transformations |
expandedParamTypes, macroPattern
Constructor and Description |
---|
TimeTodayQueryMacroHandler() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
doExpand(java.lang.String macro) |
java.util.Map<java.lang.String,java.lang.Object> |
getParams() |
java.lang.String |
replaceQueryParams(java.lang.String queryString,
java.util.Map<java.lang.String,java.lang.Object> params)
Replaces param names in
queryString with its values from the params parameter. |
void |
setQueryParams(java.util.Map<java.lang.String,java.lang.Object> namedParameters)
Sets parameters of the expanded query to the macro handler.
|
expandMacro, getTimeZoneFromArgs, setExpandedParamTypes
@Inject protected DateTimeTransformations transformations
@Inject protected TimeSource timeSource
public void setQueryParams(java.util.Map<java.lang.String,java.lang.Object> namedParameters)
QueryMacroHandler
namedParameters
- all named parameters of the expanded querypublic java.util.Map<java.lang.String,java.lang.Object> getParams()
public java.lang.String replaceQueryParams(java.lang.String queryString, java.util.Map<java.lang.String,java.lang.Object> params)
QueryMacroHandler
queryString
with its values from the params
parameter.
If macro is not found, the source query string is returned.protected java.lang.String doExpand(java.lang.String macro)
doExpand
in class AbstractQueryMacroHandler