public abstract class

AbstractPreferencesTransform

extends AbstractAppTransform
implements LayoutTransform
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
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

This abstract class is the base for all preferences Transforms.

Summary

Constants
String FP_FORM_ID Constant specifying the ID to use for the preferences's HTML Form.
String FP_LEVEL_FLAG Constant specifying the name of the formal parameter for defining the level flag.
String FP_UPPER_LEFT_CORNER_IMAGE Constant specifying the image for the upper left corner of the preferences.
String FP_UPPER_RIGHT_CORNER_IMAGE Constant specifying the image for the upper right corner of the preferences.
int LEVEL_ALL Allowed value for the levelFlag formal parameter.
int LEVEL_APPLY Allowed value for the levelFlag formal parameter.
int LEVEL_APPLY_TO Allowed value for the levelFlag formal parameter.
int LEVEL_FORM Allowed value for the levelFlag formal parameter.
int LEVEL_LOAD_DEFAULTS Allowed value for the levelFlag formal parameter.
int LEVEL_PREFERENCES Allowed value for the levelFlag formal parameter.
[Expand]
Inherited Constants
From class com.microstrategy.web.app.transforms.AbstractAppTransform
Fields
protected String _upperLeftCornerImage This field is deprecated. The formal parameter associated with this property has been deprecated.
protected String _upperRightCornerImage This field is deprecated. The formal parameter associated with this property has been deprecated.
public FormalParameter formID Specifies the ID to use for the preferences' HTML Form.
public FormalParameter levelFlag Indicates the level of information to use when displaying the preferences bean.
public FormalParameter upperLeftCornerImage This field is deprecated. This image is no longer required, the header of the preferences page is defined with css styles
public FormalParameter upperRightCornerImage This field is deprecated. This image is no longer required, the header of the preferences page is defined with css styles
[Expand]
Inherited Fields
From class com.microstrategy.web.app.transforms.AbstractAppTransform
Public Constructors
AbstractPreferencesTransform()
Default empty constructor.
Public Methods
String getDescription()
Returns the textual description of the transform
Class getSupportedBeanType()
Returns the supported bean type.
String getTitle()
void initializeImages()
Initialize the images to be used by this transform.
void initializeTransform(Transformable data)

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

void renderApplyChanges(MarkupOutput out)
void renderApplyChangesButton(MarkupOutput out)
void renderApplyChangesCombobox(MarkupOutput out)
Renders a combobox with the options to "Apply to current project" or to all projects
void renderFormEnd(MarkupOutput out, WebEvent event)
Renders the Form end tag
void renderFormStart(MarkupOutput out, WebEvent event)
Renders the start of the Preference's Form.
void renderImage(MarkupOutput out, String image)
Renders a transform's image
void renderInvalidMessage(MarkupOutput out)
void renderLoadDefaults(MarkupOutput out)
void renderNoteInformation(MarkupOutput out)
abstract void renderPreference(String preferenceName, MarkupOutput out)
This method is deprecated. Call the corresponding renderXXX method directly.
void renderSaveMessage(MarkupOutput out)
If a preference was updated and there were no errors, this method shows a success message to the user.
void renderSaveMessageText(MarkupOutput out)
Render the save message text that should be presented to the user once the saving has been successful.
void renderTitle(MarkupOutput out)
void renderUpdateConfirmation(MarkupOutput out)
Render a confirmation message to show updating is successful or error happened.
void transformForRequestSuccessful(MarkupOutput out)
Generates the graphical output for the PreferencesBean when the bean is succesfull.
void transformForRequestWaitingForUserInput(MarkupOutput out)
Transform when the status is WaitingForUserInputessful.
Protected Methods
String getFormID()
Returns the ID to use for the form that contains the preferences inputs.
WebEvent getLoadDefaultsEvent()
String getPreference(String name, PreferenceLevel level)
Returns the value of the preference with the given name.
String getPreference(String name)
Returns the value of the preference with the given name, at the given level
PreferencesBean getPreferencesBean()
Returns the current PreferencesBean
String getPropertyValue(String propertyValue, String argumentName)
Check to see if the property comes in the request keys.
WebEvent getUpdateEvent()
Returns the update WebEvent used to update the Preferences value.
boolean isAdminLevel()
void renderJavascript(MarkupOutput out)
This method is called to generate all javascript functions related to this transform.
void renderPreferenceBodyNote(String preferenceName, String bodynote, MarkupOutput out)
This method is deprecated. This method cannot be invoked from a layout-xml. Instead, call renderPreferenceBodyNote(MarkupOutput, String, String).
void renderPreferenceBodyNote(MarkupOutput out, String preferenceName, String text)
Renders a note for a Preference.
void renderPreferenceBodyText(MarkupOutput out, String preferenceName, String text, String[] notes)
Renders the text of a Preference.
void renderPreferenceBodyText(MarkupOutput out, String preferenceName, String text)
Renders the text of a Preference.
void renderPreferenceBodyText(String preferenceName, String bodytext, MarkupOutput out)
This method is deprecated. This method cannot be invoked from a layout-xml. Instead, call renderPreferenceBodyText(MarkupOutput, String, String).
void renderPreferenceBodyText(MarkupOutput out, String preferenceName, String text, String tagID)
Renders the text of a Preference.
void renderPreferenceHeader(MarkupOutput out, String preferenceName, String header)
Renders the title of a Preference.
void renderPreferenceHeader(String preferenceName, String header, MarkupOutput out)
This method is deprecated. This method cannot be invoked from a layout-xml. Instead, call renderPreferenceHeader(MarkupOutput, String, String).
abstract void transformBody(MarkupOutput out)
Abstract method that must be override by the concrete class.
void transformFooter(MarkupOutput out)
Generates the footer of the Preferences dialog
void transformHeader(MarkupOutput out)
Generates the Header of the Preferences dialog
[Expand]
Inherited Methods
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 FP_FORM_ID

Constant specifying the ID to use for the preferences's HTML Form.

Constant Value: "formID"

public static final String FP_LEVEL_FLAG

Constant specifying the name of the formal parameter for defining the level flag. Value is levelFlag.

Constant Value: "levelFlag"

public static final String FP_UPPER_LEFT_CORNER_IMAGE

Constant specifying the image for the upper left corner of the preferences.

Constant Value: "upperLeftCornerImage"

public static final String FP_UPPER_RIGHT_CORNER_IMAGE

Constant specifying the image for the upper right corner of the preferences.

Constant Value: "upperRightCornerImage"

public static final int LEVEL_ALL

Allowed value for the levelFlag formal parameter. Convenience flag to indicate all possible LEVEL values.
Value = 16777215

Constant Value: -1 (0xffffffff)

public static final int LEVEL_APPLY

Allowed value for the levelFlag formal parameter. Specifies that the transform will display the apply button.
Value = 2

Constant Value: 2 (0x00000002)

public static final int LEVEL_APPLY_TO

Allowed value for the levelFlag formal parameter. Specifies that the transform will display the apply to select box.
If missing the preferences will be saved to the current project only.
Value = 4

Constant Value: 4 (0x00000004)

public static final int LEVEL_FORM

Allowed value for the levelFlag formal parameter. Specifies that the transform will render a form tag surrounding the whole output.
Value = 8

Constant Value: 16 (0x00000010)

public static final int LEVEL_LOAD_DEFAULTS

Allowed value for the levelFlag formal parameter. Specifies that the transform will display the Load Defaults button.
Value = 8

Constant Value: 8 (0x00000008)

public static final int LEVEL_PREFERENCES

Allowed value for the levelFlag formal parameter. Specifies that the transform will display the preferences section.
Value = 1

Constant Value: 1 (0x00000001)

Fields

protected String _upperLeftCornerImage

This field is deprecated.
The formal parameter associated with this property has been deprecated.

protected String _upperRightCornerImage

This field is deprecated.
The formal parameter associated with this property has been deprecated.

public FormalParameter formID

Specifies the ID to use for the preferences' HTML Form.
Allowed Values:
Any string allowed in an ID tag of an HTML form.
Usage:
This may be changed to execute some Javascript that needs to make reference to the preferences form with a specific name.

public FormalParameter levelFlag

Indicates the level of information to use when displaying the preferences bean.
The information include the preferences section, the apply to select box and the load defaults button Default value is LEVEL_ALL

public FormalParameter upperLeftCornerImage

This field is deprecated.
This image is no longer required, the header of the preferences page is defined with css styles

Specifies the image for the upper left corner of the preferences' frame.
Allowed Values:
The value to indicate should be a valid image file name, with any necessary path information not included already on the Usage:
This may be changed to change the look and feel (i.e. color) of the preferences page.

public FormalParameter upperRightCornerImage

This field is deprecated.
This image is no longer required, the header of the preferences page is defined with css styles

Specifies the image for the upper right corner of the preferences' frame.
Allowed Values:
The value to indicate should be a valid image file name, with any necessary path information not included already on the Usage:
This may be changed to change the look and feel (i.e. color) of all preferences pages.

Public Constructors

public AbstractPreferencesTransform ()

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 void initializeImages ()

Initialize the images to be used by this transform.

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 void renderApplyChanges (MarkupOutput out)

public void renderApplyChangesButton (MarkupOutput out)

public void renderApplyChangesCombobox (MarkupOutput out)

Renders a combobox with the options to "Apply to current project" or to all projects

public void renderFormEnd (MarkupOutput out, WebEvent event)

Renders the Form end tag

Parameters
out where to write the output of the method.

public void renderFormStart (MarkupOutput out, WebEvent event)

Renders the start of the Preference's Form. This method also renders the hidden inputs associated with the event

Parameters
out where to write the output of the method.
event the WebEvent to render

public void renderImage (MarkupOutput out, String image)

Renders a transform's image

Parameters
out where to write the output of the method.
image the image name

public void renderInvalidMessage (MarkupOutput out)

public void renderLoadDefaults (MarkupOutput out)

public void renderNoteInformation (MarkupOutput out)

public abstract void renderPreference (String preferenceName, MarkupOutput out)

This method is deprecated.
Call the corresponding renderXXX method directly.

Render individual preferences based on the name provided

Parameters
preferenceName name id of the preference

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 renderSaveMessageText (MarkupOutput out)

Render the save message text that should be presented to the user once the saving has been successful.

Parameters
out MarkupOutput where to write the output of the method

public void renderTitle (MarkupOutput out)

public void renderUpdateConfirmation (MarkupOutput out)

Render a confirmation message to show updating is successful or error happened.

Parameters
out output by this transform

public void transformForRequestSuccessful (MarkupOutput out)

Generates the graphical output for the PreferencesBean when the bean is succesfull. It just renders a "Success" message but calls again transformForRequestWaitingForUserInput so the user might change Preferences again.

Parameters
out MarkupOutput where to save the HTML to render to the user

public void transformForRequestWaitingForUserInput (MarkupOutput out)

Transform when the status is WaitingForUserInputessful. Overwrites by showing the Preferences form.

Parameters
out output by this transform

Protected Methods

protected String getFormID ()

Returns the ID to use for the form that contains the preferences inputs. This is the value of the formID formal parameter.

protected WebEvent getLoadDefaultsEvent ()

protected String getPreference (String name, PreferenceLevel level)

Returns the value of the preference with the given name. The value is automatically selected for the current level.

Parameters
name the name (key) of the preference
level level at which the preference should be requested
Returns
  • preference.getValue() for the current level.

protected String getPreference (String name)

Returns the value of the preference with the given name, at the given level

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

protected PreferencesBean getPreferencesBean ()

Returns the current PreferencesBean

Returns
  • this PreferencesBean

protected String getPropertyValue (String propertyValue, String argumentName)

Check to see if the property comes in the request keys.
If yes, it will return the value of the @param argumentName from the request keys.
If not, it will return back the value which was passed in.
Note:This happens when there are validation error for instance.

Parameters
propertyValue the value of the property
Returns
  • the property value

protected WebEvent getUpdateEvent ()

Returns the update WebEvent used to update the Preferences value.

Returns
  • a WebEvent to use for updating

protected boolean isAdminLevel ()

protected void renderJavascript (MarkupOutput out)

This method is called to generate all javascript functions related to this transform.

protected void renderPreferenceBodyNote (String preferenceName, String bodynote, MarkupOutput out)

This method is deprecated.
This method cannot be invoked from a layout-xml. Instead, call renderPreferenceBodyNote(MarkupOutput, String, String).

Renders the text of a Preference.

Parameters
preferenceName the preference name
bodynote the text to display
out MarkupOutput instance where to create the output

protected void renderPreferenceBodyNote (MarkupOutput out, String preferenceName, String text)

Renders a note for a Preference.

Parameters
out MarkupOutput instance where to create the output
preferenceName the preference name
text the text to display

protected void renderPreferenceBodyText (MarkupOutput out, String preferenceName, String text, String[] notes)

Renders the text of a Preference.

Parameters
out where to create the output
preferenceName the preference name
text the title to display

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

Renders the text of a Preference.

Parameters
out where to create the output
preferenceName the preference name
text the title to display

protected void renderPreferenceBodyText (String preferenceName, String bodytext, MarkupOutput out)

This method is deprecated.
This method cannot be invoked from a layout-xml. Instead, call renderPreferenceBodyText(MarkupOutput, String, String).

Renders the text of a Preference. If the preference value is marked as invalid, then the text is highlighted.

Parameters
preferenceName the preference name
bodytext the title to display
out where to create the output

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

protected void renderPreferenceHeader (MarkupOutput out, String preferenceName, String header)

Renders the title of a Preference.

Parameters
out where to create the output
preferenceName the preference name
header the title to display

protected void renderPreferenceHeader (String preferenceName, String header, MarkupOutput out)

This method is deprecated.
This method cannot be invoked from a layout-xml. Instead, call renderPreferenceHeader(MarkupOutput, String, String).

Renders the title of a Preference.

Parameters
preferenceName the preference name
header the title to display
out where to create the output

protected abstract void transformBody (MarkupOutput out)

Abstract method that must be override by the concrete class. This is called to generate the main body of the Preference dialog

Parameters
out where to create the output

protected void transformFooter (MarkupOutput out)

Generates the footer of the Preferences dialog

Parameters
out where to create the output

protected void transformHeader (MarkupOutput out)

Generates the Header of the Preferences dialog

Parameters
out where to create the output