public class

ReportTransformHelper

extends Object
java.lang.Object
   ↳ com.microstrategy.web.app.transforms.ReportTransformHelper

Class Overview

ReportTransformHelper Provides utility functions used in various report transforms.

Summary

Constants
String CACHED_ADVANCED_DRILL_EDITOR_PROCESS_EVENT The key for cached object representing the advanced drill editor's processing event.
String CACHED_ADVANCED_DRILL_EVENT The key for cached object representing the advanced drill event for the report.
String CACHED_APPLIED_SORT_ARRAY The key for cached object representing the sort array used in grid transforms.
String CACHED_CONTEXT They key for cahced object representing the transform instance
String CACHED_DRILL_EDITOR_NAME The key for cached object representing the drill editor's name.
String CACHED_DRILL_EDITOR_PROCESS_EVENT The key for cached object representing the drill editor's processing event.
String CACHED_DRILL_EVENT The key for cached object representing the drill event for the report.
String CACHED_DRILL_FILTERONSELECTION_PROCESS_EVENT The key for cached object representing the drill editor's processing event for filter on selections case.
String CACHED_DRILL_FILTER_PAGEBY The key for cached object representing whether to filter on the page by elements when drilling.
String CACHED_FORMAL_PARAMETERS The key for cached object representing the list of all the formal parameters for the current transform.
String CACHED_IFRAME_REQUEST The key for cached object representing whether it's a iframe request.
String CACHED_IMAGE_FOLDER The key for cached object representing the image folder.
String CACHED_IS_NETSCAPE The key for cached object representing whether it is a netscape browser.
String CACHED_MAX_COL_HEADER_DEPTH The key for cached object representing the max col header depth.
String CACHED_SORT_EVENT The key for cached object representing the sort event.
String CACHED_SORT_SUBTOTAL_POSITION The key for cached object representing the position for subtotal sorting.
String CACHED_SPECIFY_ID_FOR_FOR_TITLE_CELL The key for cached object representing whether if we need to add the ID attribute to the TD cells for TITLEs.
String CACHED_SPECIFY_WIDTH_FOR_CELL The key for cached object representing whether we need to add the WIDTH attribute to the TD cell.
String CACHED_URL_TYPICAL_BEAN_STATES The key for cached object representing the url string for typical bean states.
String DRILL_RETAIN_PARENT_NO indicate that drill doesn't retain parent
String DRILL_RETAIN_PARENT_USE_DRILL_PATH indicate that whether drill retains parent depends on the drill path.
String DRILL_RETAIN_PARENT_YES indicate that drill retains parent
String DRILL_RETAIN_THRESHOLDS_NO indicate that drill doesn't retain thresholds
String DRILL_RETAIN_THRESHOLDS_USE_DRILL_PATH indicate that whether drill retains thresholds depends on the drill path.
String DRILL_RETAIN_THRESHOLDS_YES indicate that drill retains thresholds
String LOCK_COLUMN_HEADERS_PROPERTY_NAME The report property name for lock column headers
String LOCK_COLUMN_HEADERS_PROPERTY_OFF The report property value for lock row headers being OFF
String LOCK_COLUMN_HEADERS_PROPERTY_ON The report property value for lock column headers being ON
String LOCK_HEADERS_PROPERTY_GROUP The report property group name for lock headers
String LOCK_ROW_HEADERS_PROPERTY_NAME The report property name for lock row headers
String LOCK_ROW_HEADERS_PROPERTY_OFF The report property value for lock row headers being OFF
String LOCK_ROW_HEADERS_PROPERTY_ON The report property value for lock row headers being ON
int MAX_CACHED_OBJECTS The max number of cached objects in transform context for report transforms.
String SORT_ASCENDING indiate that the sort is in ascending order
String SORT_DESCENDING indiate that the sort is in descending order
String SORT_KEY_SEPERATOR
Public Constructors
ReportTransformHelper()
Public Methods
static String ReadReportSettings(ReportBean rb, String PropertySet, String PropertyName)
get report property value for DssXmlReportObjectMainTemplate object.
static boolean applyUserStyleToReport(ReportBean rb, Preferences prefs)
Applies the user's defined style if the Grid style preference is 'use my selected default grid style'.
static boolean checkDisplayEmptyReportMessageInRWD(WebIServerSession session)
static String convertToLocalizedStyleName(ReportBean rb, String name)
This method is deprecated. Use getLocalizedStyleName(int, String) instead
static boolean convertToNewStyleReport(ReportBean rb)
Converts a report to New Style.
static String determineDrillRetainParent(ReportBean rb, String preferenceValue)
whether the drill action will retain parent.
static String determineDrillRetainThreshold(ReportBean rb, String preferenceValue)
Determins how the drill action will retain thresholds.
static void displayCssFileContent(WebBean wb, MarkupOutput mo, String cssFileName)
Generate the content of the specified CSS file in the output.
static void displayCssFileContent(ReportBean rb, MarkupOutput mo, String cssFileName)
Generate the content of the specified CSS file in the output.
static void displayCssFileContent(AppContext appContext, MarkupOutput mo, String cssFileName)
Generate the content of the specified CSS file in the output.
static String generateColHeaderSortDisplayString(ReportBean rb, WebHeader header)
generate the sort display for column header.
static String generateColHeaderSortID(ReportBean rb, WebHeader header)
generat the sort id for column header.
static void generateFormattingContextMenu(MarkupOutput mo, ReportBean rb, int axis, int pos, String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)
generate Formatting context menu for the template unit specified by axis and position.
static void generateFormattingContextMenu(MarkupOutput mo, ReportBean rb, int pos, String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)
generate Formatting context menu for single metric.
static boolean generateMoveContextMenu(MarkupOutput mo, ReportBean rb, int pos, boolean isFirst, boolean isLast, boolean applyNow, String extraUrl, boolean isIFrame, ContextMenu rhMenu, ContextMenuManager cmm, EventManager eventManager)
generate a move RMC for a single metric specified by the position in the tempalte metrics collection.
static void generateMoveContextMenu(MarkupOutput mo, ReportBean rb, int axis, int pos, boolean isFirst, boolean isLast, String boneId, ContextMenu rhMenu, ContextMenuManager cmm, EventManager eventManager)
generate a move RMC for a template unit specified by axis and position.
static void generateMoveContextMenu(MarkupOutput mo, ReportBean rb, int axis, int pos, boolean isFirst, boolean isLast, boolean applyNow, String extraUrl, boolean isIFrame, ContextMenu rhMenu, ContextMenuManager cmm, EventManager eventManager)
generate a move RMC for a template unit specified by axis and position.
static void generateRemoveContextMenu(MarkupOutput mo, ReportBean rb, int pos, boolean applyNow, String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)
static void generateRemoveContextMenu(MarkupOutput mo, ReportBean rb, int axis, int pos, String boneId, ContextMenu rhMenu, EventManager eventManager)
generate Remove context menu for template unit specified by axis and position.
static void generateRemoveContextMenu(MarkupOutput mo, ReportBean rb, int axis, int pos, boolean applyNow, String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)
This method is deprecated. use ViewBeanTransformHelper instead
static void generateRemoveWorkingSetAllMetricsContextMenu(MarkupOutput mo, ReportBean rb, boolean applyNow, String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)
static void generateRemoveWorkingSetUnitContextMenu(MarkupOutput mo, ReportBean rb, WebObjectInfo object, boolean applyNow, String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)
generate Remove context menu for working set specified by axis and position.
static void generateRenameContextMenu(MarkupOutput mo, ReportBean rb, int key, String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)
generate rename context menu for template unit.
static String generateRowTitleSortID(WebTitle title, WebSubTitle subTitle)
generate the sort id for row title.
static String generateRowTitleSortID(WebSubTitle parentSubTitle, WebSubTitle childSubTitle, int axis)
generate the sort id for row title.
static WebFilter getFilter(ReportBean rb, int filterType)
get a filter object from a filter type.
static WebExpression getFilterExpression(ReportBean rb, int filterType)
get a filter expression from a filter type.
static WebEvent getMoveMetricEvent(ReportBean rb, String fromPos, String toPos, boolean applyNow)
get an event object for a move metric action.
static String getMoveMetricLink(ReportBean rb, String fromPos, String toPos, boolean applyNow, String extraURL, boolean addState, EventManager eventManager)
get a link for a move metric action.
static String getNoDataCustomMessage(WebIServerSession session)
static String getObjectIDInfo(WebTemplateUnit unit)
Based on the type of unit instance, obtain its ID
static int getObjectTypeInfo(WebTemplateUnit unit)
Get the object type defined for the WebTemplateUnit specified
static WebHeaders getPageByHeadersByIndex(ReportBean rb, WebGridHeaders pageHeaders, int titleIndex)
get pageby header list from index.
static WebEvent getRemoveMetricEvent(ReportBean rb, String metricPos, boolean applyNow)
get an event object for a remove metric action.
static String getRemoveMetricLink(ReportBean rb, String metricPos, boolean applyNow, String extraURL, boolean addState, EventManager eventManager)
This method is deprecated. use ViewBeanTransformHelper instead
static WebEvent getRemoveTemplateUnitEvent(ReportBean rb, String fromAxis, String fromPos, boolean applyNow)
This method is deprecated. use ViewBeanTransformHelper instead
static String getRemoveUnitLink(ReportBean rb, String fromAxis, String fromPos, boolean applyNow, String extraURL, boolean addState, EventManager eventManager)
This method is deprecated. Use ViewBeanTransformHelper instead
static WebEvent getRemoveWorkingSetAllMetricsEvent(ReportBean rb, boolean applyNow)
static WebEvent getRemoveWorkingSetUnitEvent(ReportBean rb, WebObjectInfo object, boolean applyNow)
get an event object for a remove action for a working set unit.
static String getReportInstancePropertyValue(ReportBean rb, int reportObjectType, String propertySetName, String propertyName)
get a report property value.
static String getReportPropertyValue(ReportBean rb, String propertyName)
get a report property value.
static String getReportStyleID(ReportBean rb)
get report style id from report property "SelectedAutostyleID".
static String getReportStyleLocalizedName(ReportBean rb)
get report localized style name.
static String getReportStyleName(ReportBean rb)
get report style name from report property "SelectedAutostyle".
static WebEvent getSinglePivotEvent(ReportBean rb, String fromAxis, String fromPos, String toAxis, String toPos, boolean applyNow)
get event object for a pivot action.
static String getSinglePivotLink(ReportBean rb, String fromAxis, String fromPos, String toAxis, String toPos, boolean applyNow, String extraURL, boolean addState, EventManager eventManager)
get a link for a pivot action.
static int getSortsubtotalPostion(ReportBean rb)
get the subtotal position for sorting.
static int getToPageByPosition(ReportBean rb)
get the target position for a pivot to pageby axis action.
static WebObjectInfo getWebObjectInfo(WebTemplateUnit unit)
static boolean ignoreOldStyle(ReportBean rb)
whether the report is old or new formatting, depending on the report property value "IgnoreOldStyle".
static boolean isNewDerivedElements(WebTitle title)
Returns whether the title object is new Derived Elements.
static boolean isTotal(WebHeader header)
return whether this header is a total header.
static String mapCssFileNameToStyleName(String fileName)
This method is deprecated. No replacement.
static String mapStyleNameToCssFileName(String styleName)
map a style name to a css file name.
static void renderHeaderCellFormat(ReportGridDisplayCell cell, WebHeader header, Locale locale)
static void renderMetricCellFormat(ReportGridCellMetricValue cell, WebRowValue rowValue, Locale locale)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String CACHED_ADVANCED_DRILL_EDITOR_PROCESS_EVENT

The key for cached object representing the advanced drill editor's processing event.

Constant Value: "5"

public static final String CACHED_ADVANCED_DRILL_EVENT

The key for cached object representing the advanced drill event for the report.

Constant Value: "3"

public static final String CACHED_APPLIED_SORT_ARRAY

The key for cached object representing the sort array used in grid transforms.

Constant Value: "8"

public static final String CACHED_CONTEXT

They key for cahced object representing the transform instance

Constant Value: "18"

public static final String CACHED_DRILL_EDITOR_NAME

The key for cached object representing the drill editor's name.

Constant Value: "9"

public static final String CACHED_DRILL_EDITOR_PROCESS_EVENT

The key for cached object representing the drill editor's processing event.

Constant Value: "4"

public static final String CACHED_DRILL_EVENT

The key for cached object representing the drill event for the report.

Constant Value: "1"

public static final String CACHED_DRILL_FILTERONSELECTION_PROCESS_EVENT

The key for cached object representing the drill editor's processing event for filter on selections case.

Constant Value: "6"

public static final String CACHED_DRILL_FILTER_PAGEBY

The key for cached object representing whether to filter on the page by elements when drilling.

Constant Value: "12"

public static final String CACHED_FORMAL_PARAMETERS

The key for cached object representing the list of all the formal parameters for the current transform.

Constant Value: "17"

public static final String CACHED_IFRAME_REQUEST

The key for cached object representing whether it's a iframe request.

Constant Value: "11"

public static final String CACHED_IMAGE_FOLDER

The key for cached object representing the image folder.

Constant Value: "2"

public static final String CACHED_IS_NETSCAPE

The key for cached object representing whether it is a netscape browser.

Constant Value: "13"

public static final String CACHED_MAX_COL_HEADER_DEPTH

The key for cached object representing the max col header depth.
This is required for the sorting functionality.

Constant Value: "16"

public static final String CACHED_SORT_EVENT

The key for cached object representing the sort event.

Constant Value: "7"

public static final String CACHED_SORT_SUBTOTAL_POSITION

The key for cached object representing the position for subtotal sorting.

Constant Value: "10"

public static final String CACHED_SPECIFY_ID_FOR_FOR_TITLE_CELL

The key for cached object representing whether if we need to add the ID attribute to the TD cells for TITLEs.
This is required for the Lock headers feature.

Constant Value: "15"

public static final String CACHED_SPECIFY_WIDTH_FOR_CELL

The key for cached object representing whether we need to add the WIDTH attribute to the TD cell.
This is required for the Lock headers feature.

Constant Value: "14"

public static final String CACHED_URL_TYPICAL_BEAN_STATES

The key for cached object representing the url string for typical bean states.

Constant Value: "0"

public static final String DRILL_RETAIN_PARENT_NO

indicate that drill doesn't retain parent

Constant Value: "0"

public static final String DRILL_RETAIN_PARENT_USE_DRILL_PATH

indicate that whether drill retains parent depends on the drill path.

Constant Value: "2"

public static final String DRILL_RETAIN_PARENT_YES

indicate that drill retains parent

Constant Value: "1"

public static final String DRILL_RETAIN_THRESHOLDS_NO

indicate that drill doesn't retain thresholds

Constant Value: "0"

public static final String DRILL_RETAIN_THRESHOLDS_USE_DRILL_PATH

indicate that whether drill retains thresholds depends on the drill path.

Constant Value: "2"

public static final String DRILL_RETAIN_THRESHOLDS_YES

indicate that drill retains thresholds

Constant Value: "1"

public static final String LOCK_COLUMN_HEADERS_PROPERTY_NAME

The report property name for lock column headers

Constant Value: "LockColumnHeaders"

public static final String LOCK_COLUMN_HEADERS_PROPERTY_OFF

The report property value for lock row headers being OFF

Constant Value: "0"

public static final String LOCK_COLUMN_HEADERS_PROPERTY_ON

The report property value for lock column headers being ON

Constant Value: "1"

public static final String LOCK_HEADERS_PROPERTY_GROUP

The report property group name for lock headers

Constant Value: "Template Formatting"

public static final String LOCK_ROW_HEADERS_PROPERTY_NAME

The report property name for lock row headers

Constant Value: "LockRowHeaders"

public static final String LOCK_ROW_HEADERS_PROPERTY_OFF

The report property value for lock row headers being OFF

Constant Value: "0"

public static final String LOCK_ROW_HEADERS_PROPERTY_ON

The report property value for lock row headers being ON

Constant Value: "1"

public static final int MAX_CACHED_OBJECTS

The max number of cached objects in transform context for report transforms.
The cached objects are stored in a hash table.

Constant Value: 17 (0x00000011)

public static final String SORT_ASCENDING

indiate that the sort is in ascending order

Constant Value: "1"

public static final String SORT_DESCENDING

indiate that the sort is in descending order

Constant Value: "0"

public static final String SORT_KEY_SEPERATOR

Constant Value: "!"

Public Constructors

public ReportTransformHelper ()

Public Methods

public static String ReadReportSettings (ReportBean rb, String PropertySet, String PropertyName)

get report property value for DssXmlReportObjectMainTemplate object.
This method is a special case of ReportTransformHelper.getReportInstancePropertyValue().

Parameters
rb the ReportBean object
PropertySet the property set name
PropertyName the property name
Returns
  • the property value

public static boolean applyUserStyleToReport (ReportBean rb, Preferences prefs)

Applies the user's defined style if the Grid style preference is 'use my selected default grid style'.

Parameters
rb ReportBean
prefs Preferences
Returns
  • true if the style was applied

public static boolean checkDisplayEmptyReportMessageInRWD (WebIServerSession session)

public static String convertToLocalizedStyleName (ReportBean rb, String name)

This method is deprecated.
Use getLocalizedStyleName(int, String) instead

convert the style name to localized name, depending on the current session.

Parameters
rb the ReportBean object
name the style name
Returns
  • localized name

public static boolean convertToNewStyleReport (ReportBean rb)

Converts a report to New Style. Expects the report bean to have been executed before.

Parameters
rb ReportBean
Returns
  • true if the style was applied

public static String determineDrillRetainParent (ReportBean rb, String preferenceValue)

whether the drill action will retain parent.
It depends on the report bean's information and the user preference value.
It returns "1"(true) or "0" (false).

Parameters
rb the ReportBean object
preferenceValue the preference value
Returns
  • whether the drill action retains parent

public static String determineDrillRetainThreshold (ReportBean rb, String preferenceValue)

Determins how the drill action will retain thresholds.
The returen value could be DRILL_RETAIN_THRESHOLDS_NO, DRILL_RETAIN_THRESHOLDS_YES or DRILL_RETAIN_THRESHOLDS_USE_DRILL_PATH.

Parameters
rb the ReportBean object
preferenceValue the preference value
Returns
  • how the drill action retains thresholds

public static void displayCssFileContent (WebBean wb, MarkupOutput mo, String cssFileName)

Generate the content of the specified CSS file in the output.
We assume the CSS file is located in the style folder.

Parameters
wb WebBean base instance
mo MarkupOutput where to save the HTML to render
cssFileName CSS file to read

public static void displayCssFileContent (ReportBean rb, MarkupOutput mo, String cssFileName)

Generate the content of the specified CSS file in the output.
We assume the CSS file is located in the style folder.

Parameters
rb ReportBean
mo MarkupOutput
cssFileName CSS file to read

public static void displayCssFileContent (AppContext appContext, MarkupOutput mo, String cssFileName)

Generate the content of the specified CSS file in the output.
We assume the CSS file is located in the style folder.

Parameters
appContext AppContext
mo MarkupOutput
cssFileName CSS file to read

public static String generateColHeaderSortDisplayString (ReportBean rb, WebHeader header)

generate the sort display for column header.

Parameters
rb the ReportBean object
header the WebHeader object
Returns
  • the sort display

public static String generateColHeaderSortID (ReportBean rb, WebHeader header)

generat the sort id for column header.

Parameters
rb the ReportBean object
header the WebHeader object
Returns
  • the sort id

public static void generateFormattingContextMenu (MarkupOutput mo, ReportBean rb, int axis, int pos, String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)

generate Formatting context menu for the template unit specified by axis and position.

Parameters
mo the MarkupOutput object
rb the ReportBean object
axis template unit axis
pos template unit position
extraUrl extra url info to the link
isIframe whether it is iframe enabled
rhMenu ContextMenu object
eventManager EventManager object

public static void generateFormattingContextMenu (MarkupOutput mo, ReportBean rb, int pos, String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)

generate Formatting context menu for single metric.
It uses the value sent as position (pos) minus one.

Parameters
mo the MarkupOutput object
rb the ReportBean object
pos metric position
extraUrl extra url info to the link
isIframe whether it is iframe enabled
rhMenu ContextMenu object
eventManager EventManager object

public static boolean generateMoveContextMenu (MarkupOutput mo, ReportBean rb, int pos, boolean isFirst, boolean isLast, boolean applyNow, String extraUrl, boolean isIFrame, ContextMenu rhMenu, ContextMenuManager cmm, EventManager eventManager)

generate a move RMC for a single metric specified by the position in the tempalte metrics collection.

Parameters
mo the MarkupOutput object
rb the ReportBean object
pos metric position
isFirst if it's the first metric
isLast if it's the last metric
applyNow whether to apply change
extraUrl extra url info to the link
isIFrame whether it is iframe
rhMenu ContextMenu object
cmm ContextMenuManager object
eventManager EventManager object
Returns
  • whether the move item is added to the context menu

public static void generateMoveContextMenu (MarkupOutput mo, ReportBean rb, int axis, int pos, boolean isFirst, boolean isLast, String boneId, ContextMenu rhMenu, ContextMenuManager cmm, EventManager eventManager)

generate a move RMC for a template unit specified by axis and position.

Parameters
mo the MarkupOutput object
rb the ReportBean object
axis template unit axis
pos template unit position
isFirst if it's the first unit in the axis
isLast if it's the last unit in the axis
boneId is the id of the client-side bone
rhMenu ContextMenu object
cmm ContextMenuManager object
eventManager EventManager object

public static void generateMoveContextMenu (MarkupOutput mo, ReportBean rb, int axis, int pos, boolean isFirst, boolean isLast, boolean applyNow, String extraUrl, boolean isIFrame, ContextMenu rhMenu, ContextMenuManager cmm, EventManager eventManager)

generate a move RMC for a template unit specified by axis and position.

Parameters
mo the MarkupOutput object
rb the ReportBean object
axis template unit axis
pos template unit position
isFirst if it's the first unit in the axis
isLast if it's the last unit in the axis
applyNow whether to apply change
extraUrl extra url info to the link
isIFrame whether it is iframe enabled
rhMenu ContextMenu object
cmm ContextMenuManager object
eventManager EventManager object

public static void generateRemoveContextMenu (MarkupOutput mo, ReportBean rb, int pos, boolean applyNow, String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)

This method is deprecated.
Please use generateRemoveContextMenu(ViewBean, int, boolean, String, boolean, ContextMenu, EventManager) instead

generate Remove context menu for a single metric specified by its position within the template metrics collection.

Parameters
mo the MarkupOutput object
rb the ReportBean object
pos metric position
applyNow whether to apply change
extraUrl extra url info to the link
isIframe whether it is iframe enabled
rhMenu ContextMenu object
eventManager EventManager object

public static void generateRemoveContextMenu (MarkupOutput mo, ReportBean rb, int axis, int pos, String boneId, ContextMenu rhMenu, EventManager eventManager)

generate Remove context menu for template unit specified by axis and position.

Parameters
mo the MarkupOutput object
rb the ReportBean object
axis template unit axis
pos template unit position
boneId is the id of the client-side bone
rhMenu ContextMenu object
eventManager EventManager object

public static void generateRemoveContextMenu (MarkupOutput mo, ReportBean rb, int axis, int pos, boolean applyNow, String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)

This method is deprecated.
use ViewBeanTransformHelper instead

generate Remove context menu for template unit specified by axis and position.

Parameters
mo the MarkupOutput object
rb the ReportBean object
axis template unit axis
pos template unit position
applyNow whether to apply change
extraUrl extra url info to the link
isIframe whether it is iframe enabled
rhMenu ContextMenu object
eventManager EventManager object

public static void generateRemoveWorkingSetAllMetricsContextMenu (MarkupOutput mo, ReportBean rb, boolean applyNow, String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)

Parameters
mo MarkupOutput instance where to save the HTML to render
rb ReportBean instance
applyNow boolean indicating if changes should be applied
extraUrl String
isIframe boolean indicating if it's iframe environment or not
rhMenu ContextMenu instance where to add the option
eventManager EventManager instance

public static void generateRemoveWorkingSetUnitContextMenu (MarkupOutput mo, ReportBean rb, WebObjectInfo object, boolean applyNow, String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)

generate Remove context menu for working set specified by axis and position.

Parameters
mo the MarkupOutput object
rb the ReportBean object
object the object to remove from the working set of the report
applyNow whether to apply change
extraUrl extra url info on the url
isIframe whether it is iframe enabled
rhMenu ContextMenu object
eventManager EventManager object

public static void generateRenameContextMenu (MarkupOutput mo, ReportBean rb, int key, String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)

generate rename context menu for template unit.

Parameters
mo the MarkupOutput object
rb the ReportBean object
key integer value with the key of the object to be renamed
extraUrl extra url info to the link
isIframe whether it is iframe enabled
rhMenu ContextMenu object
eventManager EventManager object

public static String generateRowTitleSortID (WebTitle title, WebSubTitle subTitle)

generate the sort id for row title.

Parameters
title WebTitle object
subTitle WebSubTitle object
Returns
  • the sort id

public static String generateRowTitleSortID (WebSubTitle parentSubTitle, WebSubTitle childSubTitle, int axis)

generate the sort id for row title.

Parameters
parentSubTitle WebSubTitle object
childSubTitle WebSubTitle object
Returns
  • the sort id

public static WebFilter getFilter (ReportBean rb, int filterType)

get a filter object from a filter type.

Parameters
rb the ReportBean object
filterType the filter type from EnumFilterTypes
Returns

public static WebExpression getFilterExpression (ReportBean rb, int filterType)

get a filter expression from a filter type.

Parameters
rb the ReportBean object
filterType the filter type from EnumFilterTypes
Returns

public static WebEvent getMoveMetricEvent (ReportBean rb, String fromPos, String toPos, boolean applyNow)

get an event object for a move metric action.

Parameters
rb the ReportBean object
fromPos the origin position
toPos the target position
applyNow whether to apply change
Returns
  • the event object

public static String getMoveMetricLink (ReportBean rb, String fromPos, String toPos, boolean applyNow, String extraURL, boolean addState, EventManager eventManager)

get a link for a move metric action.

Parameters
rb the ReportBean object
fromPos the origin position
toPos the target position
applyNow whether to apply change
extraURL extra url information to append
addState whether add the beans's state
eventManager EventManager object
Returns
  • the link as String

public static String getNoDataCustomMessage (WebIServerSession session)

public static String getObjectIDInfo (WebTemplateUnit unit)

Based on the type of unit instance, obtain its ID

Parameters
unit WebTemplateUnit instance to analyze
Returns
  • String value with the object ID information.

public static int getObjectTypeInfo (WebTemplateUnit unit)

Get the object type defined for the WebTemplateUnit specified

Parameters
unit WebTemplateUnit instance to analyze
Returns

public static WebHeaders getPageByHeadersByIndex (ReportBean rb, WebGridHeaders pageHeaders, int titleIndex)

get pageby header list from index.
Depending on whether the report is using DssXmlResultPageTreeStyle, we analyse differently.

Parameters
rb the ReportBean object
pageHeaders the pageby headers
titleIndex the index of the pageby item in the pageby axis
Returns
  • the pageby header at that index

public static WebEvent getRemoveMetricEvent (ReportBean rb, String metricPos, boolean applyNow)

get an event object for a remove metric action.

Parameters
rb the ReportBean object
metricPos the metric position
applyNow whether to apply change
Returns
  • the event object

public static String getRemoveMetricLink (ReportBean rb, String metricPos, boolean applyNow, String extraURL, boolean addState, EventManager eventManager)

This method is deprecated.
use ViewBeanTransformHelper instead

get a link for a remove metric action.

Parameters
rb the ReportBean object
metricPos the metric position
applyNow whether to apply change
extraURL extra url information to append
addState whether add the beans's state
eventManager EventManager object
Returns
  • the link as String

public static WebEvent getRemoveTemplateUnitEvent (ReportBean rb, String fromAxis, String fromPos, boolean applyNow)

This method is deprecated.
use ViewBeanTransformHelper instead

get an event object for a remove action.

Parameters
rb the ReportBean object
fromAxis the origin axis
fromPos the origin position
applyNow whether to apply change
Returns
  • the event object

public static String getRemoveUnitLink (ReportBean rb, String fromAxis, String fromPos, boolean applyNow, String extraURL, boolean addState, EventManager eventManager)

This method is deprecated.
Use ViewBeanTransformHelper instead

get a link for a remove action for a template unit.

Parameters
rb the ReportBean object
fromAxis the origin axis
fromPos the origin position
applyNow whether to apply change
extraURL extra url information to append
addState whether add the beans's state
eventManager EventManager object
Returns
  • the link as String

public static WebEvent getRemoveWorkingSetAllMetricsEvent (ReportBean rb, boolean applyNow)

Parameters
rb ReportBean
applyNow boolean
Returns

public static WebEvent getRemoveWorkingSetUnitEvent (ReportBean rb, WebObjectInfo object, boolean applyNow)

get an event object for a remove action for a working set unit.

Parameters
rb the ReportBean object
object the working set object
applyNow whether to apply change
Returns
  • the event object

public static String getReportInstancePropertyValue (ReportBean rb, int reportObjectType, String propertySetName, String propertyName)

get a report property value.
It can retrieve any property in any property set. Thus it may trigger a Iserver call.

Parameters
rb the ReportBean object
reportObjectType the object type (EnumDSSXMLReportObjects) for which the property will be
propertySetName the property name
propertyName the property name
Returns
  • the property value

public static String getReportPropertyValue (ReportBean rb, String propertyName)

get a report property value.
it may return "" if it's not in the webProperties list returned by I-server.
The list is:
WebGridProperties WebGridAutoStyle GridSortInfo ReportSourcePage ReportStyle HasSubtotals DrillingOptions DrillingEnableReportDrilling DrillingKeepParent MergeCells GraphFormat Indented OutlineLevelsExpanded SelectedAutostyle BandingOptions SelectedAutostyleID IgnoreOldStyle DrillingKeepParentEx DrillingThresholds

Parameters
rb the ReportBean object
propertyName the property name
Returns
  • the property value

public static String getReportStyleID (ReportBean rb)

get report style id from report property "SelectedAutostyleID".

Parameters
rb the report bean object
Returns
  • report style id

public static String getReportStyleLocalizedName (ReportBean rb)

get report localized style name.

Parameters
rb the report bean object
Returns
  • localized style name

public static String getReportStyleName (ReportBean rb)

get report style name from report property "SelectedAutostyle".
For old 6.x reports, we will read from report property "WebGridAutoStyle".

Parameters
rb the report bean object
Returns
  • report style name from report property

public static WebEvent getSinglePivotEvent (ReportBean rb, String fromAxis, String fromPos, String toAxis, String toPos, boolean applyNow)

get event object for a pivot action.

Parameters
rb the ReportBean object
fromAxis the origin axis
fromPos the origin position
toAxis the target axis
toPos the target position
applyNow whether to apply change
Returns

public static String getSinglePivotLink (ReportBean rb, String fromAxis, String fromPos, String toAxis, String toPos, boolean applyNow, String extraURL, boolean addState, EventManager eventManager)

get a link for a pivot action.

Parameters
rb the ReportBean object
fromAxis the origin axis
fromPos the origin position
toAxis the target axis
toPos the target position
applyNow whether to apply change
extraURL extra url information to append
addState whether add the beans's state
eventManager EventManager object
Returns
  • the link as String

public static int getSortsubtotalPostion (ReportBean rb)

get the subtotal position for sorting.

Parameters
rb the ReportBean object
Returns
  • the subtotal position for sorting

public static int getToPageByPosition (ReportBean rb)

get the target position for a pivot to pageby axis action.
Out of box, we pivot the unit to the end of the pageby axis.

Parameters
rb the report bean object
Returns
  • the target position

public static WebObjectInfo getWebObjectInfo (WebTemplateUnit unit)

Parameters
unit WebTemplateUnit object
Returns

public static boolean ignoreOldStyle (ReportBean rb)

whether the report is old or new formatting, depending on the report property value "IgnoreOldStyle".

Parameters
rb the ReportBean object
Returns
  • whether the report is old or new formatting

public static boolean isNewDerivedElements (WebTitle title)

Returns whether the title object is new Derived Elements.

Parameters
title WebTitle object
Returns
  • whether the title object is new Derived Elements

public static boolean isTotal (WebHeader header)

return whether this header is a total header.

Parameters
header the WebHeader object
Returns
  • whether this header is a total header

public static String mapCssFileNameToStyleName (String fileName)

This method is deprecated.
No replacement.

map a css file name to a style name.
For example, the fileName is passed in as "ReportTransformGridAccounting", the returned value will be "Accounting".

Parameters
fileName css file name
Returns
  • style name

public static String mapStyleNameToCssFileName (String styleName)

map a style name to a css file name.
For example, the styleName is passed in as "Accounting", the returned value will be "ReportTransformGridAccounting".

Parameters
styleName style name
Returns
  • css file name

public static void renderHeaderCellFormat (ReportGridDisplayCell cell, WebHeader header, Locale locale)

public static void renderMetricCellFormat (ReportGridCellMetricValue cell, WebRowValue rowValue, Locale locale)

Throws
IllegalArgumentException