public class

FolderLink

extends AbstractConfigurationElement
java.lang.Object
   ↳ com.microstrategy.utils.config.AbstractConfigurationElement
     ↳ com.microstrategy.web.app.FolderLink

Class Overview

The FolderLink element defines a shortcut to a folder (in the metadata) that is used by a folder browser or editor associated with the context. The folder is associated either by id (the object-id for the folder from the metadata) or by sys-folder-id (a value from the EnumDSSXMLFolderNames enumeration which lists all the system folders of a metadata).

Summary

Constants
String ATT_DESC
String ATT_DESC_ID
String ATT_FEATURE_ID
String ATT_ID
String ATT_IS_ROOT
String ATT_SYS_FOLDER_ID
String NODE_FOLDER_LINK
[Expand]
Inherited Constants
From class com.microstrategy.utils.config.AbstractConfigurationElement
Public Constructors
FolderLink()
FolderLink(Node root)
Creates a FolderLink and populates it with the information in the Xml Node.
Public Methods
String getDesc()
Returns a descriptor that the application should use to display the folder link, or shortcut, if the desc-id attribute is missing.
String getDescId()
Returns the Resource Bundle item id that the application should use to display the folder link, or shortcut, in the language of the user's locale.
String getFeatureId()
Returns the feature-id of a feature that is evaluated to determine whether the folder link, or shortcut, should be displayed.
String getId()
Indicates the object-id of the folder (from the metadata) that is associated with this folder-link.
Object getKey()
Default implementation for getKey().
String getPreferredSysFolderID(AppContext appContext)
static String getPreferredSysFolderID(AppContext appContext, int sysFolderID)
int getSysFolderID()
Returns the integer id for the system folder (from the metadata) to which a folder browser or editor should be pointed when the folder link, or shortcut, is selected.
WebObjectInfo getWebFolderObject(WebObjectSource wos, Messages messages)
This method is deprecated. Use getWebFolderObject(AppContext) instead
WebObjectInfo getWebFolderObject(AppContext appContext)
boolean isRoot()
Returns whether this FolderLink should be used as the root folder when browsing in the given context.
void setDesc(String desc)
Sets a descriptor that the application should use to display the folder link, or shortcut, if the desc-id attribute is missing.
void setDescId(String descId)
Sets the Resource Bundle item id that the application should use to display the folder link, or shortcut, in the language of the user's locale.
void setFeatureId(String feature)
Sets the feature-id of a feature that is evaluated to determine whether the folder link, or shortcut, should be displayed.
void setId(String value)
Sets the object-id for the folder (from the metadata) to which a folder browser or editor should be pointed when the folder link, or shortcut, is selected.
void setIsRoot(boolean isRoot)
indicates whether the FolderLink should be used as the root folder when browsing in the given context.
void setKey(Element element)
Default implementation for setKey().
void setSysFolderID(int value)
Sets the integer id for the system folder (from the metadata) to which a folder browser or editor should be pointed when the folder link, or shortcut, is selected.
Protected Methods
String getKeyAttribute()
This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override the getKey and setKey methods.
boolean isKeyAttribute(String name)
Returns true is the name is that of the key attribute.
[Expand]
Inherited Methods
From class com.microstrategy.utils.config.AbstractConfigurationElement
From class java.lang.Object
From interface com.microstrategy.utils.config.ConfigurationElement
From interface com.microstrategy.utils.config.ConfigurationFile

Constants

public static final String ATT_DESC

Constant Value: "desc"

public static final String ATT_DESC_ID

Constant Value: "desc-id"

public static final String ATT_FEATURE_ID

Constant Value: "feature-id"

public static final String ATT_ID

Constant Value: "id"

public static final String ATT_IS_ROOT

Constant Value: "is-root"

public static final String ATT_SYS_FOLDER_ID

Constant Value: "sys-folder-id"

public static final String NODE_FOLDER_LINK

Constant Value: "folder-link"

Public Constructors

public FolderLink ()

public FolderLink (Node root)

Creates a FolderLink and populates it with the information in the Xml Node. Internally it calls initFromXML(Node).

Parameters
root the xml node.

Public Methods

public String getDesc ()

Returns a descriptor that the application should use to display the folder link, or shortcut, if the desc-id attribute is missing.

public String getDescId ()

Returns the Resource Bundle item id that the application should use to display the folder link, or shortcut, in the language of the user's locale.

public String getFeatureId ()

Returns the feature-id of a feature that is evaluated to determine whether the folder link, or shortcut, should be displayed. It returns null if no feature is required (i.e. it should always be displayed).

public String getId ()

Indicates the object-id of the folder (from the metadata) that is associated with this folder-link.

public Object getKey ()

Default implementation for getKey(). It assumes a single attribute can be used to uniquely identify this element among its siblings; the attribute to use is specified by the getKeyAttribute() method.

Returns
  • If getKeyAttribute() is empty returns null, otherwise it returns the value of the given attribute.

public String getPreferredSysFolderID (AppContext appContext)

public static String getPreferredSysFolderID (AppContext appContext, int sysFolderID)

public int getSysFolderID ()

Returns the integer id for the system folder (from the metadata) to which a folder browser or editor should be pointed when the folder link, or shortcut, is selected. The valid values of this attribute are defined in the EnumDSSXMLFolderNames interface. (For example, the name 'DssXmlFolderNameAutoStyles' specifies the 'AutoStyles' folder in the 'Public Objects' folder and has an integer value of '57'.) The value of this attribute does not change between product versions.

public WebObjectInfo getWebFolderObject (WebObjectSource wos, Messages messages)

This method is deprecated.
Use getWebFolderObject(AppContext) instead

Parameters
wos WebObjectSource initialized instance
messages Messages initialized instance
Returns

public WebObjectInfo getWebFolderObject (AppContext appContext)

Parameters
appContext BeanContext initialized instance
Returns

public boolean isRoot ()

Returns whether this FolderLink should be used as the root folder when browsing in the given context.

public void setDesc (String desc)

Sets a descriptor that the application should use to display the folder link, or shortcut, if the desc-id attribute is missing.

public void setDescId (String descId)

Sets the Resource Bundle item id that the application should use to display the folder link, or shortcut, in the language of the user's locale.

public void setFeatureId (String feature)

Sets the feature-id of a feature that is evaluated to determine whether the folder link, or shortcut, should be displayed.

public void setId (String value)

Sets the object-id for the folder (from the metadata) to which a folder browser or editor should be pointed when the folder link, or shortcut, is selected.

Parameters
value The new id for the folderlink

public void setIsRoot (boolean isRoot)

indicates whether the FolderLink should be used as the root folder when browsing in the given context.

public void setKey (Element element)

Default implementation for setKey(). It assumes a single attribute can be used to uniquely identify this element among its siblings and adds this attribute to the given element; the attribute to use is specified by the getKeyAttribute() method.

public void setSysFolderID (int value)

Sets the integer id for the system folder (from the metadata) to which a folder browser or editor should be pointed when the folder link, or shortcut, is selected. The valid values of this attribute are defined in the EnumDSSXMLFolderNames interface. (For example, the name 'DssXmlFolderNameAutoStyles' specifies the 'AutoStyles' folder in the 'Public Objects' folder and has an integer value of '57'.) The value of this attribute does not change between product versions.

Protected Methods

protected String getKeyAttribute ()

This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override the getKey and setKey methods.

protected boolean isKeyAttribute (String name)

Returns true is the name is that of the key attribute.