Class ResultMatrix

Object
AbstractPortletDto
ResultMatrix
All Implemented Interfaces:
Serializable, AppPages, Portlet, ResultMatrix, ComplexCalculationResult

@Deprecated public class ResultMatrix extends AbstractPortletDto implements ResultMatrix
Deprecated.
Please import ResultMatrix
See Also:
  • Constructor Details

  • Method Details

    • getTitle

      public String getTitle()
      Deprecated.
      Description copied from interface: ResultMatrix
      Gets the current title
      Specified by:
      getTitle in interface ResultMatrix
      Returns:
      The current title
    • withTitle

      public ResultMatrix withTitle(String title)
      Deprecated.
      Description copied from interface: ResultMatrix
      Sets the title that will be shown as window title of the result matrix in the client
      Specified by:
      withTitle in interface ResultMatrix
      Parameters:
      title - The title
    • getPreferenceName

      public String getPreferenceName()
      Deprecated.
      Description copied from interface: ResultMatrix
      Gets the preference name
      Specified by:
      getPreferenceName in interface ResultMatrix
      Returns:
      The preference name
    • isPreferencesDisabled

      public boolean isPreferencesDisabled()
      Deprecated.
      Description copied from interface: ResultMatrix
      Tells whether saving of matrix grid preferences is disabled.
      Specified by:
      isPreferencesDisabled in interface ResultMatrix
      Returns:
      true if saving of grid preferences is disabled. Default is false
    • withDisablePreferences

      public ResultMatrix withDisablePreferences(boolean disablePreferences)
      Deprecated.
      Description copied from interface: ResultMatrix
      Allows to disable saving preferences of the matrix grid (columns, sorting, filtering). If not disabled, the preferences may be be saved with the global dashboard preferences or attached to a specific preferences name defined with setPreferenceName()/withPreferenceName()
      Specified by:
      withDisablePreferences in interface ResultMatrix
      Parameters:
      disablePreferences - true means saving grid preferences is disabled. Default is false
    • isSortingDisabled

      public boolean isSortingDisabled()
      Deprecated.
      Description copied from interface: ResultMatrix
      UI sorting of matrix grid
      Specified by:
      isSortingDisabled in interface ResultMatrix
      Returns:
      true if sorting is disabled on all columns. Default is false
    • withDisableSorting

      public ResultMatrix withDisableSorting(boolean disableSorting)
      Deprecated.
      Description copied from interface: ResultMatrix
      Set sorting capability in UI grid
      Specified by:
      withDisableSorting in interface ResultMatrix
      Parameters:
      disableSorting - true: sorting is disabled in UI on all columns
    • isEscapeHTML

      public boolean isEscapeHTML()
      Deprecated.
      Description copied from interface: ResultMatrix
      Is HTML escaping enabled?
      Specified by:
      isEscapeHTML in interface ResultMatrix
      Returns:
      true if the matrix should display raw text as is (i.e. not try to interpret it as HTML)
    • withEscapeHTML

      public ResultMatrix withEscapeHTML(boolean escapeHTML)
      Deprecated.
      Description copied from interface: ResultMatrix
      Set HTML escaping flag. Default: false (i.e. values will be interpreted as HTML)
      Specified by:
      withEscapeHTML in interface ResultMatrix
      Parameters:
      escapeHTML -
    • withPreferenceName

      public ResultMatrix withPreferenceName(String preferenceName)
      Deprecated.
      Description copied from interface: ResultMatrix
      Sets the so-called preference name. I.e. all result matrixes with the same preference name will share the same preference setting. The preference setting can be managed as usual in the client and can be set as global to predefine a good setting
      Specified by:
      withPreferenceName in interface ResultMatrix
      Parameters:
      preferenceName - The preference name
    • withColumnTranslation

      public ResultMatrix withColumnTranslation(String column, Map<String,String> translations)
      Deprecated.
      Description copied from interface: ResultMatrix
      Adds translated labels for the given column.
      Specified by:
      withColumnTranslation in interface ResultMatrix
      Parameters:
      column - The column name (as defined e.g. in the constructor)
      translations - A map with the translations. The key of the map is the locale, like "de".
    • getColumnTranslations

      public Map<String,String> getColumnTranslations()
      Deprecated.
      Description copied from interface: ResultMatrix
      Gets current column translations in raw format
      Specified by:
      getColumnTranslations in interface ResultMatrix
      Returns:
    • withColumn

      public ResultMatrix withColumn(String column)
      Deprecated.
      Description copied from interface: ResultMatrix
      Adds a column to the existing set of columns
      Specified by:
      withColumn in interface ResultMatrix
      Parameters:
      column - The columns name
    • withColumn

      public ResultMatrix withColumn(String column, String tooltip)
      Deprecated.
      Description copied from interface: ResultMatrix
      Adds a column to the existing set of columns including a tooltip
      Specified by:
      withColumn in interface ResultMatrix
      Parameters:
      column - The columns name
    • withColumns

      public ResultMatrix withColumns(Collection<String> columns)
      Deprecated.
      Description copied from interface: ResultMatrix
      Adds columns to the existing set of columns
      Specified by:
      withColumns in interface ResultMatrix
      Parameters:
      columns - Collection of columns names
    • withFrozenColumns

      public ResultMatrix withFrozenColumns(Collection<String> frozenColumns)
      Deprecated.
      Description copied from interface: ResultMatrix
      Sets the specified columns as frozen.

      Calling this method again will replace the previously set frozen columns. If duplicate columns are specified, they are ignored (no error/warning is thrown).
      All specified columns must be part of the ResultMatrix's columns. If any column is not part of the ResultMatrix's columns, an exception is thrown.

      Example:

      
           def resultMatrix = api.newMatrix()
                .withColumns('Column1', 'Column2', 'Column3')
                .withFrozenColumns('Column1')
      
           //Column1 will be frozen in the UI
       
      Specified by:
      withFrozenColumns in interface ResultMatrix
      Parameters:
      frozenColumns - Collection of column names to be frozen. Passing null parameter will unfreeze all columns.
      Returns:
      ResultMatrix with the updated frozen columns.
      See Also:
    • addRow

      public void addRow(Map<String,Object> row)
      Deprecated.
      Description copied from interface: ResultMatrix
      Adds a data row. The keys of the row-map should match the column names defined earlier
      Specified by:
      addRow in interface ResultMatrix
      Parameters:
      row -
    • getTotalRow

      public Object getTotalRow()
      Deprecated.
      Description copied from interface: ResultMatrix
      Retrieves a value assigned to the totalRow property within the ResultMatrix.
      Specified by:
      getTotalRow in interface ResultMatrix
      Returns:
      totalRow An Object representing the totalRow value assigned by the withTotalRow method.
      See Also:
    • withTotalRow

      public ResultMatrix withTotalRow(Object totalRow)
      Deprecated.
      Description copied from interface: ResultMatrix
      Assigns any data to the totalRow property within the ResultMatrix. Uses the same format as a standard ResultMatrix row, you can also use a styled cell using styledCell().

      Enables you to add, for example, SUM calculations into this row.
      Note: Multiple calls of withTotalRow(Object) will override the previously set totalRow data.
      Example:

      
        matrix.withTotalRow([
               "MaterialNumber": "2100616",
               "ShipToNumber": "2003248",
               "SpecialPrice": 2.65,
               "ListPrice": 253,
               "SupplementalPrice": 1.99,
               "SupplementalRate": "0.66",
               "Percent": "98"
           ])
       
      Specified by:
      withTotalRow in interface ResultMatrix
      Parameters:
      totalRow - Any value defined by the Configuration Engineer (CE).
      Returns:
      ResultMatrix with updated totalRow value.
      See Also:
    • getGroupBy

      public List<String> getGroupBy()
      Deprecated.
      Specified by:
      getGroupBy in interface ResultMatrix
      Returns:
      immutable list of columns' names dedicated for grouping
      See Also:
    • getGroupByData

      public List<List<Map<String,Object>>> getGroupByData()
      Deprecated.
      Specified by:
      getGroupByData in interface ResultMatrix
      Returns:
      immutable collection of data grouped by predefined columns
      See Also:
    • getAggregationStrategy

      public Map<String,Object> getAggregationStrategy()
      Deprecated.
      Specified by:
      getAggregationStrategy in interface ResultMatrix
      Returns:
      immutable Map of numeric column's name with aggregation value assigned to it
      See Also:
    • isEnableGroupByControls

      public boolean isEnableGroupByControls()
      Deprecated.
      Description copied from interface: ResultMatrix
      Returns true (default) if "Group by" controls are enabled and false when they are disabled.

      Allows you to determine if the "Group By" controls are activated. If the controls are deactivated, the user will be aware of the grouping but will not be able to change it.
      Example:

      
        def resultMatrix = api.newMatrix(['Tier', 'Item', 'Quantity'])
            .withEnabledControls(false)
      
        resultMatrix.isControlsEnabled() == false
       
      Specified by:
      isEnableGroupByControls in interface ResultMatrix
      Returns:
      boolean value true if "Group By" controls are enabled (default), or false if they are disabled.
      See Also:
    • isShowGroupByControls

      public boolean isShowGroupByControls()
      Deprecated.
      Description copied from interface: ResultMatrix
      Returns true (default) if "Group by" controls are shown and false when they are hidden.

      Allows you to check if the "Group By" controls are enabled and visible to the end user. If the controls are disabled, they will be completely hidden and unchangeable by the end user.
      Example:

      
        def resultMatrix = api.newMatrix(['Tier', 'Item', 'Quantity'])
            .withShowGroupByControls(false)
      
        resultMatrix.isGroupByControlsShown() == false
       
      Specified by:
      isShowGroupByControls in interface ResultMatrix
      Returns:
      boolean value true if "Group By" controls are enabled and visible (default), or false if they are hidden.
      See Also:
    • isShowGroupByColumns

      public boolean isShowGroupByColumns()
      Deprecated.
      Description copied from interface: ResultMatrix
      Returns true if "Group by" columns are shown and false when they are hidden.

      Example:

      
        def resultMatrix = api.newMatrix(['Tier', 'Item', 'Quantity'])
            .withShowGroupByColumns(false)
      
       resultMatrix.isGroupByColumnsShown() == false
       
      Specified by:
      isShowGroupByColumns in interface ResultMatrix
      Returns:
      boolean value true if the Group by columns are shown (default) or false when they are hidden.
      See Also:
    • getGroupByColumnLabel

      public String getGroupByColumnLabel()
      Deprecated.
      Description copied from interface: ResultMatrix
      Retrieves the custom label for the Group column.

      Returns the label that was set for the "Grouping column" using the ResultMatrix.withGroupByColumnLabel(String) method.

      Example:

      
        def resultMatrix = api.newMatrix(['Tier', 'Item', 'Quantity'])
            .withGroupByColumnLabel('myLabel')
      
        def GroupByLabel = resultMatrix.getGroupByColumnLabel()
        assert groupByLabel == 'myLabel'
        return GroupByLabel
       
      Specified by:
      getGroupByColumnLabel in interface ResultMatrix
      Returns:
      String The current label for the Group By column.
      See Also:
    • withGroupBy

      public ResultMatrix withGroupBy(Collection<String> columns)
      Deprecated.
      Description copied from interface: ResultMatrix
      Definition of columns' names dedicated for grouping. Columns passed in the collection need to be present in ResultMatrix columns' attribute. If, at least one column, is not part of the ResultMatrix columns' attribute, the ResultMatrixGroupingException.NotPartOfColumnsAttributeException will be thrown. Repetitive columns' names are removed.

      Example:

      
           def resultMatrix = api.newMatrix('TextColumn1', 'TextColumn2', 'NumericColumn3', 'NumericColumn4')
           resultMatrix.withRows(entries)
           resultMatrix.withGroupBy(['TextColumn1', 'TextColumn2'])
      
           // TextColumn1 and TextColumn2 are now columns by which grouping will be done
           // The groupBy columns can be accessed by ResultMatrix.getGroupBy()
           def groupByColumns = resultMatrix.getGroupBy()
      
       
      Specified by:
      withGroupBy in interface ResultMatrix
      Parameters:
      columns - collection of columns' names for grouping, if null or empty the ResultMatrixGroupingException.NullOrEmptyException will be thrown.
      Returns:
      ResultMatrix with groupBy columns.
      See Also:
    • withColumnAggregation

      public ResultMatrix withColumnAggregation(String numericColumn, ResultMatrixGrouping.AggregateFunctionType aggregateFunctionType)
      Deprecated.
      Description copied from interface: ResultMatrix
      Aggregation strategy definition done by column-name-holding-numeric-values only (numericColumn) and aggregation type (aggregateFunctionType). Static import allowing for enum recognition is needed here: ResultMatrixGrouping.AggregateFunctionType. Aggregation type can be set by one of the AggregateFunctionTypes: AVG, SUM, COUNT, MAX or MIN

      Example:

      
           // static import is needed to use predefined enum with aggregation type
           import static net.pricefx.server.dto.calculation.ResultMatrixGrouping.AggregateFunctionType.SUM
      
           // ResultMatrix with predefined columns, entries and groupBy columns
           def resultMatrix = api.newMatrix('TextColumn1', 'TextColumn2', 'NumericColumn3', 'NumericColumn4')
           resultMatrix.withRows(entries)
           resultMatrix.withGroupBy(['TextColumn1', 'TextColumn2'])
      
           resultMatrix.withColumnAggregation('NumericColumn3', SUM])
      
       
      Specified by:
      withColumnAggregation in interface ResultMatrix
      Parameters:
      numericColumn - column with numeric data to proceed aggregation. If column contains non-numeric data or is not present in ResultMatrix's columns collection, the ResultMatrixGroupingException.NotPartOfColumnsAttributeException will be thrown
      aggregateFunctionType - predefined aggregation type: AggregateFunctionType.AVG, AggregateFunctionType.SUM, AggregateFunctionType.COUNT, AggregateFunctionType.MAX or AggregateFunctionType.MIN
      Returns:
      ResultMatrix with aggregation strategy updated
      See Also:
    • withColumnAggregation

      public ResultMatrix withColumnAggregation(String column, Object aggregateValue)
      Deprecated.
      Description copied from interface: ResultMatrix
      Aggregation strategy definition done by column name and aggregation value (ex. some constant String). Aggregation value can be set as any Object.

      Example:

      
           // ResultMatrix with predefined columns, entries and groupBy columns
           def resultMatrix = api.newMatrix('TextColumn1', 'TextColumn2', 'NumericColumn3', 'NumericColumn4')
           resultMatrix.withRows(entries)
           resultMatrix.withGroupBy(['TextColumn1', 'TextColumn2'])
      
           resultMatrix.withColumnAggregation('TextColumn1', 'some text'])
      
       
      Specified by:
      withColumnAggregation in interface ResultMatrix
      Parameters:
      column - column name, needs to be part of the ResultMatrix columns attribute
      aggregateValue - any object, which will be presented in the groupBy record
      See Also:
    • withColumnAggregations

      public ResultMatrix withColumnAggregations(Map<String,Object> columnAggregations)
      Deprecated.
      Description copied from interface: ResultMatrix
      Aggregation strategy definition done by Map with numeric columns' name and aggregation type or value. Aggregation value can be set as any Object or aggregation function ResultMatrixGrouping.AggregateFunctionType (AVG, SUM, COUNT, MAX or MIN)

      Example:

      
           // static import is needed to use predefined enum with aggregation types
           import static net.pricefx.server.dto.calculation.ResultMatrixGrouping.AggregateFunctionType.SUM
      
           // ResultMatrix with predefined columns, entries and groupBy columns
           def resultMatrix = api.newMatrix('TextColumn1', 'TextColumn2', 'NumericColumn3', 'NumericColumn4')
           resultMatrix.withRows(entries)
           resultMatrix.withGroupBy(['TextColumn1', 'TextColumn2'])
      
           // Key in the columnAggregations needs to be the column's name which contains only numbers
           // Value in the columnAggregations can be any object or one of the AggregateFunctionType enum
           resultMatrix.withColumnAggregation([NumericColumn3 : SUM])
      
       
      Specified by:
      withColumnAggregations in interface ResultMatrix
      Parameters:
      columnAggregations - Map with numeric-column-name and aggregation type or value
      Returns:
      ResultMatrix with aggregation strategy updated
      See Also:
    • calculateGroupByData

      public ResultMatrix calculateGroupByData()
      Deprecated.
      Description copied from interface: ResultMatrix
      Proceed grouping with groupBy columns (if missing ResultMatrixGroupingException.NullOrEmptyException is thrown) for numeric columns and aggregation strategy passed by ResultMatrix.withColumnAggregation(String, Object) or ResultMatrix.withColumnAggregation(String, AggregateFunctionType) or ResultMatrix.withColumnAggregations(Map). If AggregateType has one of the predefined keywords (ie.: SUM, AVG, COUNT, MAX or MIN), the numeric operation will be proceeded on the numeric columns. This is terminal operation, which means, it needs to be called as the last one (after setting columns and groupBy)

      Example:

      
           // (1) static import is needed to use predefined enum with aggregation types
           import static net.pricefx.server.dto.calculation.ResultMatrixGrouping.AggregateFunctionType.SUM
      
           // (2) new ResultMatrix with predefined columns
           def resultMatrix = api.newMatrix('TextColumn1', 'TextColumn2', 'NumericColumn3', 'NumericColumn4')
      
           // (3) add entries to the above ResultMatrix
           resultMatrix.withRows(entries)
      
           // (4) set groupBy columns, which needs to be a part of columns' collection from (1)
           resultMatrix.withGroupBy(['TextColumn1', 'TextColumn2'])
      
           // (5) set aggregation strategy for numericColumn3 as SUM, numericColumn3 needs to contains only numbers
           resultMatrix.withColumnAggregation('NumericColumn3', SUM)
      
           // (6) do the grouping and aggregation calculations, which also adds data to groupByData ResultMatrix property
           resultMatrix.calculateGroupByData()
      
           // (7) grouped and aggregated data can be accessed by the getter
           def groupByData = resultMatrix.getGroupByData()
      
           // Other getters allow for access to groupBy columns and aggregation strategy
           def groupByColumns = resultMatrix.getGroupBy()
           def aggregationStrategy = resultMatrix.getAggregationStrategy()
      
       
      
           // All operations can be chained to get the final groupBy data
           import static net.pricefx.server.dto.calculation.ResultMatrixGrouping.AggregateFunctionType.SUM
      
           def groupByData = api.newMatrix()
                   .withColumns('TextColumn1', 'TextColumn2', 'NumericColumn3', 'NumericColumn4')
                   .withRows(entries)
                   .withGroupBy(['TextColumn1', 'TextColumn2'])
                   .withColumnAggregation('NumericColumn3', SUM)
                   .calculateGroupByData()
                   .getGroupByData()
       
      Note: When no rows (empty entries) are defined then the empty ResultMatrix is created.
      When aggregated rows are null the RESULT_MATRIX_NULL_ENTRIES_EXCEPTION exception is thrown.
      Specified by:
      calculateGroupByData in interface ResultMatrix
      Returns:
      ResultMatrix with grouped and aggregated data (can be accessed by ResultMatrix.getGroupByData()
      See Also:
    • withEnableGroupByControls

      public ResultMatrix withEnableGroupByControls(boolean enableGroupByControls)
      Deprecated.
      Description copied from interface: ResultMatrix
      Enables or disables the "Group by" controls.

      Allows you to specify whether the user can change the "Group by" controls.
      If disabled, the user will see that the data in the matrix is grouped, but will not be able to change the grouping settings.
      This is useful when the grouping is defined by the logic and cannot be changed by the end user – while still informing the user which columns are used for grouping.
      Example:

      
        def groupByData = api.newMatrix()
            .withColumns(["∑Base", "∑Costs", "Invoice Line ID", "Country"])
            .withGroupBy(["Country", "Invoice Line ID"])
            .withEnableGroupByControls(false) // Expected result: Group By columns are disabled.
       
      The Group by controls are displayed, but cannot be changed:
      Specified by:
      withEnableGroupByControls in interface ResultMatrix
      Parameters:
      enableGroupByControls - boolean value turning on or off the controls
      Returns:
      ResultMatrix with new value for enableGroupByControls.
      See Also:
    • withShowGroupByControls

      public ResultMatrix withShowGroupByControls(boolean showGroupByControls)
      Deprecated.
      Description copied from interface: ResultMatrix
      Sets whether "Group by" controls are completely hidden.

      To show "Group By" controls without allowing a user to change the Group By setting, use the ResultMatrix.withEnableGroupByControls(boolean) method.
      Can be enabled only if ResultMatrix.isEnableGroupByControls() is true.
      Use case: "Group By" is defined by the logic to allow for some formatting, and the CE wants to use Group By feature without letting the end user know that the "Group By" has been applied.
      Example:

      
        def groupByData = api.newMatrix()
            .withColumns(["∑Base", "∑Costs", "Invoice Line ID", "Country"])
            .withGroupBy(["Country", "Invoice Line ID"])
            .withShowGroupByControls(false) // Expected result: Group by controls are hidden.
       
      The Group by controls are not displayed in the table:
      Specified by:
      withShowGroupByControls in interface ResultMatrix
      Parameters:
      showGroupByControls - boolean value turning on or off the Group By controls
      Returns:
      ResultMatrix with new value for showGroupByControls
      See Also:
    • withShowGroupByColumns

      public ResultMatrix withShowGroupByColumns(boolean showGroupByColumns)
      Deprecated.
      Description copied from interface: ResultMatrix
      Sets the visibility of the Group By columns in the ResultMatrix.

      Group by columns are visible by default. This method allows you to hide these columns.

      Example:

      
       def groupByData = api.newMatrix()
            .withColumns(["∑Base", "∑Costs", "Invoice Line ID", "Country"])
            .withGroupBy(["Country", "Invoice Line ID"])
            .withShowGroupByColumns(false) // Expected result: Group By columns are automatically hidden.
       
      Group By columns are hidden:
      Specified by:
      withShowGroupByColumns in interface ResultMatrix
      Parameters:
      showGroupByColumns - A flag to turn on or off the visibility of the Group By columns.
      Returns:
      ResultMatrix with updated value for showGroupByColumns
      See Also:
    • withGroupByColumnLabel

      public ResultMatrix withGroupByColumnLabel(String groupColumnLabel)
      Deprecated.
      Description copied from interface: ResultMatrix
      Sets a custom label for the Group column in the ResultMatrix table.

      Allows you to change the label of the grouping column from "Group" (default) to a custom label.
      Use the ResultMatrix.getGroupByColumnLabel() to retrieve the custom label.

      Example:

      
       def groupByData = api.newMatrix()
            .withColumns(["∑Base", "∑Costs", "Invoice Line ID", "Country"])
            .withGroupBy(["Country", "Invoice Line ID"])
            .withGroupByColumnLabel('Custom Label') // sets the Group column label to "Custom Label"
       
      The "Group" column changed to "Custom Label":
      Specified by:
      withGroupByColumnLabel in interface ResultMatrix
      Parameters:
      groupColumnLabel - The custom label for the Group By column.
      Returns:
      ResultMatrix with the updated Group By column label.
      See Also:
    • withRow

      public ResultMatrix withRow(List<Object> row)
      Deprecated.
      Description copied from interface: ResultMatrix
      Adds a data row. The order of the values is assumed to be the same as the matrix column order.
      Specified by:
      withRow in interface ResultMatrix
      Parameters:
      row - Row as List
    • withRows

      public ResultMatrix withRows(List<Map<String,Object>> rows)
      Deprecated.
      Description copied from interface: ResultMatrix
      Adds multiple data rows. The keys of the row-map should match the column names defined earlier
      Specified by:
      withRows in interface ResultMatrix
      Parameters:
      rows - Row as List of Maps
    • addRow

      public void addRow(Object... values)
      Deprecated.
      Description copied from interface: ResultMatrix
      Adds a data row. The order of the values is assumed to be the same as the matrix column order.
      Specified by:
      addRow in interface ResultMatrix
      Parameters:
      values - Row as Array
    • getColumns

      public List<String> getColumns()
      Deprecated.
      Description copied from interface: ResultMatrix
      Gets a list of defined columns
      Specified by:
      getColumns in interface ResultMatrix
      Returns:
      The columns
    • getFrozenColumns

      public List<String> getFrozenColumns()
      Deprecated.
      Description copied from interface: ResultMatrix
      Retrieves a list containing the names of columns that are currently set as frozen.
      Specified by:
      getFrozenColumns in interface ResultMatrix
      Returns:
      The frozen columns list
    • getEntries

      public List<Map<String,Object>> getEntries()
      Deprecated.
      Description copied from interface: ResultMatrix
      Returns the current list entries as a list (=the rows) of maps (= the row content)
      Specified by:
      getEntries in interface ResultMatrix
      Returns:
      List of maps
    • findRow

      public Map<String,Object> findRow(String key, Object value)
      Deprecated.
      Description copied from interface: ResultMatrix
      Retrieves a particular row based on a value check
      Specified by:
      findRow in interface ResultMatrix
      Parameters:
      key - The column name to search on
      value - The value to match the row's column value to
      Returns:
      The row
    • withDefaultFormat

      public ResultMatrix withDefaultFormat(FieldFormatType fft)
      Deprecated.
      Description copied from interface: ResultMatrix
      Sets a default column format
      Specified by:
      withDefaultFormat in interface ResultMatrix
      Parameters:
      fft -
    • getDefaultFormat

      public FieldFormatType getDefaultFormat()
      Deprecated.
      Description copied from interface: ResultMatrix
      Gets the default format
      Specified by:
      getDefaultFormat in interface ResultMatrix
      Returns:
      Default format
    • getColumnFormats

      public Map<String,FieldFormatType> getColumnFormats()
      Deprecated.
      Description copied from interface: ResultMatrix
      Gets individual column formats (if specified)
      Specified by:
      getColumnFormats in interface ResultMatrix
      Returns:
      A Map with column name and format
    • withColumnFormat

      public ResultMatrix withColumnFormat(String column, FieldFormatType fft)
      Deprecated.
      Description copied from interface: ResultMatrix
      Sets a column format for a specified column
      Specified by:
      withColumnFormat in interface ResultMatrix
      Parameters:
      column - The column name
      fft - The format
    • getColumnTooltips

      public Map<String,String> getColumnTooltips()
      Deprecated.
      Description copied from interface: ResultMatrix
      Gets the currently assigned column tooltips
      Specified by:
      getColumnTooltips in interface ResultMatrix
      Returns:
    • withColumnTooltip

      public ResultMatrix withColumnTooltip(String column, String tooltip)
      Deprecated.
      Description copied from interface: ResultMatrix
      Adds a tooltip to a column
      Specified by:
      withColumnTooltip in interface ResultMatrix
      Parameters:
      column - The column name
      tooltip - The tooltip text
    • isEnableClientFilter

      public boolean isEnableClientFilter()
      Deprecated.
      Specified by:
      isEnableClientFilter in interface ResultMatrix
    • withEnableClientFilter

      public ResultMatrix withEnableClientFilter(boolean enableClientFilter)
      Deprecated.
      Specified by:
      withEnableClientFilter in interface ResultMatrix
    • styledCell

      public ResultMatrix.ResultMatrixStyledCell styledCell(Object value)
      Deprecated.
      Description copied from interface: ResultMatrix
      Creates a styled cell that can then be added as row value
      Specified by:
      styledCell in interface ResultMatrix
      Parameters:
      value - The value of the cell
      Returns:
      The styled cell object that can then be further styled with e.g. the flow pattern .withXXX() methods
    • styledCell

      public ResultMatrix.ResultMatrixStyledCell styledCell(Object value, String textColor, String bgColor)
      Deprecated.
      Description copied from interface: ResultMatrix
      Creates a styled cell that can then be added as row value
      Specified by:
      styledCell in interface ResultMatrix
      Parameters:
      value - The value of the cell
      textColor - The text color of the cell
      bgColor - The background color of the cell (HTML hex value)
      Returns:
      The styled cell object
    • styledCell

      public ResultMatrix.ResultMatrixStyledCell styledCell(Object value, String textColor, String bgColor, String weight)
      Deprecated.
      Description copied from interface: ResultMatrix
      Creates a styled cell that can then be added as row value
      Specified by:
      styledCell in interface ResultMatrix
      Parameters:
      value - The value of the cell
      textColor - The text color of the cell
      bgColor - The background color of the cell (HTML hex value)
      weight - The font weight
      Returns:
      The styled cell object
    • styledCell

      public ResultMatrix.ResultMatrixStyledCell styledCell(Object value, String textColor, String bgColor, String weight, String alignment)
      Deprecated.
      Description copied from interface: ResultMatrix
      Creates a styled cell that can then be added as row value
      Specified by:
      styledCell in interface ResultMatrix
      Parameters:
      value - The value of the cell
      textColor - The text color of the cell
      bgColor - The background color of the cell (HTML hex value)
      weight - The font weight
      alignment - Cell alignement value (valid CSS)
      Returns:
      The styled cell object
    • imageCell

      public ResultMatrix.ResultMatrixImageCell imageCell(Object value)
      Deprecated.
      Description copied from interface: ResultMatrix
      Creates an image cell that can then be added as row value. Value should be a valid image URL
      Specified by:
      imageCell in interface ResultMatrix
      Parameters:
      value - The image URL
      Returns:
      The image cell object
    • libraryImage

      public ResultMatrix.ResultMatrixImageCell libraryImage(String mainName, String statusName)
      Deprecated.
      Specified by:
      libraryImage in interface ResultMatrix
    • linkCell

      public ResultMatrix.ResultMatrixLinkCell linkCell(Object value, String targetPage, Object targetPageState)
      Deprecated.
      Specified by:
      linkCell in interface ResultMatrix
    • linkButtonCell

      public ResultMatrix.LinkButtonCell linkButtonCell(Object value, String targetPage, Object targetPageState, Object buttonState)
      Deprecated.
      better use the shorter ResultMatrix.LinkButtonCell
      Description copied from interface: ResultMatrix
      Displays a button inside a cell of the table.

      Simple button example:

      
           def targetPageState = [quoteType: 'Quote with Inputs in Header', Customer: 'custId']
           def cell = matrix.linkButtonCell('New Quote', AppPages.QC_NEW_QUOTE, targetPageState, null)
           matrix.addRow('Customer A', 'Value X', cell)
       

      Advanced button example:

      
           def customerPageState = [Customer: 'custId']
           def groupPageState = [customerFieldName:'customerId', customerFieldValue:custId]
           def builder = api.inputBuilderFactory()
                            .createQuoteType("New quote")
                            .buildContextParameter()
           def cell = matrix.linkButtonCell('cell value' /*not displayed*/, AppPages.QC_NEW_QUOTE, groupPageState, builder)
           matrix.addRow('Customer A', 'Value X', cell)
       

      Note: This is available in Unity UI only. No backporting planned for the Classic UI.

      Specified by:
      linkButtonCell in interface ResultMatrix
    • backEndAction

      public ResultMatrix.ResultMatrixBackEndCell backEndAction(String label, String url, String payload, String successMessage, String failMessage)
      Deprecated.
      Specified by:
      backEndAction in interface ResultMatrix
    • rowSelectionBackEndAction

      public ResultMatrix.ResultMatrixBackEndAction rowSelectionBackEndAction(String id)
      Deprecated.
      Description copied from interface: ResultMatrix

      Allows UI users to select multiple rows and adds an action button next to the ResultMatrix. Multiple such action buttons can be defined, identified by the provided id String.

      The action will be handled by a dedicated logic, which receives an InputMatrix parameter named after the provided id and featuring the row values of a subset of the columns.

      Example:

      
           def matrix = api.newMatrix("col1", "col2", "col3")
           matrix.addRow(1, "a", "f")
           matrix.addRow(2, "b", "g")
           matrix.rowSelectionBackEndAction("actionId")
                       .withLogicName("action_handler")
                       .withColumns("col2", "col3")
                       .withButtonLabel("Click here")
                       .withSuccessMessage("Success")
                       .withFailureMessage("Sorry")
      
       

      Note: This is available in Unity UI only. No backporting planned for the Classic UI.

      See ResultMatrix.BackEndAction to explore the full list of methods allowing to configure an action.

      Specified by:
      rowSelectionBackEndAction in interface ResultMatrix
      Parameters:
      id - a String identifying the action
      Returns:
      a customizable object representing an action button, which the UI will then render and make functional
    • downloadButton

      public ResultMatrix.ResultMatrixDownloadCell downloadButton(String label, String url, String payload)
      Deprecated.
      Specified by:
      downloadButton in interface ResultMatrix
    • cells

      public ResultMatrix.ResultMatrixCells cells(String label, Object... cells)
      Deprecated.
      Specified by:
      cells in interface ResultMatrix
    • onRowSelection

      public ResultMatrix.ResultMatrixOnRowSelection onRowSelection()
      Deprecated.
      Description copied from interface: ResultMatrix
      Configures a client-side UI event. Use case is usually a refresh of some sort when a result matrix row is selected Example:
      
       matrix.onRowSelection().triggerEvent(api.dashboardWideEvent("CustomerIdChanged-ED")).withColValueAsEventDataAttr("CustomerID", "customerId")
       
      The embedded dashboard that receives the event could then look like:
      
        return api.dashboard("EmbeddedDashboard")
      
          // Here the user can assign values to the embedded
          // dashboard inputs common to all three modes
          .setParam("Customer Id", input."Customer Id")
          .setParam("Year", input.Year)
      
          // Show the dashboard embedded ...
          .showEmbedded()
          // ... and reevaluate it on "CustomerIdChanged-ED"
          // Note: "dashboardWideEvent()" fce makes the event local
          // to the containing dashboard instance
          .andRecalculateOn(api.dashboardWideEvent("CustomerIdChanged-ED"))
          // Pull the "customerId" attribute out of the event payload and expose it
          // as the "Customer Id" input to the embedded dashboard
          .withEventDataAttr("customerId").asParam("Customer Id")
       
      Specified by:
      onRowSelection in interface ResultMatrix
      Returns:
      The selection event to further configure it in a flow pattern
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object
    • decideFormat

      protected FieldFormatType decideFormat(Object input)
      Deprecated.
    • addFormatsToResultMatrix

      public void addFormatsToResultMatrix()
      Deprecated.
      Specified by:
      addFormatsToResultMatrix in interface ResultMatrix
    • normalizeDateTimes

      public void normalizeDateTimes()
      Deprecated.
      Description copied from interface: ResultMatrix
      Search for non null FieldFormatType.DATETIME columns and convert them into DateTime
      Specified by:
      normalizeDateTimes in interface ResultMatrix
    • filter

      public ResultMatrix filter(Filter filter)
      Deprecated.