Class ResultMatrix
- All Implemented Interfaces:
Serializable
,AppPages
,Portlet
,ResultMatrix
,ComplexCalculationResult
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Deprecated.better use the shorterResultMatrix.Cell
static interface
Deprecated.static interface
Deprecated.static interface
Deprecated.static interface
Deprecated.static interface
Deprecated.static interface
Deprecated.static interface
Deprecated.static interface
Deprecated.static class
Deprecated.better use the shorterResultMatrix.BackEndAction
static class
Deprecated.better use the shorterResultMatrix.BackEndCell
static class
Deprecated.better use the shorterResultMatrix.Cells
static class
Deprecated.better use the shorterResultMatrix.DownloadCell
static class
Deprecated.better use the shorterResultMatrix.ImageCell
static class
Deprecated.better use the shorterResultMatrix.LinkCell
class
Deprecated.better use the shorterResultMatrix.OnRowSelection
static class
Deprecated.better use the shorterResultMatrix.StyledCell
static interface
Deprecated.Nested classes/interfaces inherited from interface ResultMatrix
ResultMatrix.LinkButtonCell
-
Field Summary
Fields inherited from class AbstractPortletDto
dragDropEnabled, layout, messages, resizingEnabled
Fields inherited from interface AppPages
CM_MAIN_PAGE, CM_RECORDS_PAGE, CM_TYPES_PAGE, CONFIG_WIZARDS_PAGE, CUSTOM_FORMS_NEW, CUSTOM_FORMS_PAGE, CUSTOM_FORMS_TYPE_PAGE, DB_DASHBOARDS_PAGE, DP_PAGE, DP_TYPES_PAGE, ENABLE_ANALYSIS, ENABLE_APPROVALS, ENABLE_CUSTOMERS, ENABLE_EARNINGS, ENABLE_FORECASTING, ENABLE_PROGRAM_LINE, ENABLE_PROGRAM_LINES, ENABLE_SETTINGS, ENABLE_TERMS, MD_BOM_PAGE, MD_COMPETITION_PAGE, MD_CUSTOMERS_PAGE, MD_CX_PAGE, MD_DCR_PAGE, MD_PP_PAGE, MD_PRODUCTS_PAGE, MD_PX_PAGE, MD_SELLER_EXTENSIONS_PAGE, MD_SELLERS_PAGE, MD_WIZARD_PAGE, PA_CHART_BARLINE_PAGE, PA_CHART_BOXPLOT_PAGE, PA_CHART_BUBBLE_PAGE, PA_CHART_COMPARISONWF_PAGE, PA_CHART_DATATABLE_PAGE, PA_CHART_DETAILEDTIME_PAGE, PA_CHART_HEATMAP_PAGE, PA_CHART_HISTOGRAM_PAGE, PA_CHART_PAGE, PA_CHART_PIE_PAGE, PA_CHART_SCATTER_PAGE, PA_CHART_TIMESCATTER_PAGE, PA_CHART_TIMESERIES_PAGE, PA_CHART_WATERFALL_PAGE, PA_DATASOURCES_PAGE, PA_ROLLUPS_PAGE, PB_LPG_PAGE, PB_MPL_PAGE, PB_PL_ADD_SKU_PAGE, PB_PL_PAGE, PB_SIMULATION_PAGE, PM_CONTRACTS_PAGE, PM_NEW_CONTRACT, PO_NEW_MODEL, QC_DETAILS_PAGE, QC_NEW_QUOTE, QC_TYPES_PAGE, RM_DETAILS_PAGE, RM_MAIN_PAGE, RM_NEW_REBATE_AGREEMENT, RM_RECORDS_PAGE, RM_TEMPLATES_PAGE, SC_ACCRUAL_RECORDS_PAGE, SC_CALCULATIONS_PAGE, SC_COMPENSATION_RECORDS_PAGE, SC_COMPENSATION_TYPES_PAGE, SC_CONDITION_TYPES_PAGE, SC_NEW_PLAN, SC_PLANS_PAGE, SELLER_EXTENSIONS_PAGE, SELLERS_PAGE, USER_ACTIONS_PAGE, USER_NEW_ACTION_PAGE
-
Constructor Summary
ModifierConstructorDescriptionDeprecated.better use the shorterPublicGroovyAPI.newMatrix()
ResultMatrix
(String... columns) Deprecated.better use the shorterPublicGroovyAPI.newMatrix(String...)
ResultMatrix
(Collection<String> columns) Deprecated.better use the shorterPublicGroovyAPI.newMatrix(Collection)
ResultMatrix
(Map<?, ?> jsonMap) Deprecated.better use the shorterPublicGroovyAPI.newMatrix()
protected
ResultMatrix
(ResultMatrix origin) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.void
Deprecated.Adds a data row.void
Deprecated.Adds a data row.Deprecated.Deprecated.Proceed grouping with groupBy columns (if missingResultMatrixGroupingException.NullOrEmptyException
is thrown) for numeric columns and aggregation strategy passed byResultMatrix.withColumnAggregation(String, Object)
orResultMatrix.withColumnAggregation(String, AggregateFunctionType)
orResultMatrix.withColumnAggregations(Map)
.Deprecated.protected FieldFormatType
decideFormat
(Object input) Deprecated.downloadButton
(String label, String url, String payload) Deprecated.Deprecated.Deprecated.Retrieves a particular row based on a value checkDeprecated.Deprecated.Gets individual column formats (if specified)Deprecated.Gets a list of defined columnsDeprecated.Gets the currently assigned column tooltipsDeprecated.Gets current column translations in raw formatDeprecated.Gets the default formatDeprecated.Returns the current list entries as a list (=the rows) of maps (= the row content)Deprecated.Deprecated.Retrieves a list containing the names of columns that are currently set as frozen.Deprecated.Deprecated.Retrieves the custom label for the Group column.Deprecated.Deprecated.Gets the preference namegetTitle()
Deprecated.Gets the current titleDeprecated.Retrieves a value assigned to thetotalRow
property within the ResultMatrix.Deprecated.Creates an image cell that can then be added as row value.boolean
Deprecated.boolean
Deprecated.Returnstrue
(default) if "Group by" controls are enabled andfalse
when they are disabled.boolean
Deprecated.Is HTML escaping enabled?boolean
Deprecated.boolean
Deprecated.Tells whether saving of matrix grid preferences is disabled.boolean
Deprecated.Returnstrue
if "Group by" columns are shown andfalse
when they are hidden.boolean
Deprecated.Returnstrue
(default) if "Group by" controls are shown andfalse
when they are hidden.boolean
Deprecated.UI sorting of matrix gridlibraryImage
(String mainName, String statusName) Deprecated.linkButtonCell
(Object value, String targetPage, Object targetPageState, Object buttonState) Deprecated.better use the shorterResultMatrix.LinkButtonCell
Deprecated.void
Deprecated.Search for non nullFieldFormatType.DATETIME
columns and convert them intoDateTime
Deprecated.Configures a client-side UI event.Deprecated.Allows UI users to select multiple rows and adds an action button next to the ResultMatrix.styledCell
(Object value) Deprecated.Creates a styled cell that can then be added as row valuestyledCell
(Object value, String textColor, String bgColor) Deprecated.Creates a styled cell that can then be added as row valuestyledCell
(Object value, String textColor, String bgColor, String weight) Deprecated.Creates a styled cell that can then be added as row valueDeprecated.Creates a styled cell that can then be added as row valuetoString()
Deprecated.withColumn
(String column) Deprecated.Adds a column to the existing set of columnswithColumn
(String column, String tooltip) Deprecated.Adds a column to the existing set of columns including a tooltipwithColumnAggregation
(String column, Object aggregateValue) Deprecated.Aggregation strategy definition done by column name and aggregation value (ex. some constantString
).withColumnAggregation
(String numericColumn, ResultMatrixGrouping.AggregateFunctionType aggregateFunctionType) Deprecated.Aggregation strategy definition done by column-name-holding-numeric-values only (numericColumn) and aggregation type (aggregateFunctionType).withColumnAggregations
(Map<String, Object> columnAggregations) Deprecated.Aggregation strategy definition done by Map with numeric columns' name and aggregation type or value.withColumnFormat
(String column, FieldFormatType fft) Deprecated.Sets a column format for a specified columnwithColumns
(Collection<String> columns) Deprecated.Adds columns to the existing set of columnswithColumnTooltip
(String column, String tooltip) Deprecated.Adds a tooltip to a columnwithColumnTranslation
(String column, Map<String, String> translations) Deprecated.Adds translated labels for the given column.Deprecated.Sets a default column formatwithDisablePreferences
(boolean disablePreferences) Deprecated.Allows to disable saving preferences of the matrix grid (columns, sorting, filtering).withDisableSorting
(boolean disableSorting) Deprecated.Set sorting capability in UI gridwithEnableClientFilter
(boolean enableClientFilter) Deprecated.withEnableGroupByControls
(boolean enableGroupByControls) Deprecated.Enables or disables the "Group by" controls.withEscapeHTML
(boolean escapeHTML) Deprecated.Set HTML escaping flag.withExpandedGroups
(Collection<String> columns) Deprecated.Definition of columns' names dedicated for expand level while grouping (same for each row, nested levels are not supported).
Columns passed in the collection need to be present inResultMatrix
groupBy's attribute.
If, at least one column, is not part of theResultMatrix
groupBy's attribute, theResultMatrixGroupingException.NotPartOfGroupByAttributeException
will be thrown.
If global expand data in grouping is off (ResultMatrix.isGroupByDataExpanded()
equals to false) thenResultMatrix.getExpandedGroups()
will be ignored.withFrozenColumns
(Collection<String> frozenColumns) Deprecated.Sets the specified columns as frozen.withGroupBy
(Collection<String> columns) Deprecated.Definition of columns' names dedicated for grouping.withGroupByColumnLabel
(String groupColumnLabel) Deprecated.Sets a custom label for the Group column in the ResultMatrix table.withGroupByDataExpanded
(boolean isGroupByDataExpanded) Deprecated.Definition of global group by data expand.withPreferenceName
(String preferenceName) Deprecated.Sets the so-called preference name.Deprecated.Adds a data row.Deprecated.Adds multiple data rows.withShowGroupByColumns
(boolean showGroupByColumns) Deprecated.Sets the visibility of the Group By columns in the ResultMatrix.withShowGroupByControls
(boolean showGroupByControls) Deprecated.Sets whether "Group by" controls are completely hidden.Deprecated.Sets the title that will be shown as window title of the result matrix in the clientwithTotalRow
(Object totalRow) Deprecated.Assigns any data to thetotalRow
property within the ResultMatrix.Methods inherited from class AbstractPortletDto
layout, setLayout, value, withDragDrop, withError, withHeight, withHeight, withInfo, withLayout, withLayout, withLayout, withResizing, withWarning, withWidth, withWidth
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface Portlet
withDragDrop, withError, withHeight, withHeight, withInfo, withLayout, withLayout, withResizing, withWarning, withWidth, withWidth
Methods inherited from interface ResultMatrix
addColumn, addColumn, addColumns, addColumnTranslation, addRow, getResultType, linkToPriceGrid, linkToPriceList, linkToPriceParameter, setColumnFormat, setColumnTooltip, setDefaultFormat, setDisablePreferences, setDisableSorting, setEnableClientFilter, setEscapeHTML, setPreferenceName, setTitle, toMatrix2D, transpose, transpose, withColumnFormats
-
Constructor Details
-
ResultMatrix
Deprecated.better use the shorterPublicGroovyAPI.newMatrix()
-
ResultMatrix
Deprecated.better use the shorterPublicGroovyAPI.newMatrix()
The constructor no allows to pass the values forgroupBy
,aggregationStrategy
aggregationStrategy
andexpandedGroups
It will be always cast to the empty collection. -
ResultMatrix
Deprecated. -
ResultMatrix
Deprecated.better use the shorterPublicGroovyAPI.newMatrix(String...)
-
ResultMatrix
Deprecated.better use the shorterPublicGroovyAPI.newMatrix(Collection)
-
-
Method Details
-
getTitle
Deprecated.Description copied from interface:ResultMatrix
Gets the current title- Specified by:
getTitle
in interfaceResultMatrix
- Returns:
- The current title
-
withTitle
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 interfaceResultMatrix
- Parameters:
title
- The title
-
getPreferenceName
Deprecated.Description copied from interface:ResultMatrix
Gets the preference name- Specified by:
getPreferenceName
in interfaceResultMatrix
- 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 interfaceResultMatrix
- Returns:
- true if saving of grid preferences is disabled. Default is false
-
withDisablePreferences
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 interfaceResultMatrix
- 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 interfaceResultMatrix
- Returns:
- true if sorting is disabled on all columns. Default is false
-
withDisableSorting
Deprecated.Description copied from interface:ResultMatrix
Set sorting capability in UI grid- Specified by:
withDisableSorting
in interfaceResultMatrix
- 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 interfaceResultMatrix
- Returns:
- true if the matrix should display raw text as is (i.e. not try to interpret it as HTML)
-
withEscapeHTML
Deprecated.Description copied from interface:ResultMatrix
Set HTML escaping flag. Default: false (i.e. values will be interpreted as HTML)- Specified by:
withEscapeHTML
in interfaceResultMatrix
- Parameters:
escapeHTML
-
-
withPreferenceName
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 interfaceResultMatrix
- Parameters:
preferenceName
- The preference name
-
withColumnTranslation
Deprecated.Description copied from interface:ResultMatrix
Adds translated labels for the given column.- Specified by:
withColumnTranslation
in interfaceResultMatrix
- 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
Deprecated.Description copied from interface:ResultMatrix
Gets current column translations in raw format- Specified by:
getColumnTranslations
in interfaceResultMatrix
- Returns:
-
withColumn
Deprecated.Description copied from interface:ResultMatrix
Adds a column to the existing set of columns- Specified by:
withColumn
in interfaceResultMatrix
- Parameters:
column
- The columns name
-
withColumn
Deprecated.Description copied from interface:ResultMatrix
Adds a column to the existing set of columns including a tooltip- Specified by:
withColumn
in interfaceResultMatrix
- Parameters:
column
- The columns name
-
withColumns
Deprecated.Description copied from interface:ResultMatrix
Adds columns to the existing set of columns- Specified by:
withColumns
in interfaceResultMatrix
- Parameters:
columns
- Collection of columns names
-
withFrozenColumns
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 interfaceResultMatrix
- 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
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 interfaceResultMatrix
- Parameters:
row
-
-
getTotalRow
Deprecated.Description copied from interface:ResultMatrix
Retrieves a value assigned to thetotalRow
property within the ResultMatrix.- Specified by:
getTotalRow
in interfaceResultMatrix
- Returns:
- totalRow An Object representing the
totalRow
value assigned by thewithTotalRow
method. - See Also:
-
withTotalRow
Deprecated.Description copied from interface:ResultMatrix
Assigns any data to thetotalRow
property within the ResultMatrix. Uses the same format as a standard ResultMatrix row, you can also use a styled cell usingstyledCell()
.Enables you to add, for example, SUM calculations into this row.
Note: Multiple calls ofwithTotalRow(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 interfaceResultMatrix
- Parameters:
totalRow
- Any value defined by the Configuration Engineer (CE).- Returns:
ResultMatrix
with updatedtotalRow
value.- See Also:
-
getGroupBy
Deprecated.- Specified by:
getGroupBy
in interfaceResultMatrix
- Returns:
- list of columns' names dedicated for grouping
- See Also:
-
getExpandedGroups
Deprecated.- Specified by:
getExpandedGroups
in interfaceResultMatrix
- Returns:
- list of columns' names defining expanded level(s) of presented groupBy data
- See Also:
-
getGroupByData
Deprecated.- Specified by:
getGroupByData
in interfaceResultMatrix
- Returns:
- collection of data grouped by predefined columns
- See Also:
-
getAggregationStrategy
Deprecated.- Specified by:
getAggregationStrategy
in interfaceResultMatrix
- Returns:
- Map of numeric column's name with aggregation value assigned to it
- See Also:
-
isEnableGroupByControls
public boolean isEnableGroupByControls()Deprecated.Description copied from interface:ResultMatrix
Returnstrue
(default) if "Group by" controls are enabled andfalse
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 interfaceResultMatrix
- Returns:
boolean
valuetrue
if "Group By" controls are enabled (default), orfalse
if they are disabled.- See Also:
-
isShowGroupByControls
public boolean isShowGroupByControls()Deprecated.Description copied from interface:ResultMatrix
Returnstrue
(default) if "Group by" controls are shown andfalse
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 interfaceResultMatrix
- Returns:
boolean
valuetrue
if "Group By" controls are enabled and visible (default), orfalse
if they are hidden.- See Also:
-
isShowGroupByColumns
public boolean isShowGroupByColumns()Deprecated.Description copied from interface:ResultMatrix
Returnstrue
if "Group by" columns are shown andfalse
when they are hidden.Example:
def resultMatrix = api.newMatrix(['Tier', 'Item', 'Quantity']) .withShowGroupByColumns(false) resultMatrix.isGroupByColumnsShown() == false
- Specified by:
isShowGroupByColumns
in interfaceResultMatrix
- Returns:
boolean
valuetrue
if the Group by columns are shown (default) orfalse
when they are hidden.- See Also:
-
isGroupByDataExpanded
public boolean isGroupByDataExpanded()Deprecated.- Specified by:
isGroupByDataExpanded
in interfaceResultMatrix
- Returns:
- the global group by data expand flag.
- See Also:
-
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 interfaceResultMatrix
- Returns:
String
The current label for the Group By column.- See Also:
-
withGroupBy
Deprecated.Description copied from interface:ResultMatrix
Definition of columns' names dedicated for grouping. Columns passed in the collection need to be present inResultMatrix
columns' attribute. If, at least one column, is not part of theResultMatrix
columns' attribute, theResultMatrixGroupingException.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 the grouping will be done // The groupBy columns can be accessed by
ResultMatrix.getGroupBy()
def groupByColumns = resultMatrix.getGroupBy()- Specified by:
withGroupBy
in interfaceResultMatrix
- Parameters:
columns
- collection of columns' names for grouping, if null or empty theResultMatrixGroupingException.NullOrEmptyException
will be thrown.- Returns:
ResultMatrix
with groupBy columns.- See Also:
-
withExpandedGroups
Deprecated.Description copied from interface:ResultMatrix
Definition of columns' names dedicated for expand level while grouping (same for each row, nested levels are not supported).
Columns passed in the collection need to be present inResultMatrix
groupBy's attribute.
If, at least one column, is not part of theResultMatrix
groupBy's attribute, theResultMatrixGroupingException.NotPartOfGroupByAttributeException
will be thrown.
If global expand data in grouping is off (ResultMatrix.isGroupByDataExpanded()
equals to false) thenResultMatrix.getExpandedGroups()
will be ignored. Repetitive columns' names are removed.
NOTE: The methods flow in theResultMatrix
creation needs to be kept in order:
(1) first define groupBy columnsResultMatrix.withGroupBy(Collection)
,
(2) then turn on the global group by data expandResultMatrix.withGroupByDataExpanded(boolean)
,
(3) and finally set the expand levelResultMatrix.withExpandedGroups(Collection)
.
(!) No support for setting a level which is nested.
Example:def resultMatrix = api.newMatrix('TextColumn1', 'TextColumn2', 'NumericColumn3', 'NumericColumn4') resultMatrix .withRows(entries) .withGroupBy(['TextColumn1', 'TextColumn2', 'NumericColumn3']) // The global expand group by data is turn off by default, thus needs to be turn on first // before setting the group by data expand level .withGroupByDataExpanded(true) .withExpandedGroups(['TextColumn1', 'TextColumn2']) // TextColumn1, TextColumn2 and NumericColumn3 are columns by which the grouping will be done // group by data will be expanded in two levels: TextColumn1 and TextColumn2 // The expandedGroups columns can be accessed by
ResultMatrix.getExpandedGroups()
def expandedGroups = resultMatrix.getExpandedGroups()- Specified by:
withExpandedGroups
in interfaceResultMatrix
- Parameters:
columns
- collection of columns' names for expand level while grouping, if null theResultMatrixGroupingException.NullException
will be thrown.- Returns:
ResultMatrix
with expandedGroups columns' names.- 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 MINExample:
// 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 interfaceResultMatrix
- Parameters:
numericColumn
- column with numeric data to proceed aggregation. If column contains non-numeric data or is not present inResultMatrix
's columns collection, theResultMatrixGroupingException.NotPartOfColumnsAttributeException
will be thrownaggregateFunctionType
- predefined aggregation type: AggregateFunctionType.AVG, AggregateFunctionType.SUM, AggregateFunctionType.COUNT, AggregateFunctionType.MAX or AggregateFunctionType.MIN- Returns:
ResultMatrix
with aggregation strategy updated- See Also:
-
withColumnAggregation
Deprecated.Description copied from interface:ResultMatrix
Aggregation strategy definition done by column name and aggregation value (ex. some constantString
). Aggregation value can be set as anyObject
.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 interfaceResultMatrix
- Parameters:
column
- column name, needs to be part of the ResultMatrix columns attributeaggregateValue
- any object, which will be presented in the groupBy record- See Also:
-
withColumnAggregations
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 anyObject
or aggregation functionResultMatrixGrouping.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 interfaceResultMatrix
- Parameters:
columnAggregations
- Map with numeric-column-name and aggregation type or value- Returns:
ResultMatrix
with aggregation strategy updated- See Also:
-
calculateGroupByData
Deprecated.Description copied from interface:ResultMatrix
Proceed grouping with groupBy columns (if missingResultMatrixGroupingException.NullOrEmptyException
is thrown) for numeric columns and aggregation strategy passed byResultMatrix.withColumnAggregation(String, Object)
orResultMatrix.withColumnAggregation(String, AggregateFunctionType)
orResultMatrix.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()
ResultMatrix
is created.
When aggregated rows arenull
theRESULT_MATRIX_NULL_ENTRIES_EXCEPTION
exception is thrown.- Specified by:
calculateGroupByData
in interfaceResultMatrix
- Returns:
ResultMatrix
with grouped and aggregated data (can be accessed byResultMatrix.getGroupByData()
- See Also:
-
withGroupByDataExpanded
Deprecated.Description copied from interface:ResultMatrix
Definition of global group by data expand. Default value isfalse
, which means group by data are collapsed. If set totrue
then all group by data are expanded. The expanded level can be limited byResultMatrix.withExpandedGroups(Collection)
Example:
def resultMatrix = api.newMatrix('TextColumn1', 'TextColumn2', 'NumericColumn3', 'NumericColumn4') resultMatrix.withRows(entries) .withGroupBy(['TextColumn1', 'TextColumn2', 'NumericColumn3']) .withGroupByDataExpanded(true) // ResultMatrix with global groupBy data expand set to true, then all groupBy data are expanded //
ResultMatrix.getExpandedGroups()
is equal toResultMatrix.getGroupBy()
- Specified by:
withGroupByDataExpanded
in interfaceResultMatrix
- Parameters:
isGroupByDataExpanded
- global flag to turn ontrue
or offfalse
(default behaviour).- Returns:
ResultMatrix
with global expand group by data set.- See Also:
-
withEnableGroupByControls
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.
- Specified by:
withEnableGroupByControls
in interfaceResultMatrix
- Parameters:
enableGroupByControls
- boolean value turning on or off the controls- Returns:
ResultMatrix
with new value for enableGroupByControls.- See Also:
-
withShowGroupByControls
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 ifResultMatrix.isEnableGroupByControls()
istrue
.
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:
The Group by controls are not displayed in the table: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.
- Specified by:
withShowGroupByControls
in interfaceResultMatrix
- Parameters:
showGroupByControls
- boolean value turning on or off the Group By controls- Returns:
ResultMatrix
with new value for showGroupByControls- See Also:
-
withShowGroupByColumns
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:
Group By columns are hidden: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.
- Specified by:
withShowGroupByColumns
in interfaceResultMatrix
- 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
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 theResultMatrix.getGroupByColumnLabel()
to retrieve the custom label.Example:
The "Group" column changed to "Custom Label":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"
- Specified by:
withGroupByColumnLabel
in interfaceResultMatrix
- Parameters:
groupColumnLabel
- The custom label for the Group By column.- Returns:
ResultMatrix
with the updated Group By column label.- See Also:
-
withRow
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 interfaceResultMatrix
- Parameters:
row
- Row as List
-
withRows
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 interfaceResultMatrix
- Parameters:
rows
- Row as List of Maps
-
addRow
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 interfaceResultMatrix
- Parameters:
values
- Row as Array
-
getColumns
Deprecated.Description copied from interface:ResultMatrix
Gets a list of defined columns- Specified by:
getColumns
in interfaceResultMatrix
- Returns:
- The columns
-
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 interfaceResultMatrix
- Returns:
- The frozen columns list
-
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 interfaceResultMatrix
- Returns:
- List of maps
-
findRow
Deprecated.Description copied from interface:ResultMatrix
Retrieves a particular row based on a value check- Specified by:
findRow
in interfaceResultMatrix
- Parameters:
key
- The column name to search onvalue
- The value to match the row's column value to- Returns:
- The row
-
withDefaultFormat
Deprecated.Description copied from interface:ResultMatrix
Sets a default column format- Specified by:
withDefaultFormat
in interfaceResultMatrix
- Parameters:
fft
-
-
getDefaultFormat
Deprecated.Description copied from interface:ResultMatrix
Gets the default format- Specified by:
getDefaultFormat
in interfaceResultMatrix
- Returns:
- Default format
-
getColumnFormats
Deprecated.Description copied from interface:ResultMatrix
Gets individual column formats (if specified)- Specified by:
getColumnFormats
in interfaceResultMatrix
- Returns:
- A Map with column name and format
-
withColumnFormat
Deprecated.Description copied from interface:ResultMatrix
Sets a column format for a specified column- Specified by:
withColumnFormat
in interfaceResultMatrix
- Parameters:
column
- The column namefft
- The format
-
getColumnTooltips
Deprecated.Description copied from interface:ResultMatrix
Gets the currently assigned column tooltips- Specified by:
getColumnTooltips
in interfaceResultMatrix
- Returns:
-
withColumnTooltip
Deprecated.Description copied from interface:ResultMatrix
Adds a tooltip to a column- Specified by:
withColumnTooltip
in interfaceResultMatrix
- Parameters:
column
- The column nametooltip
- The tooltip text
-
isEnableClientFilter
public boolean isEnableClientFilter()Deprecated.- Specified by:
isEnableClientFilter
in interfaceResultMatrix
-
withEnableClientFilter
Deprecated.- Specified by:
withEnableClientFilter
in interfaceResultMatrix
-
styledCell
Deprecated.Description copied from interface:ResultMatrix
Creates a styled cell that can then be added as row value- Specified by:
styledCell
in interfaceResultMatrix
- 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 interfaceResultMatrix
- Parameters:
value
- The value of the celltextColor
- The text color of the cellbgColor
- 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 interfaceResultMatrix
- Parameters:
value
- The value of the celltextColor
- The text color of the cellbgColor
- 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 interfaceResultMatrix
- Parameters:
value
- The value of the celltextColor
- The text color of the cellbgColor
- The background color of the cell (HTML hex value)weight
- The font weightalignment
- Cell alignement value (valid CSS)- Returns:
- The styled cell object
-
imageCell
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 interfaceResultMatrix
- Parameters:
value
- The image URL- Returns:
- The image cell object
-
libraryImage
Deprecated.- Specified by:
libraryImage
in interfaceResultMatrix
-
linkCell
public ResultMatrix.ResultMatrixLinkCell linkCell(Object value, String targetPage, Object targetPageState) Deprecated.- Specified by:
linkCell
in interfaceResultMatrix
-
linkButtonCell
public ResultMatrix.LinkButtonCell linkButtonCell(Object value, String targetPage, Object targetPageState, Object buttonState) Deprecated.better use the shorterResultMatrix.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 interfaceResultMatrix
-
backEndAction
public ResultMatrix.ResultMatrixBackEndCell backEndAction(String label, String url, String payload, String successMessage, String failMessage) Deprecated.- Specified by:
backEndAction
in interfaceResultMatrix
-
rowSelectionBackEndAction
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 providedid
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 interfaceResultMatrix
- Parameters:
id
- aString
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 interfaceResultMatrix
-
cells
Deprecated.- Specified by:
cells
in interfaceResultMatrix
-
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:
The embedded dashboard that receives the event could then look like:matrix.onRowSelection().triggerEvent(api.dashboardWideEvent("CustomerIdChanged-ED")).withColValueAsEventDataAttr("CustomerID", "customerId")
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 interfaceResultMatrix
- Returns:
- The selection event to further configure it in a flow pattern
-
toString
Deprecated. -
decideFormat
Deprecated. -
addFormatsToResultMatrix
public void addFormatsToResultMatrix()Deprecated.- Specified by:
addFormatsToResultMatrix
in interfaceResultMatrix
-
normalizeDateTimes
public void normalizeDateTimes()Deprecated.Description copied from interface:ResultMatrix
Search for non nullFieldFormatType.DATETIME
columns and convert them intoDateTime
- Specified by:
normalizeDateTimes
in interfaceResultMatrix
-
filter
Deprecated.
-
ResultMatrix