java.lang.Object | ||||
↳ | com.microstrategy.web.transform.AbstractTransform | |||
↳ | com.microstrategy.web.transform.AbstractLayoutTransform | |||
↳ | com.microstrategy.web.app.transforms.AbstractAppTransform | |||
↳ | com.microstrategy.web.app.transforms.PathTransform |
![]() |
![]() |
This class is used to render the path section of a page.
It renders the Back/Forward buttons as well as links and information about the
object being displayed in the current page.
This class implements LayoutTransform
which enables building
the layout through an external xml configuration file.
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_IS_SELF_CONTAINED | Constant specifying the name of the formal parameter for defining if the object is self contained or not. | |||||||||
String | FP_OPEN_DESKTOP_EVENT | ||||||||||
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. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected WebEvent | _event | ||||||||||
protected String | _hiddenFolderCharacters | ||||||||||
protected String | _objectName | ||||||||||
protected PathBean | _pathBean | ||||||||||
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 | hiddenFolderCharacters | Indicates the character(s) to be used as placeholders when displaying a hidden folder inside the path. | |||||||||
public FormalParameter | isSelfContained | Indicates if the target bean of 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 | openDesktopEvent | ||||||||||
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PathTransform()
Default constructor, initialize formal parameters.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
WebFolder |
getAncestorFolder()
Return the
WebFolder or the ancestor of the current object. | ||||||||||
SimpleList |
getAncestors()
Retrieves the ObjectBean's parent FolderBean.
| ||||||||||
String |
getDescription()
Return description for this Transform
| ||||||||||
boolean |
getHasAncestors()
Whether the current object has ancestors
| ||||||||||
List |
getObjectPathFolderAncestors(int rootIndex)
Returns all the ancestors of the current object
| ||||||||||
List |
getObjectPathFolderAncestors(int rootIndex, boolean order, boolean excludeParent)
Returns all the ancestors of the current object
| ||||||||||
FolderBean |
getParentFolderBean()
Retrieves the ObjectBean's parent FolderBean.
| ||||||||||
String |
getStyleShellDiv()
Overwrites the parent method by changin the default style's display to be "inline".
| ||||||||||
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
| ||||||||||
boolean |
isSpecialFolder()
Checks if the current object is a special folder
| ||||||||||
void |
renderAncestor(MarkupOutput out, WebFolder folder)
Renders the WebFolder object name w/o the hyperlink to that folder
| ||||||||||
void |
renderAncestors(MarkupOutput out, int rootIndex)
Renders the folder ancestors as path
| ||||||||||
void |
renderBackButton(MarkupOutput out)
Renders a Back button link, it uses the openHistoryPage event for this.
| ||||||||||
void |
renderCreateFolderButton(MarkupOutput out)
Renders the button to create a folder
| ||||||||||
void |
renderCurrentItem(MarkupOutput out)
Renders the curent item
| ||||||||||
void |
renderFolder(MarkupOutput out, WebFolder folder, SimpleList ancestors, int currentAncestor, boolean showLink, boolean showDivider)
Render a specific folder.
| ||||||||||
void |
renderFolder(MarkupOutput out, WebFolder folder, SimpleList ancestors, int currentAncestor, boolean showLink)
Render a specific folder.
| ||||||||||
void |
renderForwardButton(MarkupOutput out)
Renders a Forward button link, it uses the openHistoryPage event for this.
| ||||||||||
void |
renderHomeButton(MarkupOutput out)
Renders a button link to Home, it uses the openDesktopEvent for this.
| ||||||||||
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 |
renderObjectName(MarkupOutput out)
Renders the current objects name (i.e.
| ||||||||||
void |
renderOpenFolderImage(MarkupOutput out)
Renders the open folder image.
| ||||||||||
void |
renderParent(MarkupOutput out)
Renders the parent folder
| ||||||||||
void |
renderParentFolderDelimiter(MarkupOutput out)
Renders the delimiter between the folder names
The divider character is set through Formal Parameter
| ||||||||||
void |
renderParentUpButton(MarkupOutput out)
Renders a button link to the parent folders.
| ||||||||||
void |
renderTitle(MarkupOutput out)
Renders the title, uses descriptor 51: You are here:
| ||||||||||
void |
setHasAncestors(boolean value)
Sets whether the current object has ancestors
| ||||||||||
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 | canRenderHomeButtton() | ||||||||||
boolean | canRenderParentUpButton() | ||||||||||
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 |
getBackButtonEvent()
Returns the open history page event used for the back button.
| ||||||||||
WebEvent |
getBrowseFolderEvent(WebFolder folder)
Returns the browser folder event.
| ||||||||||
OMDCreateFolderBean | getCreateFolderBean() | ||||||||||
WebEvent |
getForwardButtonEvent()
Returns the open history page event used for the forward button.
| ||||||||||
String |
getImageSrc(String imgId)
Get the image source to display as part of the object path content.
| ||||||||||
ObjectBean |
getObjectBean()
Get the objectBean target of this transform
| ||||||||||
Map<String, Object> | getObjectNameAndEvent(boolean useObjectName, boolean showLink) | ||||||||||
WebObjectsFactory | getObjectsFactory() | ||||||||||
WebEvent | getOpenCreateFolderEvent() | ||||||||||
WebEvent |
getOpenDesktopEvent()
Returns the open desktop event.
| ||||||||||
WebEvent | getOpenHistoryPage(String relativePageNumber) | ||||||||||
WebEvent |
getOpenHomeEvent()
Returns the open home event.
| ||||||||||
Map<String, Object> |
getParentEventAndDesc()
Get the WebEvent and descption of parent folder.
| ||||||||||
ServletWebComponent | getServletWebComponent() | ||||||||||
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
| ||||||||||
boolean | isAncestorNamedFolder(int folderName) | ||||||||||
boolean | isFolderRoot(WebFolder folder) | ||||||||||
boolean | isNewObject() | ||||||||||
boolean |
isTemplateFolder(WebFolder parentFolder)
Check whether the parent folder of current object is one of the templates folders.
| ||||||||||
void | renderSimpleButton(MarkupOutput out, WebEvent event, String descriptor, String id, String src) | ||||||||||
void | renderSimpleButton(MarkupOutput out, WebEvent event, String descriptor, String id) | ||||||||||
void |
renderSimpleLink(MarkupOutput out, WebEvent event, String descriptor, String css, boolean showLink)
Renders a link based on the event.
| ||||||||||
void |
renderSimpleLink(MarkupOutput out, WebEvent event, String descriptor, String css, boolean showLink, boolean showDivider)
Renders a link based on the event.
| ||||||||||
void |
setBoneProperties(JsonGenerator boneProps)
Sets the necessary properties to the bone assigned to this transform (based on the
scriptClass formal parameter) Usually called by renderRegisterBone(MarkupOutput) Can be overwritten to add or modify bone properties. | ||||||||||
boolean | shouldDisableBackButton() | ||||||||||
boolean | useParentAncestors() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constant specifying the name of the formal parameter for defining the dividing characters in between objects in the path. Value is dividerCharacters.
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 specifying the name of the formal parameter for defining if the object is self contained or not. Value is isSelfContained.
Constant specifying the name of the formal parameter for defining the image to render before the current object is displayed. Value is openFolderImage.
Constant specifying the name of the formal parameter for defining the showLink. Value is showLink .
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.
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.
Indicates if the target bean of 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.
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.
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.
Default constructor, initialize formal parameters.
Retrieves the ObjectBean's parent FolderBean. This is the Bean from where we need to get the ancestors from.
Return description for this Transform
Whether the current object has ancestors
Returns all the ancestors of the current object
rootIndex | , indicates the starting index of the ancestor |
---|
Returns all the ancestors of the current object
rootIndex | , indicates the starting index of the ancestor |
---|
Retrieves the ObjectBean's parent FolderBean. This is the Bean from where we need to get the ancestors from.
Overwrites the parent method by changin the default style's display to be "inline".
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; } }
Initialize the css class used by this transform.
Initialize images, basically it prefix them with the global folderName
Transform the Folder Bean and append the output to MarkupOutput
data | the folder bean to transform |
---|
Checks if the current object is a special folder
WebBeanException |
---|
Renders the WebFolder object name w/o the hyperlink to that folder
out | the transform's output |
---|---|
folder | , the folder to be rendered |
Renders the folder ancestors as path
out | the transform's output |
---|---|
rootIndex | , indicates the starting index of the ancestors For example, desktop link is the highest ancestor with index of 0; by specifying rootIndex=1, the desktop link won't be rendered |
Renders a Back button link, it uses the openHistoryPage event for this.
out | the transform's output |
---|
Renders the button to create a folder
out | the transform's output |
---|
Renders the curent item
out | the transform's output |
---|
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.
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. |
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.
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. |
Renders a Forward button link, it uses the openHistoryPage event for this.
out | the transform's output |
---|
Renders a button link to Home, it uses the openDesktopEvent for this.
out | the transform's output |
---|
Renders the link the Desktop (start) page.
out | the transform's output |
---|
Renders the link to Home, it uses the openHomeEvent for this.
out | the transform's output |
---|
Renders a new list before the item's name. This might be controlled through a formal parameter
out | the transform's output |
---|
Renders the current objects name (i.e. report name)
out | the transform's output |
---|
Renders the open folder image.
out | the transform's output |
---|
Renders the parent folder
out | the transform's output |
---|
Renders the delimiter between the folder names The divider character is set through Formal Parameter
out | the transform's output |
---|
Renders a button link to the parent folders.
out | the transform's output |
---|
Renders the title, uses descriptor 51: You are here:
out | the transform's output |
---|
Sets whether the current object has ancestors
Overwrites by ignoring the state and rendering as the status was succesful. ObjectBeans, even when their processing, should already have their path info.
out | MarkupOutput instance that will be the output by this transform
|
---|
Overwrites by ignoring the state and rendering as the status was succesful. ObjectBeans, even when their processing, should already have their path info.
out | MarkupOutput instance that will be the output by this transform
|
---|
Transform when the status is "Successful". If a Layout is specified, it delegates
execution to the layout-pareser, otherwise, otherwise it calls
renderContent
.
out | a MarkupOutput instance with the HTML output by this transform
|
---|
Overwrites by ignoring the state and rendering as the status was succesful. ObjectBeans, even when their processing, should already have their path info.
out | MarkupOutput instance that will be the output by this transform
|
---|
Returns the open history page event used for the back button.
WebEventOpenHistoryPage
event.
Returns the browser folder event.
folder | the folder to browse |
---|
EnumFolderBeanEvents.FOLDER_EVENT_BROWSE
event.
Returns the open history page event used for the forward button.
WebEventOpenHistoryPage
event.
Get the image source to display as part of the object path content. This method is called only when the user has turned on Accessibility mode under Preferences.
imgId | String indicating the ID of the image from where the source should be calculated. For example, values
like tbHome or tbReturn are expected |
---|
Get the objectBean target of this transform
FolderBean
instance used with this transform
Returns the open desktop event.
EnumServletEvents.WebEventOpenDefaultDesktop
event.
Returns the open home event.
EnumServletEvents.WebEventOpenHome
event.
Get the WebEvent and descption of parent 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.
folder | the folder to check |
---|
Returns the system folder ID (NamedFolder) that is in the hierarchy of the object bean
UnsupportedOperationException | |
---|---|
WebObjectsException |
Check whether the parent folder of current object is one of the templates folders.
Renders a link based on the event.
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). |
Renders a link based on the event.
out | the transform's output |
---|---|
event | the event associated with the 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). |
Sets the necessary properties to the bone assigned to this transform (based on the scriptClass
formal parameter)
Usually called by renderRegisterBone(MarkupOutput)
Can be overwritten to add or modify bone properties.
boneProps | the JsonGenerator object that contains the collection of bone properties. |
---|