com.tibbo.aggregate.common.expression.function

## Class AbstractFunction

- java.lang.Object
- - com.tibbo.aggregate.common.expression.function.AbstractFunction

- All Implemented Interfaces:
    Function
  Direct Known Subclasses:
    AbstractSingleValueCollectorFunction, AddColumnsFunction, AddRecordsFunction, AdjustRecordLimitsFunction, AggregateFunction, AndFunction, AvailableFunction, ByteAtFunction, BytesFunction, CallFunctionFunction, CaseFunction, CatchFunction, CellFunction, CharAtFunction, ClearFunction, ColorFunction, ConvertFunction, CopyBytesFunction, CopyFunction, DataBlockFunction, DateAddFunction, DateCreateFunction, DateDiffFunction, DateFunction, DcFunction, DecodeFunction, DescribeFunction, DescriptionFunction, DistinctFunction, DrFunction, DtFunction, EncodeFunction, EntityAvailableFunction, EntityFormatFunction, EntityGroupFunction, EqFunction, EvaluateFunction, ExpressionEditorOptionsFunction, FailFunction, FetchDataBlockFunction, FilterFunction, FireEventFunction, FloatConstantFunction, FormatDateFunction, FormatFunction, FormatNumberFunction, FrequencyFunction, FullDescriptionFunction, GeFunction, GetFormatFunction, GetQualityFunction, GetTimestampFunction, GetVariableFunction, GroupsFunction, GtFunction, HasFieldFunction, IfFunction, IntegerFunction, IntersectFunction, JavaConstructorFunction, JavaMethodFunction, JoinFunction, LdFunction, LeFunction, LinearRegressionFunction, LoginFunction, LongFunction, LtFunction, NeFunction, OrFunction, ParseDateFunction, PrintFunction, PrintPeriodFunction, ProcessBindingsFunction, RecordsFunction, RemoveColumnsFunction, RemoveRecordsFunction, RgbFunction, SelectFunction, SetFunction, SetMultipleFunction, SetNestedFieldFunction, SetQualityFunction, SetTimestampFunction, SetVariableFieldFunction, SetVariableFunction, SetVariableRecordFunction, SimpleMovingAverageFunction, SimpleMovingMedianFunction, SleepFunction, SortFunction, SplitFunction, StFunction, StringFunction, SubtableFunction, TableFromCSVFunction, TableFromJSONFunction, TableFunction, TableToJSONFunction, TimeFunction, TraceFunction, TypeConversionFunction, UnionFunction, UrlDecodeFunction, UrlEncodeFunction, UserFunction, ValidateFunction, WriteLogFunction, XPathFunction

      public abstract class AbstractFunction
      extends java.lang.Object
      implements Function

- - ### Field Summary

    - ### Fields inherited from interface com.tibbo.aggregate.common.expression.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 Summary

    Constructors
    Constructor and Description
    `AbstractFunction(java.lang.String name, java.lang.String category, java.lang.String parametersFootprint, java.lang.String returnValue, java.lang.String description)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.tibbo.aggregate.common.expression.Function

      `execute`

- - ### Constructor Detail

    - #### AbstractFunction

          public AbstractFunction(java.lang.String name,
                                  java.lang.String category,
                                  java.lang.String parametersFootprint,
                                  java.lang.String returnValue,
                                  java.lang.String description)

  - ### Method Detail

    - #### getName

          public java.lang.String getName()

      Specified by:
        `getName` in interface `Function`

    - #### getCategory

          public java.lang.String getCategory()

      Specified by:
        `getCategory` in interface `Function`

    - #### getReturnValue

          public java.lang.String getReturnValue()

      Specified by:
        `getReturnValue` in interface `Function`

    - #### getParametersFootprint

          public java.lang.String getParametersFootprint()

      Specified by:
        `getParametersFootprint` in interface `Function`

    - #### getDescription

          public java.lang.String getDescription()

      Specified by:
        `getDescription` in interface `Function`

    - #### checkParameters

          protected void checkParameters(int minimalCount,
                                         boolean allowNulls,
                                         java.lang.Object... parameters)
                                  throws EvaluationException

      Throws:
        `EvaluationException`

    - #### checkParameterType

          protected void checkParameterType(int num,
                                            java.lang.Object value,
                                            java.lang.Class requiredType)
                                     throws EvaluationException

      Throws:
        `EvaluationException`

    - #### checkAndGetNumericTypeField

          protected FieldFormat checkAndGetNumericTypeField(@Nonnull
                                                            DataTable table,
                                                            @Nonnull
                                                            java.lang.Object fieldParam)
                                                     throws EvaluationException

      Throws:
        `EvaluationException`

    - #### checkNumericTypeField

          protected void checkNumericTypeField(@Nonnull
                                               FieldFormat ff)
                                        throws EvaluationException

      Throws:
        `EvaluationException`

    - #### executeAttributed

          public AttributedObject executeAttributed(Evaluator evaluator,
                                                    EvaluationEnvironment environment,
                                                    AttributedObject... parameters)
                                             throws EvaluationException

      Specified by:
        `executeAttributed` in interface `Function`
      Throws:
        `EvaluationException`

    - #### executeTasks

          protected void executeTasks(java.util.List<java.util.concurrent.Callable<java.lang.Void>> tasks,
                                      java.util.concurrent.ExecutorService executorService,
                                      boolean executeConcurrent)
                               throws EvaluationException

      Throws:
        `EvaluationException`

    - #### resolveContext

          protected Pair<Context,CallerController> resolveContext(java.lang.String contextPath,
                                                                  Evaluator evaluator)
                                                           throws EvaluationException

      Tries to find the instance of context denoted by given path. For this, iterates over `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.
      Parameters:
        `contextPath` - path of context to resolve
        `evaluator` - current evaluator with resolvers
      Returns:
        a pair of context and corresponding caller controller
      Throws:
        `EvaluationException` - if no context with given path found among resolvers

    - #### resolveContext

          protected Pair<Context,CallerController> resolveContext(java.lang.String contextPath,
                                                                  java.lang.String schema,
                                                                  Evaluator evaluator)
                                                           throws EvaluationException

      Throws:
        `EvaluationException`