public abstract class AbstractFunction extends java.lang.Object implements Function
ABSOLUTE, EXPRESSION_EDITOR_OPTIONS, GROUP_COLOR_PROCESSING, GROUP_CONTEXT_RELATED, GROUP_DATA_BLOCK_PROCESSING, GROUP_DATA_TABLE_PROCESSING, GROUP_DATE_TIME_PROCESSING, GROUP_MATH, GROUP_NUMBER_PROCESSING, GROUP_OTHER, GROUP_STRING_PROCESSING, GROUP_SYSTEM, GROUP_TYPE_CONVERSION, HAS_RESOLVER| Constructor and Description |
|---|
AbstractFunction(java.lang.String name,
java.lang.String category,
java.lang.String parametersFootprint,
java.lang.String returnValue,
java.lang.String description) |
| Modifier and Type | Method and Description |
|---|---|
protected FieldFormat |
checkAndGetNumericTypeField(DataTable table,
java.lang.Object fieldParam) |
protected void |
checkNumericTypeField(FieldFormat ff) |
protected void |
checkParameters(int minimalCount,
boolean allowNulls,
java.lang.Object... parameters) |
protected void |
checkParameterType(int num,
java.lang.Object value,
java.lang.Class requiredType) |
AttributedObject |
executeAttributed(Evaluator evaluator,
EvaluationEnvironment environment,
AttributedObject... parameters) |
protected void |
executeTasks(java.util.List<java.util.concurrent.Callable<java.lang.Void>> tasks,
java.util.concurrent.ExecutorService executorService,
boolean executeConcurrent) |
java.lang.String |
getCategory() |
java.lang.String |
getDescription() |
java.lang.String |
getName() |
java.lang.String |
getParametersFootprint() |
java.lang.String |
getReturnValue() |
protected Pair<Context,CallerController> |
resolveContext(java.lang.String contextPath,
Evaluator evaluator)
Tries to find the instance of context denoted by given path.
|
protected Pair<Context,CallerController> |
resolveContext(java.lang.String contextPath,
java.lang.String schema,
Evaluator evaluator) |
public AbstractFunction(java.lang.String name,
java.lang.String category,
java.lang.String parametersFootprint,
java.lang.String returnValue,
java.lang.String description)
public java.lang.String getCategory()
getCategory in interface Functionpublic java.lang.String getReturnValue()
getReturnValue in interface Functionpublic java.lang.String getParametersFootprint()
getParametersFootprint in interface Functionpublic java.lang.String getDescription()
getDescription in interface Functionprotected void checkParameters(int minimalCount,
boolean allowNulls,
java.lang.Object... parameters)
throws EvaluationException
EvaluationExceptionprotected void checkParameterType(int num,
java.lang.Object value,
java.lang.Class requiredType)
throws EvaluationException
EvaluationExceptionprotected FieldFormat checkAndGetNumericTypeField(@Nonnull DataTable table, @Nonnull java.lang.Object fieldParam) throws EvaluationException
EvaluationExceptionprotected void checkNumericTypeField(@Nonnull
FieldFormat ff)
throws EvaluationException
EvaluationExceptionpublic AttributedObject executeAttributed(Evaluator evaluator, EvaluationEnvironment environment, AttributedObject... parameters) throws EvaluationException
executeAttributed in interface FunctionEvaluationExceptionprotected void executeTasks(java.util.List<java.util.concurrent.Callable<java.lang.Void>> tasks,
java.util.concurrent.ExecutorService executorService,
boolean executeConcurrent)
throws EvaluationException
EvaluationExceptionprotected Pair<Context,CallerController> resolveContext(java.lang.String contextPath, Evaluator evaluator) throws EvaluationException
evaluator's resolvers and "asks" each of them about the context. This allows to correctly resolve
specific contexts without explicit schema, e.g. refer to a dashboard component without form: prefix.contextPath - path of context to resolveevaluator - current evaluator with resolversEvaluationException - if no context with given path found among resolversprotected Pair<Context,CallerController> resolveContext(java.lang.String contextPath, java.lang.String schema, Evaluator evaluator) throws EvaluationException
EvaluationException