Class ReportTransformHelper
- java.lang.Object
-
- com.microstrategy.web.app.transforms.ReportTransformHelper
-
public class ReportTransformHelper extends java.lang.ObjectReportTransformHelper Provides utility functions used in various report transforms.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCACHED_ADVANCED_DRILL_EDITOR_PROCESS_EVENTThe key for cached object representing the advanced drill editor's processing event.static java.lang.StringCACHED_ADVANCED_DRILL_EVENTThe key for cached object representing the advanced drill event for the report.static java.lang.StringCACHED_APPLIED_SORT_ARRAYThe key for cached object representing the sort array used in grid transforms.static java.lang.StringCACHED_CONTEXTThey key for cahced object representing the transform instancestatic java.lang.StringCACHED_DRILL_EDITOR_NAMEThe key for cached object representing the drill editor's name.static java.lang.StringCACHED_DRILL_EDITOR_PROCESS_EVENTThe key for cached object representing the drill editor's processing event.static java.lang.StringCACHED_DRILL_EVENTThe key for cached object representing the drill event for the report.static java.lang.StringCACHED_DRILL_FILTER_PAGEBYThe key for cached object representing whether to filter on the page by elements when drilling.static java.lang.StringCACHED_DRILL_FILTERONSELECTION_PROCESS_EVENTThe key for cached object representing the drill editor's processing event for filter on selections case.static java.lang.StringCACHED_FORMAL_PARAMETERSThe key for cached object representing the list of all the formal parameters for the current transform.static java.lang.StringCACHED_IFRAME_REQUESTThe key for cached object representing whether it's a iframe request.static java.lang.StringCACHED_IMAGE_FOLDERThe key for cached object representing the image folder.static java.lang.StringCACHED_IS_NETSCAPEThe key for cached object representing whether it is a netscape browser.static java.lang.StringCACHED_MAX_COL_HEADER_DEPTHThe key for cached object representing the max col header depth.static java.lang.StringCACHED_SORT_EVENTThe key for cached object representing the sort event.static java.lang.StringCACHED_SORT_SUBTOTAL_POSITIONThe key for cached object representing the position for subtotal sorting.static java.lang.StringCACHED_SPECIFY_ID_FOR_FOR_TITLE_CELLThe key for cached object representing whether if we need to add the ID attribute to the TD cells for TITLEs.static java.lang.StringCACHED_SPECIFY_WIDTH_FOR_CELLThe key for cached object representing whether we need to add the WIDTH attribute to the TD cell.static java.lang.StringCACHED_URL_TYPICAL_BEAN_STATESThe key for cached object representing the url string for typical bean states.static java.lang.StringDRILL_RETAIN_PARENT_NOindicate that drill doesn't retain parentstatic java.lang.StringDRILL_RETAIN_PARENT_USE_DRILL_PATHindicate that whether drill retains parent depends on the drill path.static java.lang.StringDRILL_RETAIN_PARENT_YESindicate that drill retains parentstatic java.lang.StringDRILL_RETAIN_THRESHOLDS_NOindicate that drill doesn't retain thresholdsstatic java.lang.StringDRILL_RETAIN_THRESHOLDS_USE_DRILL_PATHindicate that whether drill retains thresholds depends on the drill path.static java.lang.StringDRILL_RETAIN_THRESHOLDS_YESindicate that drill retains thresholdsstatic java.lang.StringLOCK_COLUMN_HEADERS_PROPERTY_NAMEThe report property name for lock column headersstatic java.lang.StringLOCK_COLUMN_HEADERS_PROPERTY_OFFThe report property value for lock row headers being OFFstatic java.lang.StringLOCK_COLUMN_HEADERS_PROPERTY_ONThe report property value for lock column headers being ONstatic java.lang.StringLOCK_HEADERS_PROPERTY_GROUPThe report property group name for lock headersstatic java.lang.StringLOCK_ROW_HEADERS_PROPERTY_NAMEThe report property name for lock row headersstatic java.lang.StringLOCK_ROW_HEADERS_PROPERTY_OFFThe report property value for lock row headers being OFFstatic java.lang.StringLOCK_ROW_HEADERS_PROPERTY_ONThe report property value for lock row headers being ONstatic intMAX_CACHED_OBJECTSThe max number of cached objects in transform context for report transforms.static java.lang.StringSORT_ASCENDINGindiate that the sort is in ascending orderstatic java.lang.StringSORT_DESCENDINGindiate that the sort is in descending orderstatic java.lang.StringSORT_KEY_SEPERATOR
-
Constructor Summary
Constructors Constructor Description ReportTransformHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanapplyUserStyleToReport(ReportBean rb, Preferences prefs)Applies the user's defined style if the Grid style preference is 'use my selected default grid style'.static booleancheckDisplayEmptyReportMessageInRWD(WebIServerSession session)static java.lang.StringconvertToLocalizedStyleName(ReportBean rb, java.lang.String name)Deprecated.static booleanconvertToNewStyleReport(ReportBean rb)Converts a report to New Style.static java.lang.StringdetermineDrillRetainParent(ReportBean rb, java.lang.String preferenceValue)whether the drill action will retain parent.static java.lang.StringdetermineDrillRetainThreshold(ReportBean rb, java.lang.String preferenceValue)Determins how the drill action will retain thresholds.static voiddisplayCssFileContent(AppContext appContext, MarkupOutput mo, java.lang.String cssFileName)Generate the content of the specified CSS file in the output.static voiddisplayCssFileContent(ReportBean rb, MarkupOutput mo, java.lang.String cssFileName)Generate the content of the specified CSS file in the output.static voiddisplayCssFileContent(WebBean wb, MarkupOutput mo, java.lang.String cssFileName)Generate the content of the specified CSS file in the output.static java.lang.StringgenerateColHeaderSortDisplayString(ReportBean rb, WebHeader header)generate the sort display for column header.static java.lang.StringgenerateColHeaderSortID(ReportBean rb, WebHeader header)generat the sort id for column header.static voidgenerateFormattingContextMenu(MarkupOutput mo, ReportBean rb, int axis, int pos, java.lang.String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)generate Formatting context menu for the template unit specified by axis and position.static voidgenerateFormattingContextMenu(MarkupOutput mo, ReportBean rb, int pos, java.lang.String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)generate Formatting context menu for single metric.static booleangenerateMoveContextMenu(MarkupOutput mo, ReportBean rb, int pos, boolean isFirst, boolean isLast, boolean applyNow, java.lang.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 voidgenerateMoveContextMenu(MarkupOutput mo, ReportBean rb, int axis, int pos, boolean isFirst, boolean isLast, boolean applyNow, java.lang.String extraUrl, boolean isIFrame, ContextMenu rhMenu, ContextMenuManager cmm, EventManager eventManager)generate a move RMC for a template unit specified by axis and position.static voidgenerateMoveContextMenu(MarkupOutput mo, ReportBean rb, int axis, int pos, boolean isFirst, boolean isLast, java.lang.String boneId, ContextMenu rhMenu, ContextMenuManager cmm, EventManager eventManager)generate a move RMC for a template unit specified by axis and position.static voidgenerateRemoveContextMenu(MarkupOutput mo, ReportBean rb, int pos, boolean applyNow, java.lang.String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)static voidgenerateRemoveContextMenu(MarkupOutput mo, ReportBean rb, int axis, int pos, boolean applyNow, java.lang.String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)Deprecated.useViewBeanTransformHelperinsteadstatic voidgenerateRemoveContextMenu(MarkupOutput mo, ReportBean rb, int axis, int pos, java.lang.String boneId, ContextMenu rhMenu, EventManager eventManager)generate Remove context menu for template unit specified by axis and position.static voidgenerateRemoveWorkingSetAllMetricsContextMenu(MarkupOutput mo, ReportBean rb, boolean applyNow, java.lang.String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)static voidgenerateRemoveWorkingSetUnitContextMenu(MarkupOutput mo, ReportBean rb, WebObjectInfo object, boolean applyNow, java.lang.String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)generate Remove context menu for working set specified by axis and position.static voidgenerateRenameContextMenu(MarkupOutput mo, ReportBean rb, int key, java.lang.String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)generate rename context menu for template unit.static java.lang.StringgenerateRowTitleSortID(WebSubTitle parentSubTitle, WebSubTitle childSubTitle, int axis)generate the sort id for row title.static java.lang.StringgenerateRowTitleSortID(WebTitle title, WebSubTitle subTitle)generate the sort id for row title.static WebFiltergetFilter(ReportBean rb, int filterType)get a filter object from a filter type.static WebExpressiongetFilterExpression(ReportBean rb, int filterType)get a filter expression from a filter type.static WebEventgetMoveMetricEvent(ReportBean rb, java.lang.String fromPos, java.lang.String toPos, boolean applyNow)get an event object for a move metric action.static java.lang.StringgetMoveMetricLink(ReportBean rb, java.lang.String fromPos, java.lang.String toPos, boolean applyNow, java.lang.String extraURL, boolean addState, EventManager eventManager)get a link for a move metric action.static java.lang.StringgetNoDataCustomMessage(WebIServerSession session)static java.lang.StringgetObjectIDInfo(WebTemplateUnit unit)Based on the type of unit instance, obtain its IDstatic intgetObjectTypeInfo(WebTemplateUnit unit)Get the object type defined for theWebTemplateUnitspecifiedstatic WebHeadersgetPageByHeadersByIndex(ReportBean rb, WebGridHeaders pageHeaders, int titleIndex)get pageby header list from index.static WebEventgetRemoveMetricEvent(ReportBean rb, java.lang.String metricPos, boolean applyNow)get an event object for a remove metric action.static java.lang.StringgetRemoveMetricLink(ReportBean rb, java.lang.String metricPos, boolean applyNow, java.lang.String extraURL, boolean addState, EventManager eventManager)Deprecated.useViewBeanTransformHelperinsteadstatic WebEventgetRemoveTemplateUnitEvent(ReportBean rb, java.lang.String fromAxis, java.lang.String fromPos, boolean applyNow)Deprecated.useViewBeanTransformHelperinsteadstatic java.lang.StringgetRemoveUnitLink(ReportBean rb, java.lang.String fromAxis, java.lang.String fromPos, boolean applyNow, java.lang.String extraURL, boolean addState, EventManager eventManager)Deprecated.UseViewBeanTransformHelperinsteadstatic WebEventgetRemoveWorkingSetAllMetricsEvent(ReportBean rb, boolean applyNow)static WebEventgetRemoveWorkingSetUnitEvent(ReportBean rb, WebObjectInfo object, boolean applyNow)get an event object for a remove action for a working set unit.static java.lang.StringgetReportInstancePropertyValue(ReportBean rb, int reportObjectType, java.lang.String propertySetName, java.lang.String propertyName)get a report property value.static java.lang.StringgetReportPropertyValue(ReportBean rb, java.lang.String propertyName)get a report property value.static java.lang.StringgetReportStyleID(ReportBean rb)get report style id from report property "SelectedAutostyleID".static java.lang.StringgetReportStyleLocalizedName(ReportBean rb)get report localized style name.static java.lang.StringgetReportStyleName(ReportBean rb)get report style name from report property "SelectedAutostyle".static WebEventgetSinglePivotEvent(ReportBean rb, java.lang.String fromAxis, java.lang.String fromPos, java.lang.String toAxis, java.lang.String toPos, boolean applyNow)get event object for a pivot action.static java.lang.StringgetSinglePivotLink(ReportBean rb, java.lang.String fromAxis, java.lang.String fromPos, java.lang.String toAxis, java.lang.String toPos, boolean applyNow, java.lang.String extraURL, boolean addState, EventManager eventManager)get a link for a pivot action.static intgetSortsubtotalPostion(ReportBean rb)get the subtotal position for sorting.static intgetToPageByPosition(ReportBean rb)get the target position for a pivot to pageby axis action.static WebObjectInfogetWebObjectInfo(WebTemplateUnit unit)static booleanignoreOldStyle(ReportBean rb)whether the report is old or new formatting, depending on the report property value "IgnoreOldStyle".static booleanisNewDerivedElements(WebTitle title)Returns whether the title object is new Derived Elements.static booleanisTotal(WebHeader header)return whether this header is a total header.static java.lang.StringmapCssFileNameToStyleName(java.lang.String fileName)Deprecated.static java.lang.StringmapStyleNameToCssFileName(java.lang.String styleName)map a style name to a css file name.static java.lang.StringReadReportSettings(ReportBean rb, java.lang.String PropertySet, java.lang.String PropertyName)get report property value for DssXmlReportObjectMainTemplate object.static voidrenderHeaderCellFormat(ReportGridDisplayCell cell, WebHeader header, java.util.Locale locale)static voidrenderMetricCellFormat(ReportGridCellMetricValue cell, WebRowValue rowValue, java.util.Locale locale)
-
-
-
Field Detail
-
MAX_CACHED_OBJECTS
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.- See Also:
- Constant Field Values
-
CACHED_URL_TYPICAL_BEAN_STATES
public static final java.lang.String CACHED_URL_TYPICAL_BEAN_STATES
The key for cached object representing the url string for typical bean states.- Since:
- MicroStrategy Web 8.0.0
- See Also:
- Constant Field Values
-
CACHED_DRILL_EVENT
public static final java.lang.String CACHED_DRILL_EVENT
The key for cached object representing the drill event for the report.- See Also:
- Constant Field Values
-
CACHED_IMAGE_FOLDER
public static final java.lang.String CACHED_IMAGE_FOLDER
The key for cached object representing the image folder.- See Also:
- Constant Field Values
-
CACHED_ADVANCED_DRILL_EVENT
public static final java.lang.String CACHED_ADVANCED_DRILL_EVENT
The key for cached object representing the advanced drill event for the report.- See Also:
- Constant Field Values
-
CACHED_DRILL_EDITOR_PROCESS_EVENT
public static final java.lang.String CACHED_DRILL_EDITOR_PROCESS_EVENT
The key for cached object representing the drill editor's processing event.- See Also:
- Constant Field Values
-
CACHED_ADVANCED_DRILL_EDITOR_PROCESS_EVENT
public static final java.lang.String CACHED_ADVANCED_DRILL_EDITOR_PROCESS_EVENT
The key for cached object representing the advanced drill editor's processing event.- See Also:
- Constant Field Values
-
CACHED_DRILL_FILTERONSELECTION_PROCESS_EVENT
public static final java.lang.String CACHED_DRILL_FILTERONSELECTION_PROCESS_EVENT
The key for cached object representing the drill editor's processing event for filter on selections case.- See Also:
- Constant Field Values
-
CACHED_SORT_EVENT
public static final java.lang.String CACHED_SORT_EVENT
The key for cached object representing the sort event.- See Also:
- Constant Field Values
-
CACHED_APPLIED_SORT_ARRAY
public static final java.lang.String CACHED_APPLIED_SORT_ARRAY
The key for cached object representing the sort array used in grid transforms.- See Also:
- Constant Field Values
-
CACHED_DRILL_EDITOR_NAME
public static final java.lang.String CACHED_DRILL_EDITOR_NAME
The key for cached object representing the drill editor's name.- See Also:
- Constant Field Values
-
CACHED_SORT_SUBTOTAL_POSITION
public static final java.lang.String CACHED_SORT_SUBTOTAL_POSITION
The key for cached object representing the position for subtotal sorting.- See Also:
- Constant Field Values
-
CACHED_IFRAME_REQUEST
public static final java.lang.String CACHED_IFRAME_REQUEST
The key for cached object representing whether it's a iframe request.- See Also:
- Constant Field Values
-
CACHED_DRILL_FILTER_PAGEBY
public static final java.lang.String CACHED_DRILL_FILTER_PAGEBY
The key for cached object representing whether to filter on the page by elements when drilling.- See Also:
- Constant Field Values
-
CACHED_IS_NETSCAPE
public static final java.lang.String CACHED_IS_NETSCAPE
The key for cached object representing whether it is a netscape browser.- See Also:
- Constant Field Values
-
CACHED_SPECIFY_WIDTH_FOR_CELL
public static final java.lang.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.- See Also:
- Constant Field Values
-
CACHED_SPECIFY_ID_FOR_FOR_TITLE_CELL
public static final java.lang.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.- See Also:
- Constant Field Values
-
CACHED_MAX_COL_HEADER_DEPTH
public static final java.lang.String CACHED_MAX_COL_HEADER_DEPTH
The key for cached object representing the max col header depth.
This is required for the sorting functionality.- See Also:
- Constant Field Values
-
CACHED_FORMAL_PARAMETERS
public static final java.lang.String CACHED_FORMAL_PARAMETERS
The key for cached object representing the list of all the formal parameters for the current transform.- See Also:
- Constant Field Values
-
CACHED_CONTEXT
public static final java.lang.String CACHED_CONTEXT
They key for cahced object representing the transform instance- Since:
- MicroStrategy Web 8.0.1
- See Also:
- Constant Field Values
-
SORT_DESCENDING
public static final java.lang.String SORT_DESCENDING
indiate that the sort is in descending order- See Also:
- Constant Field Values
-
SORT_ASCENDING
public static final java.lang.String SORT_ASCENDING
indiate that the sort is in ascending order- See Also:
- Constant Field Values
-
SORT_KEY_SEPERATOR
public static final java.lang.String SORT_KEY_SEPERATOR
- See Also:
- Constant Field Values
-
DRILL_RETAIN_THRESHOLDS_NO
public static final java.lang.String DRILL_RETAIN_THRESHOLDS_NO
indicate that drill doesn't retain thresholds- See Also:
- Constant Field Values
-
DRILL_RETAIN_THRESHOLDS_YES
public static final java.lang.String DRILL_RETAIN_THRESHOLDS_YES
indicate that drill retains thresholds- See Also:
- Constant Field Values
-
DRILL_RETAIN_THRESHOLDS_USE_DRILL_PATH
public static final java.lang.String DRILL_RETAIN_THRESHOLDS_USE_DRILL_PATH
indicate that whether drill retains thresholds depends on the drill path.- See Also:
- Constant Field Values
-
DRILL_RETAIN_PARENT_NO
public static final java.lang.String DRILL_RETAIN_PARENT_NO
indicate that drill doesn't retain parent- Since:
- MicroStrategy Web 7.5.0
- See Also:
- Constant Field Values
-
DRILL_RETAIN_PARENT_YES
public static final java.lang.String DRILL_RETAIN_PARENT_YES
indicate that drill retains parent- Since:
- MicroStrategy Web 7.5.0
- See Also:
- Constant Field Values
-
DRILL_RETAIN_PARENT_USE_DRILL_PATH
public static final java.lang.String DRILL_RETAIN_PARENT_USE_DRILL_PATH
indicate that whether drill retains parent depends on the drill path.- Since:
- MicroStrategy Web 7.5.0
- See Also:
- Constant Field Values
-
LOCK_HEADERS_PROPERTY_GROUP
public static final java.lang.String LOCK_HEADERS_PROPERTY_GROUP
The report property group name for lock headers- See Also:
- Constant Field Values
-
LOCK_ROW_HEADERS_PROPERTY_NAME
public static final java.lang.String LOCK_ROW_HEADERS_PROPERTY_NAME
The report property name for lock row headers- See Also:
- Constant Field Values
-
LOCK_ROW_HEADERS_PROPERTY_ON
public static final java.lang.String LOCK_ROW_HEADERS_PROPERTY_ON
The report property value for lock row headers being ON- See Also:
- Constant Field Values
-
LOCK_ROW_HEADERS_PROPERTY_OFF
public static final java.lang.String LOCK_ROW_HEADERS_PROPERTY_OFF
The report property value for lock row headers being OFF- See Also:
- Constant Field Values
-
LOCK_COLUMN_HEADERS_PROPERTY_NAME
public static final java.lang.String LOCK_COLUMN_HEADERS_PROPERTY_NAME
The report property name for lock column headers- See Also:
- Constant Field Values
-
LOCK_COLUMN_HEADERS_PROPERTY_ON
public static final java.lang.String LOCK_COLUMN_HEADERS_PROPERTY_ON
The report property value for lock column headers being ON- See Also:
- Constant Field Values
-
LOCK_COLUMN_HEADERS_PROPERTY_OFF
public static final java.lang.String LOCK_COLUMN_HEADERS_PROPERTY_OFF
The report property value for lock row headers being OFF- See Also:
- Constant Field Values
-
-
Method Detail
-
getSinglePivotLink
public static java.lang.String getSinglePivotLink(ReportBean rb, java.lang.String fromAxis, java.lang.String fromPos, java.lang.String toAxis, java.lang.String toPos, boolean applyNow, java.lang.String extraURL, boolean addState, EventManager eventManager)
get a link for a pivot action.- Parameters:
rb- the ReportBean objectfromAxis- the origin axisfromPos- the origin positiontoAxis- the target axistoPos- the target positionapplyNow- whether to apply changeextraURL- extra url information to appendaddState- whether add the beans's stateeventManager- EventManager object- Returns:
- the link as String
-
getSinglePivotEvent
public static WebEvent getSinglePivotEvent(ReportBean rb, java.lang.String fromAxis, java.lang.String fromPos, java.lang.String toAxis, java.lang.String toPos, boolean applyNow)
get event object for a pivot action.- Parameters:
rb- the ReportBean objectfromAxis- the origin axisfromPos- the origin positiontoAxis- the target axistoPos- the target positionapplyNow- whether to apply change- Returns:
- the
WebEventobject
-
getRemoveUnitLink
public static java.lang.String getRemoveUnitLink(ReportBean rb, java.lang.String fromAxis, java.lang.String fromPos, boolean applyNow, java.lang.String extraURL, boolean addState, EventManager eventManager)
Deprecated.UseViewBeanTransformHelperinsteadget a link for a remove action for a template unit.- Parameters:
rb- the ReportBean objectfromAxis- the origin axisfromPos- the origin positionapplyNow- whether to apply changeextraURL- extra url information to appendaddState- whether add the beans's stateeventManager- EventManager object- Returns:
- the link as String
-
getRemoveWorkingSetUnitEvent
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 objectobject- the working set objectapplyNow- whether to apply change- Returns:
- the event object
-
getRemoveWorkingSetAllMetricsEvent
public static WebEvent getRemoveWorkingSetAllMetricsEvent(ReportBean rb, boolean applyNow)
- Parameters:
rb-ReportBeanapplyNow- boolean- Returns:
WebEvent- Since:
- MicroStrategy Web 7.5.1
-
getRemoveTemplateUnitEvent
public static WebEvent getRemoveTemplateUnitEvent(ReportBean rb, java.lang.String fromAxis, java.lang.String fromPos, boolean applyNow)
Deprecated.useViewBeanTransformHelperinsteadget an event object for a remove action.- Parameters:
rb- the ReportBean objectfromAxis- the origin axisfromPos- the origin positionapplyNow- whether to apply change- Returns:
- the event object
-
getRemoveMetricLink
public static java.lang.String getRemoveMetricLink(ReportBean rb, java.lang.String metricPos, boolean applyNow, java.lang.String extraURL, boolean addState, EventManager eventManager)
Deprecated.useViewBeanTransformHelperinsteadget a link for a remove metric action.- Parameters:
rb- the ReportBean objectmetricPos- the metric positionapplyNow- whether to apply changeextraURL- extra url information to appendaddState- whether add the beans's stateeventManager- EventManager object- Returns:
- the link as String
-
getRemoveMetricEvent
public static WebEvent getRemoveMetricEvent(ReportBean rb, java.lang.String metricPos, boolean applyNow)
get an event object for a remove metric action.- Parameters:
rb- the ReportBean objectmetricPos- the metric positionapplyNow- whether to apply change- Returns:
- the event object
-
getMoveMetricLink
public static java.lang.String getMoveMetricLink(ReportBean rb, java.lang.String fromPos, java.lang.String toPos, boolean applyNow, java.lang.String extraURL, boolean addState, EventManager eventManager)
get a link for a move metric action.- Parameters:
rb- the ReportBean objectfromPos- the origin positiontoPos- the target positionapplyNow- whether to apply changeextraURL- extra url information to appendaddState- whether add the beans's stateeventManager- EventManager object- Returns:
- the link as String
-
getMoveMetricEvent
public static WebEvent getMoveMetricEvent(ReportBean rb, java.lang.String fromPos, java.lang.String toPos, boolean applyNow)
get an event object for a move metric action.- Parameters:
rb- the ReportBean objectfromPos- the origin positiontoPos- the target positionapplyNow- whether to apply change- Returns:
- the event object
-
mapStyleNameToCssFileName
public static java.lang.String mapStyleNameToCssFileName(java.lang.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
-
mapCssFileNameToStyleName
public static java.lang.String mapCssFileNameToStyleName(java.lang.String fileName)
Deprecated.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
-
getObjectIDInfo
public static java.lang.String getObjectIDInfo(WebTemplateUnit unit)
Based on the type of unit instance, obtain its ID- Parameters:
unit-WebTemplateUnitinstance to analyze- Returns:
- String value with the object ID information.
- Since:
- MicroStrategy Web 7.5.1
-
getObjectTypeInfo
public static int getObjectTypeInfo(WebTemplateUnit unit)
Get the object type defined for theWebTemplateUnitspecified- Parameters:
unit-WebTemplateUnitinstance to analyze- Returns:
- value from the
EnumDSSXMLObjectTypesenumeration indicating the object type of the instance - Since:
- MicroStrategy Web 7.5.1
-
getWebObjectInfo
public static WebObjectInfo getWebObjectInfo(WebTemplateUnit unit)
- Parameters:
unit-WebTemplateUnitobject- Returns:
WebObjectInfocorresponding to theWebTemplateUnitinstance- Since:
- MicroStrategy Web 7.5.2
-
isNewDerivedElements
public static boolean isNewDerivedElements(WebTitle title)
Returns whether the title object is new Derived Elements.- Parameters:
title-WebTitleobject- Returns:
- whether the title object is new Derived Elements
-
generateRowTitleSortID
public static java.lang.String generateRowTitleSortID(WebTitle title, WebSubTitle subTitle)
generate the sort id for row title.- Parameters:
title-WebTitleobjectsubTitle-WebSubTitleobject- Returns:
- the sort id
-
generateRowTitleSortID
public static java.lang.String generateRowTitleSortID(WebSubTitle parentSubTitle, WebSubTitle childSubTitle, int axis)
generate the sort id for row title.- Parameters:
parentSubTitle-WebSubTitleobjectchildSubTitle-WebSubTitleobject- Returns:
- the sort id
- Since:
- MicroStrategy Web 8.0.2
-
generateColHeaderSortID
public static java.lang.String generateColHeaderSortID(ReportBean rb, WebHeader header)
generat the sort id for column header.- Parameters:
rb- the ReportBean objectheader- the WebHeader object- Returns:
- the sort id
-
generateColHeaderSortDisplayString
public static java.lang.String generateColHeaderSortDisplayString(ReportBean rb, WebHeader header)
generate the sort display for column header.- Parameters:
rb- the ReportBean objectheader- the WebHeader object- Returns:
- the sort display
-
ignoreOldStyle
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
-
getReportInstancePropertyValue
public static java.lang.String getReportInstancePropertyValue(ReportBean rb, int reportObjectType, java.lang.String propertySetName, java.lang.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 objectreportObjectType- the object type (EnumDSSXMLReportObjects) for which the property will bepropertySetName- the property namepropertyName- the property name- Returns:
- the property value
-
getReportPropertyValue
public static java.lang.String getReportPropertyValue(ReportBean rb, java.lang.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 objectpropertyName- the property name- Returns:
- the property value
-
getReportStyleID
public static java.lang.String getReportStyleID(ReportBean rb)
get report style id from report property "SelectedAutostyleID".- Parameters:
rb- the report bean object- Returns:
- report style id
-
getReportStyleName
public static java.lang.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
-
getReportStyleLocalizedName
public static java.lang.String getReportStyleLocalizedName(ReportBean rb)
get report localized style name.- Parameters:
rb- the report bean object- Returns:
- localized style name
-
convertToLocalizedStyleName
public static java.lang.String convertToLocalizedStyleName(ReportBean rb, java.lang.String name)
Deprecated.convert the style name to localized name, depending on the current session.- Parameters:
rb- the ReportBean objectname- the style name- Returns:
- localized name
-
displayCssFileContent
public static void displayCssFileContent(ReportBean rb, MarkupOutput mo, java.lang.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- ReportBeanmo- MarkupOutputcssFileName- CSS file to read
-
displayCssFileContent
public static void displayCssFileContent(WebBean wb, MarkupOutput mo, java.lang.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-WebBeanbase instancemo-MarkupOutputwhere to save the HTML to rendercssFileName- CSS file to read- Since:
- MicroStrategy Web 8.0.0
-
displayCssFileContent
public static void displayCssFileContent(AppContext appContext, MarkupOutput mo, java.lang.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- AppContextmo- MarkupOutputcssFileName- CSS file to read
-
generateMoveContextMenu
public static boolean generateMoveContextMenu(MarkupOutput mo, ReportBean rb, int pos, boolean isFirst, boolean isLast, boolean applyNow, java.lang.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 objectrb- the ReportBean objectpos- metric positionisFirst- if it's the first metricisLast- if it's the last metricapplyNow- whether to apply changeextraUrl- extra url info to the linkisIFrame- whether it is iframerhMenu- ContextMenu objectcmm- ContextMenuManager objecteventManager- EventManager object- Returns:
- whether the move item is added to the context menu
-
generateMoveContextMenu
public static void generateMoveContextMenu(MarkupOutput mo, ReportBean rb, int axis, int pos, boolean isFirst, boolean isLast, boolean applyNow, java.lang.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 objectrb- the ReportBean objectaxis- template unit axispos- template unit positionisFirst- if it's the first unit in the axisisLast- if it's the last unit in the axisapplyNow- whether to apply changeextraUrl- extra url info to the linkisIFrame- whether it is iframe enabledrhMenu- ContextMenu objectcmm- ContextMenuManager objecteventManager- EventManager object
-
generateMoveContextMenu
public static void generateMoveContextMenu(MarkupOutput mo, ReportBean rb, int axis, int pos, boolean isFirst, boolean isLast, java.lang.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 objectrb- the ReportBean objectaxis- template unit axispos- template unit positionisFirst- if it's the first unit in the axisisLast- if it's the last unit in the axisboneId- is the id of the client-side bonerhMenu- ContextMenu objectcmm- ContextMenuManager objecteventManager- EventManager object- Since:
- MicroStrategy Web 8.0.0
-
generateRemoveContextMenu
public static void generateRemoveContextMenu(MarkupOutput mo, ReportBean rb, int pos, boolean applyNow, java.lang.String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)
Deprecated.generate Remove context menu for a single metric specified by its position within the template metrics collection.- Parameters:
mo- the MarkupOutput objectrb- the ReportBean objectpos- metric positionapplyNow- whether to apply changeextraUrl- extra url info to the linkisIframe- whether it is iframe enabledrhMenu- ContextMenu objecteventManager- EventManager object
-
generateRemoveWorkingSetUnitContextMenu
public static void generateRemoveWorkingSetUnitContextMenu(MarkupOutput mo, ReportBean rb, WebObjectInfo object, boolean applyNow, java.lang.String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)
generate Remove context menu for working set specified by axis and position.- Parameters:
mo- the MarkupOutput objectrb- the ReportBean objectobject- the object to remove from the working set of the reportapplyNow- whether to apply changeextraUrl- extra url info on the urlisIframe- whether it is iframe enabledrhMenu- ContextMenu objecteventManager- EventManager object- Since:
- MicroStrategy Web 7.5.1
-
generateRemoveWorkingSetAllMetricsContextMenu
public static void generateRemoveWorkingSetAllMetricsContextMenu(MarkupOutput mo, ReportBean rb, boolean applyNow, java.lang.String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)
- Parameters:
mo-MarkupOutputinstance where to save the HTML to renderrb-ReportBeaninstanceapplyNow- boolean indicating if changes should be appliedextraUrl- StringisIframe- boolean indicating if it's iframe environment or notrhMenu-ContextMenuinstance where to add the optioneventManager-EventManagerinstance- Since:
- MicroStrategy Web 7.5.1
-
generateRemoveContextMenu
public static void generateRemoveContextMenu(MarkupOutput mo, ReportBean rb, int axis, int pos, boolean applyNow, java.lang.String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)
Deprecated.useViewBeanTransformHelperinsteadgenerate Remove context menu for template unit specified by axis and position.- Parameters:
mo- the MarkupOutput objectrb- the ReportBean objectaxis- template unit axispos- template unit positionapplyNow- whether to apply changeextraUrl- extra url info to the linkisIframe- whether it is iframe enabledrhMenu- ContextMenu objecteventManager- EventManager object
-
generateRemoveContextMenu
public static void generateRemoveContextMenu(MarkupOutput mo, ReportBean rb, int axis, int pos, java.lang.String boneId, ContextMenu rhMenu, EventManager eventManager)
generate Remove context menu for template unit specified by axis and position.- Parameters:
mo- the MarkupOutput objectrb- the ReportBean objectaxis- template unit axispos- template unit positionboneId- is the id of the client-side bonerhMenu- ContextMenu objecteventManager- EventManager object- Since:
- MicroStrategy Web 8.0.0
-
determineDrillRetainThreshold
public static java.lang.String determineDrillRetainThreshold(ReportBean rb, java.lang.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 objectpreferenceValue- the preference value- Returns:
- how the drill action retains thresholds
-
determineDrillRetainParent
public static java.lang.String determineDrillRetainParent(ReportBean rb, java.lang.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 objectpreferenceValue- the preference value- Returns:
- whether the drill action retains parent
-
getPageByHeadersByIndex
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 objectpageHeaders- the pageby headerstitleIndex- the index of the pageby item in the pageby axis- Returns:
- the pageby header at that index
-
generateFormattingContextMenu
public static void generateFormattingContextMenu(MarkupOutput mo, ReportBean rb, int pos, java.lang.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 objectrb- the ReportBean objectpos- metric positionextraUrl- extra url info to the linkisIframe- whether it is iframe enabledrhMenu- ContextMenu objecteventManager- EventManager object
-
generateFormattingContextMenu
public static void generateFormattingContextMenu(MarkupOutput mo, ReportBean rb, int axis, int pos, java.lang.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 objectrb- the ReportBean objectaxis- template unit axispos- template unit positionextraUrl- extra url info to the linkisIframe- whether it is iframe enabledrhMenu- ContextMenu objecteventManager- EventManager object
-
generateRenameContextMenu
public static void generateRenameContextMenu(MarkupOutput mo, ReportBean rb, int key, java.lang.String extraUrl, boolean isIframe, ContextMenu rhMenu, EventManager eventManager)
generate rename context menu for template unit.- Parameters:
mo- the MarkupOutput objectrb- the ReportBean objectextraUrl- extra url info to the linkisIframe- whether it is iframe enabledrhMenu- ContextMenu objectkey- integer value with the key of the object to be renamedeventManager- EventManager object
-
getFilter
public static WebFilter getFilter(ReportBean rb, int filterType)
get a filter object from a filter type.- Parameters:
rb- the ReportBean objectfilterType- the filter type fromEnumFilterTypes- Returns:
- the
WebFilterobject
-
getFilterExpression
public static WebExpression getFilterExpression(ReportBean rb, int filterType)
get a filter expression from a filter type.- Parameters:
rb- the ReportBean objectfilterType- the filter type fromEnumFilterTypes- Returns:
- the
WebExpressionobject - Since:
- MicroStrategy Web 8.0.0
-
getSortsubtotalPostion
public static int getSortsubtotalPostion(ReportBean rb)
get the subtotal position for sorting.- Parameters:
rb- the ReportBean object- Returns:
- the subtotal position for sorting
-
getToPageByPosition
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
-
ReadReportSettings
public static java.lang.String ReadReportSettings(ReportBean rb, java.lang.String PropertySet, java.lang.String PropertyName)
get report property value for DssXmlReportObjectMainTemplate object.
This method is a special case of ReportTransformHelper.getReportInstancePropertyValue().- Parameters:
rb- the ReportBean objectPropertySet- the property set namePropertyName- the property name- Returns:
- the property value
-
isTotal
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
-
convertToNewStyleReport
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
- Since:
- MicroStrategy Web 8.0.0
-
applyUserStyleToReport
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- ReportBeanprefs- Preferences- Returns:
- true if the style was applied
- Since:
- MicroStrategy Web 8.0.0
-
renderMetricCellFormat
public static void renderMetricCellFormat(ReportGridCellMetricValue cell, WebRowValue rowValue, java.util.Locale locale) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException- Since:
- MicroStrategy Web 7.5.4
-
renderHeaderCellFormat
public static void renderHeaderCellFormat(ReportGridDisplayCell cell, WebHeader header, java.util.Locale locale)
- Since:
- MicroStrategy Web 7.5.4
-
getNoDataCustomMessage
public static java.lang.String getNoDataCustomMessage(WebIServerSession session)
- Since:
- MicroStrategy Web 9.0.0
-
checkDisplayEmptyReportMessageInRWD
public static boolean checkDisplayEmptyReportMessageInRWD(WebIServerSession session)
- Since:
- MicroStrategy Web 9.0.0
-
-