public class

ObjectPathTransform

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.ObjectPathTransform
Known Direct Subclasses
Known Indirect Subclasses

This class is deprecated.
use PathTransform instead

Class Overview

This class is used for rendering path links and information about the location of the ObjectBean being transformed.

This class implements LayoutTransform which enables building the layout through an external xml configuration file.

Summary

Constants
String FP_CHARS_FOR_DIVIDER Constant specifying the name of the formal parameter for defining the dividing characters in between objects in the path.
String FP_CHARS_FOR_HIDDEN_FOLDERS Constant specifying the name of the formal parameter for defining the characters to use instead of the names of folders that are hidden for the user.
String FP_EXTRA_ANCHOR_INFO Constant specifying the name of the formal parameter for defining the extra attributes to be added to the anchor to generate.
String FP_IS_SELF_CONTAINED Constant specifying the name of the formal parameter for defining if the object is self contained or not.
String FP_LEVEL_FLAG Constant specifying the name of the formal parameter for defining the level flag.
String FP_OPEN_FOLDER_IMAGE Constant specifying the name of the formal parameter for defining the image to render before the current object is displayed.
String FP_SHOW_LINK Constant specifying the name of the formal parameter for defining the showLink.
int LEVEL_ALL This constant is deprecated. please use the layout xml
int LEVEL_ANCESTORS_PATH This constant is deprecated. please use the layout xml
int LEVEL_DESKTOP_LINK This constant is deprecated. please use the layout xml
int LEVEL_HOME_LINK This constant is deprecated. please use the layout xml
int LEVEL_ITEM_LINK This constant is deprecated. please use the layout xml
int LEVEL_LINE_BEFORE_LAST Allowed value for the levelFlag formal parameter.
int LEVEL_LINKS This constant is deprecated. please use the showLink Formal Paramter
int LEVEL_OPEN_FOLDER_IMAGE Allowed value for the levelFlag formal parameter.
int LEVEL_TITLE This constant is deprecated. please use the layout xml
[Expand]
Inherited Constants
From class com.microstrategy.web.app.transforms.AbstractAppTransform
Fields
protected WebEvent _event
protected String _objectName
protected boolean _showLink
protected String cssItemNameCache
protected String cssUnselectedItemNameCache
public FormalParameter dividerCharacters Indicates the character(s) to be used for separating each one of the different elements when displaying the path.
public FormalParameter extraItemNameHREFAnchorInfo This field is deprecated. Please customize the generated link instead
public FormalParameter hiddenFolderCharacters Indicates the character(s) to be used as placeholders when displaying a hidden folder inside the path.
public FormalParameter isSelfContained Indicates if the current object being transformed should be used when generating the events that will be used for creating the links for accessing other folders.
public FormalParameter levelFlag This field is deprecated. please use the layout xml
public FormalParameter openFolderImage Indicates the image to use before displaying the current object on the path (if requested on the levelFlag formal parameter).
public FormalParameter showLink Indicates whether the object path contains a hyperlink to that object
Default value is boolean TRUE which indicates the hyperlinks will be generated for each object path.
[Expand]
Inherited Fields
From class com.microstrategy.web.app.transforms.AbstractAppTransform
Public Constructors
ObjectPathTransform()
Default constructor, initialize formal parameters.
Public Methods
WebFolder getAncestorFolder()
SimpleList getAncestors()
Retrieves the ObjectBean's parent FolderBean.
String getDescription()
Return description for this Transform
boolean getHasAncestors()
FolderBean getParentFolderBean()
Retrieves the ObjectBean's parent FolderBean.
Class getSupportedBeanType()
Returns the supported bean type.
void initializeCss()
Initialize the css class used by this transform.
void initializeImages()
Initialize images, basically it prefix them with the global folderName
void initializeTransform(Transformable data)
Transform the Folder Bean and append the output to MarkupOutput
void renderAncestors(MarkupOutput out)
This method is deprecated. please use the layout xml
void renderContent(MarkupOutput out)
This is the main entry point of the Transform when no layout is specified.
void renderCurrentItem(MarkupOutput out)
Renders the curent item
void renderLinkForDesktop(MarkupOutput out)
Renders the link the Desktop (start) page.
void renderLinkForHome(MarkupOutput out)
Renders the link to Home, it uses the openHomeEvent for this.
void renderNewLine(MarkupOutput out)
Renders a new list before the item's name.
void renderOpenFolderImage(MarkupOutput out)
Renders the open folder image.
void renderTitle(MarkupOutput out)
Renders the title, uses descriptor 51: You are here:
void setHasAncestors(boolean value)
void transformForRequestInError(MarkupOutput out)
Overwrites by ignoring the state and rendering as the status was succesful.
void transformForRequestProcessing(MarkupOutput out)
Overwrites by ignoring the state and rendering as the status was succesful.
void transformForRequestSuccessful(MarkupOutput out)
Transform when the status is "Successful".
void transformForRequestWaitingForUserInput(MarkupOutput out)
Overwrites by ignoring the state and rendering as the status was succesful.
Protected Methods
boolean checkLevel(int iLevelConst)
check if the level parameter value contains this flag
AnchorTag generateAnchor(WebEvent event)
Overwrites the parent method by setting the right event element value according to the formal parameters available on the transform
WebEvent getBrowseFolderEvent(WebFolder folder)
Returns the browser folder event.
ObjectBean getObjectBean()
Get the objectBean target of this transform
WebEvent getOpenDesktopEvent()
Returns the open desktop event.
WebEvent getOpenHomeEvent()
Returns the open home event.
String getSpecialFolderName(WebFolder folder)
Check for special folders, if found one, return the descriptor.
int getSysFolderID()
Returns the system folder ID (NamedFolder) that is in the hierarchy of the object bean
void renderFolder(MarkupOutput out, WebFolder folder, SimpleList ancestors, int currentAncestor, boolean showLink)
Render a specific folder.
void renderSimpleLink(MarkupOutput out, WebEvent event, String descriptor, String css, boolean showLink)
Renders a link based on the event.
boolean useParentAncestors()
[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_CHARS_FOR_DIVIDER

Constant specifying the name of the formal parameter for defining the dividing characters in between objects in the path. Value is dividerCharacters.

Constant Value: "dividerCharacters"

public static final String FP_CHARS_FOR_HIDDEN_FOLDERS

Constant specifying the name of the formal parameter for defining the characters to use instead of the names of folders that are hidden for the user. Value is hiddenFolderCharacters.

Constant Value: "hiddenFolderCharacters"

public static final String FP_EXTRA_ANCHOR_INFO

Constant specifying the name of the formal parameter for defining the extra attributes to be added to the anchor to generate. Value is extraItemNameHREFAnchorInfo.

Constant Value: "extraItemNameHREFAnchorInfo"

public static final String FP_IS_SELF_CONTAINED

Constant specifying the name of the formal parameter for defining if the object is self contained or not. Value is isSelfContained.

Constant Value: "isSelfContained"

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_OPEN_FOLDER_IMAGE

Constant specifying the name of the formal parameter for defining the image to render before the current object is displayed. Value is openFolderImage.

Constant Value: "openFolderImage"

public static final String FP_SHOW_LINK

Constant specifying the name of the formal parameter for defining the showLink. Value is showLink .

Constant Value: "showLink"

public static final int LEVEL_ALL

This constant is deprecated.
please use the layout xml

Allowed value for the levelFlag formal parameter. Convenience flag for selecting all the possible level flag values defined on this class.
Value = -1

Constant Value: -1 (0xffffffff)

public static final int LEVEL_ANCESTORS_PATH

This constant is deprecated.
please use the layout xml

Allowed value for the levelFlag formal parameter. Determines if ancestors folder path gets displayed. Value = 128

Constant Value: 128 (0x00000080)

public static final int LEVEL_DESKTOP_LINK

This constant is deprecated.
please use the layout xml

Allowed value for the levelFlag formal parameter. Specifies that the transform will show a link for the project's Desktop page as part of the path.
Value = 8

Constant Value: 8 (0x00000008)

public static final int LEVEL_HOME_LINK

This constant is deprecated.
please use the layout xml

Allowed value for the levelFlag formal parameter. Specifies that the transform will render as part of the path, a link for Home application page.
Value = 4

Constant Value: 4 (0x00000004)

public static final int LEVEL_ITEM_LINK

This constant is deprecated.
please use the layout xml

Allowed value for the levelFlag formal parameter. Specifies that the transform will render the current item inside a link.
Value = 16

Constant Value: 16 (0x00000010)

public static final int LEVEL_LINE_BEFORE_LAST

Allowed value for the levelFlag formal parameter. Specifies that the transform will display a new line character before the last item on the path. One of its main uses is in the Yahoo Path view where, for example, on the Folder page the path is shown in one line, and it places the current folder name (last element) on a separate line.
Value = 1

Constant Value: 1 (0x00000001)

public static final int LEVEL_LINKS

This constant is deprecated.
please use the showLink Formal Paramter

Allowed value for the levelFlag formal parameter. Determines if each one of the items rendered by the transform as part of the path will be inside links. Value = 64

Constant Value: 64 (0x00000040)

public static final int LEVEL_OPEN_FOLDER_IMAGE

Allowed value for the levelFlag formal parameter. Specifies that the transform will display an image before the object name which represents the current one being viewed, as defined on the openFolderImage formal parameter.
Value = 2

Constant Value: 2 (0x00000002)

public static final int LEVEL_TITLE

This constant is deprecated.
please use the layout xml

Allowed value for the levelFlag formal parameter. Specifies that the transform will render a Title ("You are here: " label) before displaying the path.
Value = 32

Constant Value: 32 (0x00000020)

Fields

protected WebEvent _event

protected String _objectName

protected boolean _showLink

protected String cssItemNameCache

protected String cssUnselectedItemNameCache

public FormalParameter dividerCharacters

Indicates the character(s) to be used for separating each one of the different elements when displaying the path.
These characters will be displayed after each element except the last one, for indicating a hierarchy between the folders shown.
Usage: Default value is >. The value to assign to this formal parameter has to be HTML compatible for it to be displayed correctly on the final HTML page.

public FormalParameter extraItemNameHREFAnchorInfo

This field is deprecated.
Please customize the generated link instead

Indicates any extra information that will be rendered as attributes of the Anchor tag.
Any valid anchor tag attributes and their values might be specified here. This formal parameter is mainly for associating javascript method calls (in which case previous validation is done to confirm the page is being rendered in DHTML mode).

public FormalParameter hiddenFolderCharacters

Indicates the character(s) to be used as placeholders when displaying a hidden folder inside the path.
These characters will be displayed instead of the hidden folder name without link associated with it since the user does not have enough privileges for accessing it. If there are two or more hidden folders one after the other, these characters will be displayed only once. Usage: Default value is [ ...]. The value to assign to this formal parameter has to be HTML compatible for it to be displayed correctly on the final HTML page.

public FormalParameter isSelfContained

Indicates if the current object being transformed should be used when generating the events that will be used for creating the links for accessing other folders.
Default value is boolean TRUE which indicates this object will be the source for the links to render.

public FormalParameter levelFlag

This field is deprecated.
please use the layout xml

Indicates the level of information to use when displaying each item.
The information may be displayed as links. The value to assign to this formal parameter should be a bitwise flag combining constants such as LEVEL_ITEM_LINK, LEVEL_TITLE, etc. For a complete list, refer to ObjectPathTransform.
Usage: If only the title and the current object shall be displayed, the flag value to assign to the formal parameter would be 80 (16 + 64). Default value is LEVEL_ALL

public FormalParameter openFolderImage

Indicates the image to use before displaying the current object on the path (if requested on the levelFlag formal parameter).
The value to indicate should be a valid image file name, with any necessary path information not included already on the resourcesFolderImage application configuration parameter.

public FormalParameter showLink

Indicates whether the object path contains a hyperlink to that object
Default value is boolean TRUE which indicates the hyperlinks will be generated for each object path.

Public Constructors

public ObjectPathTransform ()

Default constructor, initialize formal parameters.

Public Methods

public WebFolder getAncestorFolder ()

public SimpleList getAncestors ()

Retrieves the ObjectBean's parent FolderBean. This is the Bean from where we need to get the ancestors from.

Returns
  • the parent's folder bean

public String getDescription ()

Return description for this Transform

Returns
  • description for the transform

public boolean getHasAncestors ()

public FolderBean getParentFolderBean ()

Retrieves the ObjectBean's parent FolderBean. This is the Bean from where we need to get the ancestors from.

Returns
  • the parent's folder bean

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

Initialize the css class used by this transform.

public void initializeImages ()

Initialize images, basically it prefix them with the global folderName

public void initializeTransform (Transformable data)

Transform the Folder Bean and append the output to MarkupOutput

Parameters
data the folder bean to transform

public void renderAncestors (MarkupOutput out)

This method is deprecated.
please use the layout xml

Renders the list of ancestors.

Parameters
out the transform's output

public void renderContent (MarkupOutput out)

This is the main entry point of the Transform when no layout is specified. It displays the path of the folder with a link to each one of its ancestors, i.e.:
Home > VMall > Shared Reports

Parameters
out MarkupOutput

public void renderCurrentItem (MarkupOutput out)

Renders the curent item

Parameters
out the transform's output

public void renderLinkForDesktop (MarkupOutput out)

Renders the link the Desktop (start) page.

Parameters
out the transform's output

public void renderLinkForHome (MarkupOutput out)

Renders the link to Home, it uses the openHomeEvent for this.

Parameters
out the transform's output

public void renderNewLine (MarkupOutput out)

Renders a new list before the item's name. This might be controlled through a formal parameter

Parameters
out the transform's output

public void renderOpenFolderImage (MarkupOutput out)

Renders the open folder image.

Parameters
out the transform's output

public void renderTitle (MarkupOutput out)

Renders the title, uses descriptor 51: You are here:

Parameters
out the transform's output

public void setHasAncestors (boolean value)

public void transformForRequestInError (MarkupOutput out)

Overwrites by ignoring the state and rendering as the status was succesful. ObjectBeans, even when their processing, should already have their path info.

Parameters
out MarkupOutput instance that will be the output by this transform

public void transformForRequestProcessing (MarkupOutput out)

Overwrites by ignoring the state and rendering as the status was succesful. ObjectBeans, even when their processing, should already have their path info.

Parameters
out MarkupOutput instance that will be the output by this transform

public void transformForRequestSuccessful (MarkupOutput out)

Transform when the status is "Successful". If a Layout is specified, it delegates execution to the layout-pareser, otherwise, otherwise it calls renderContent.

Parameters
out a MarkupOutput instance with the HTML output by this transform

public void transformForRequestWaitingForUserInput (MarkupOutput out)

Overwrites by ignoring the state and rendering as the status was succesful. ObjectBeans, even when their processing, should already have their path info.

Parameters
out MarkupOutput instance that will be the output by this transform

Protected Methods

protected boolean checkLevel (int iLevelConst)

check if the level parameter value contains this flag

Parameters
iLevelConst level flag
Returns
  • true means the level flag is included in the level parameter value

protected AnchorTag generateAnchor (WebEvent event)

Overwrites the parent method by setting the right event element value according to the formal parameters available on the transform

Parameters
event WebEvent
Returns
  • AnchorTag

protected WebEvent getBrowseFolderEvent (WebFolder folder)

Returns the browser folder event.

Parameters
folder the folder to browse
Returns
  • The EnumFolderBeanEvents.FOLDER_EVENT_BROWSE event.

protected ObjectBean getObjectBean ()

Get the objectBean target of this transform

Returns

protected WebEvent getOpenDesktopEvent ()

Returns the open desktop event.

Returns
  • The EnumServletEvents.WebEventOpenDesktop event.

protected WebEvent getOpenHomeEvent ()

Returns the open home event.

Returns
  • The EnumServletEvents.WebEventOpenHome event.

protected String getSpecialFolderName (WebFolder folder)

Check for special folders, if found one, return the descriptor. It also checks if the Shared Reports folder, using preferences, has been specified as other folder.

Parameters
folder the folder to check
Returns
  • a String with the descriptor to use if it's a special folder, null otherwise.

protected int getSysFolderID ()

Returns the system folder ID (NamedFolder) that is in the hierarchy of the object bean

Returns
  • String EnumDSSXMLFolderNames value.

protected void renderFolder (MarkupOutput out, WebFolder folder, SimpleList ancestors, int currentAncestor, boolean showLink)

Render a specific folder. This is a recursive function that calls itself to render the parent.
It calls recursively until it finds the root folder. If the LEVEL_DESKTOP_LINK level is set, instead of stopping in the root folder, it stops in its first child.

Parameters
out the transform's output
folder the current folder
ancestors the list of ancestors
currentAncestor the index of this folder in the list of ancestors
showLink whether to render a link for the folder.

protected void renderSimpleLink (MarkupOutput out, WebEvent event, String descriptor, String css, boolean showLink)

Renders a link based on the event.

Parameters
out the transform's output
event the event associated witht he link
descriptor the content of the link
css the class to use
showLink whether to render to link or not (if false, the descriptor will be simply rendered within a SPAN tag).

protected boolean useParentAncestors ()