public abstract class

AbstractOptionsTransform

extends PreferencesGenericTransform
java.lang.Object
   ↳ com.microstrategy.web.transform.AbstractTransform
     ↳ com.microstrategy.web.transform.AbstractLayoutTransform
       ↳ com.microstrategy.web.app.transforms.AbstractAppTransform
         ↳ com.microstrategy.web.app.transforms.AbstractPreferencesTransform
           ↳ com.microstrategy.web.app.transforms.PreferencesGenericTransform
             ↳ com.microstrategy.web.app.transforms.AbstractOptionsTransform
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

This abstract class is the base for print/pdf/export options Transforms.

Summary

Constants
String ACTION_TYPE_EXPORT
String ACTION_TYPE_PDF
String ACTION_TYPE_PRINT
[Expand]
Inherited Constants
From class com.microstrategy.web.app.transforms.PreferencesGenericTransform
From class com.microstrategy.web.app.transforms.AbstractPreferencesTransform
From class com.microstrategy.web.app.transforms.AbstractAppTransform
Fields
protected ReportPreferencePropertyListMapper mapper
[Expand]
Inherited Fields
From class com.microstrategy.web.app.transforms.AbstractPreferencesTransform
From class com.microstrategy.web.app.transforms.AbstractAppTransform
Public Constructors
AbstractOptionsTransform()
Default empty constructor.
Public Methods
String getDescription()
Returns the textual description of the transform
Class getSupportedBeanType()
Returns the supported bean type.
String getTitle()
WebEvent getValidatePreferencesEvent()
Returns the event used to validate preferences before exporting.
void initializeTransform(Transformable data)

This method initialize the private and protected fields of the transform, such as width and height.

boolean isGraphOptions()
Determines if the editor is being used to display grid options.
boolean isGridGraphOptions()
Determines if the editor is being used to display grid/graph options.
boolean isGridOptions()
Determines if the editor is being used to display grid options.
boolean isReportPageByNotEmpty()
Determin whether the page-by in the report is empty
boolean isShowingOptions()
This method is used to determine whether the transform is being used to display user preferences or report export options
void renderHeaderAndFooterButton(MarkupOutput out, String groupName)
Renders link to edit custom header and footer.
void renderSaveMessage(MarkupOutput out)
If a preference was updated and there were no errors, this method shows a success message to the user.
void transformForRequestInError(MarkupOutput out)
Generates the graphical output for the PreferencesBean when the bean is in Error.
Protected Methods
String getActionType()
String getExportEventID()
Returns the ID of the export event used when this transform is used for the Options Page (examples are Export, PDF and Print)
This will be used to pass as the "eventToForwardTo" on the Save Report Properties page.
OptionsBean getOptionsBean()
Returns the current OptionsBean
String getPreference(String name)
Overwrites implementation to check for report properties if set.
WebEvent getSaveReportPropertiesEvent()
int getSaveReportPropertiesEventID()
void renderCustomHeaderFooterButton(MarkupOutput out, WebEvent evt)
void renderOutlineModeHiddenInput(MarkupOutput out)
Render the Hidden Inputs for the Outline Mode to be passed to the PDF.
void renderPreferenceBodyText(MarkupOutput out, String preferenceName, String text, String tagID)
Renders the text of a Preference.
[Expand]
Inherited Methods
From class com.microstrategy.web.app.transforms.PreferencesGenericTransform
From class com.microstrategy.web.app.transforms.AbstractPreferencesTransform
From class com.microstrategy.web.app.transforms.AbstractAppTransform
From class com.microstrategy.web.transform.AbstractLayoutTransform
From class com.microstrategy.web.transform.AbstractTransform
From class java.lang.Object
From interface com.microstrategy.web.app.transforms.AppTransform
From interface com.microstrategy.web.transform.LayoutTransform
From interface com.microstrategy.web.transform.Transform

Constants

public static final String ACTION_TYPE_EXPORT

Constant Value: "3"

public static final String ACTION_TYPE_PDF

Constant Value: "1"

public static final String ACTION_TYPE_PRINT

Constant Value: "2"

Fields

Public Constructors

public AbstractOptionsTransform ()

Default empty constructor. Initialize formal parameters.

Public Methods

public String getDescription ()

Returns the textual description of the transform

Returns
  • the textual description of the transform

public Class getSupportedBeanType ()

Returns the supported bean type. This abstract Transform supports all WebComponents so every sub-class should override this method to return the class of the Bean the Transform is expecting, for example:

 public class CustomReportClass extends AbstractAppTransform {

    public Class getSupportedBeanType() {
        //This Transform is expected to work only with a ReportBean,
        //therefore this method needs to return this class:
        return ReportBean.class;
    }

 }
 

Returns
  • a root class/interface supported by this transform.

public String getTitle ()

Returns
  • the Title for the dialog. By default the current group.

public WebEvent getValidatePreferencesEvent ()

Returns the event used to validate preferences before exporting.

public void initializeTransform (Transformable data)

This method initialize the private and protected fields of the transform, such as width and height. It also invokes the initializeWebComponent, initializeImages and initializeCss methods.

This method is automatically called from the transform method. Transforms which would like to invoke other methods in this instance directly (for example, to invoke some render methods), need first to call this method to guarantee that the Transform is ready to generate output.

Parameters
data the bean to transform.

public boolean isGraphOptions ()

Determines if the editor is being used to display grid options.

Returns
  • true if the options bean is being used to display grid options

public boolean isGridGraphOptions ()

Determines if the editor is being used to display grid/graph options.

Returns
  • true if the options bean is being used to display grid options

public boolean isGridOptions ()

Determines if the editor is being used to display grid options.

Returns
  • true if the options bean is being used to display grid options

public boolean isReportPageByNotEmpty ()

Determin whether the page-by in the report is empty

Returns
  • true if the transform is displaying print options and there are template units in the page-by.

public boolean isShowingOptions ()

This method is used to determine whether the transform is being used to display user preferences or report export options

Returns
  • true if used to display exporting/printing options.

public void renderHeaderAndFooterButton (MarkupOutput out, String groupName)

Renders link to edit custom header and footer.

Parameters
out the output object

public void renderSaveMessage (MarkupOutput out)

If a preference was updated and there were no errors, this method shows a success message to the user.

Parameters
out where to write the output of the method.

public void transformForRequestInError (MarkupOutput out)

Generates the graphical output for the PreferencesBean when the bean is in Error. It will call the parent method if it is not invoked from the options page or if has an error object which is not null or if it ha no preference validation errors. If there are preference validation errors from the options page then it will render and error message and make a call to transformForRequestWaitingForUserInput so the user might change Preferences again and get a chance to correct them.

Parameters
out where to create the output

Protected Methods

protected String getActionType ()

Returns

protected String getExportEventID ()

Returns the ID of the export event used when this transform is used for the Options Page (examples are Export, PDF and Print)
This will be used to pass as the "eventToForwardTo" on the Save Report Properties page.

Returns
  • The ID of the final event used when this transform is used for the Options Page (examples are Export, PDF and Print)

protected OptionsBean getOptionsBean ()

Returns the current OptionsBean

Returns
  • this OptionsBean

protected String getPreference (String name)

Overwrites implementation to check for report properties if set.

Parameters
name name of the preference
Returns
  • preference.getValue() for the requested level

protected WebEvent getSaveReportPropertiesEvent ()

Returns
  • the save report properties event. Used for the options pages.

protected int getSaveReportPropertiesEventID ()

protected void renderCustomHeaderFooterButton (MarkupOutput out, WebEvent evt)

protected void renderOutlineModeHiddenInput (MarkupOutput out)

Render the Hidden Inputs for the Outline Mode to be passed to the PDF.

Parameters
out where to write the output of the method.

protected void renderPreferenceBodyText (MarkupOutput out, String preferenceName, String text, String tagID)

Renders the text of a Preference. This method associate the text label to its corresponding radiobox or checkbox.

Parameters
out where to create the output
preferenceName the preference name
text the title to display
tagID the element ID with which this text is associated