java.lang.Object | |
↳ | com.microstrategy.utils.WebTools |
This class provides static utility methods that can be used in various tasks.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
WebTools() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static WebElement |
addToElementsCollection(WebElements collection, String originalID, String displayFormIndices)
This method is deprecated.
use
addToElementsCollection(WebElements, String, String) | ||||||||||
static WebElement |
addToElementsCollection(WebElements collection, String originalID)
This method is deprecated.
use
addToElementsCollection(WebElements, String)
| ||||||||||
static boolean |
canSelectElements(WebAttribute webAttribute, WebElementSource elementSource)
Check whether we do project browsing or not
| ||||||||||
static boolean |
checkConnection(String serverName, int serverPort)
Checks to see if MicroStrategy Web is connected to the given Intelligence Server.
| ||||||||||
static int | compareStrings(String str1, String str2, Locale loc) | ||||||||||
static int |
getFormIndex(String originalID, String displayName)
This method is deprecated.
use
getFormIndex(String, String)
| ||||||||||
static int |
getMRPFunction(int dssFunc, int funcType, boolean asc)
This method returns the MRP function for a DSS function, function type, and ascending/descending flag.
| ||||||||||
static Comparator |
getObjectComparator(int sortField, boolean isAscending)
This method can be used to get a java.util.Comparator for sorting objects within a
WebFolder
Using a sort field argument specified from the interface EnumWebObjectSort , one can
obtain a corresponding Comparator. | ||||||||||
static Comparator |
getObjectComparator(int sortField, Locale numberDateLocale, boolean isAscending)
This method is deprecated.
replaced by
getObjectComparator(int, RegionalOptions, boolean)
| ||||||||||
static Comparator<WebDisplayUnitEntry> |
getObjectComparator(int sortField, RegionalOptions locales, boolean isAscending)
This method can be used to get a java.util.Comparator for sorting objects within a
WebFolder
Using a sort field argument specified from the interface EnumWebObjectSort , one can
obtain a corresponding Comparator. | ||||||||||
static String | getObjectNodeName(Integer objectType) | ||||||||||
static String |
getObjectNodeName(int objectType)
This function maps the object type with the XML short name.
| ||||||||||
static boolean |
isConnected(String serverName, int serverPort)
Makes a
checkConnection(String, int) call, returning true/false
depending on whether it was successful. | ||||||||||
static String |
reduceElementID(String originalID)
This method is deprecated.
use
reduceElementID(String)
| ||||||||||
static String |
reduceElementID(String originalID, boolean removeAttribute)
This method is deprecated.
use
reduceElementID(String, boolean)
| ||||||||||
static String |
removeParameterFromURL(String URL, String parameter)
Removes the requested parameter from the URL, together with its value assigned.
| ||||||||||
static boolean | showHyperCard() | ||||||||||
static String |
toShortElementID(String originalID)
This method is deprecated.
see
toShortElementID(String)
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
This method is deprecated.
use addToElementsCollection(WebElements, String, String)
Utility method to add an element to the element collection
collection | - WebElements the collection to add the element to. |
---|---|
originalID | - The element id. |
displayFormIndices | - comma separated list of attribute form indices that are part of the display name |
This method is deprecated.
use addToElementsCollection(WebElements, String)
Utility method to add an element to the element collection
collection | - WebElements the collection to add the element to. |
---|---|
originalID | - The element id. |
Check whether we do project browsing or not
Checks to see if MicroStrategy Web is connected to the given Intelligence Server.
We will attempt connecting if (getAutoConnect()
) is true.
serverName | name of the Intelligence Server. |
---|---|
serverPort | port of the Intelligence Server. |
MSTRWebAPIException | thrown if there was a problem establishing a connection. |
---|
This method returns the MRP function for a DSS function, function type, and ascending/descending flag. This is used to map the preference for default operator to the EnumWebMRPFunction, which is required for rank/ percent to build those expressions.
dssFunc | The function, from EnumDSSXMLFunction. |
---|---|
funcType | The function type, from EnumWebFunctionType. |
asc | Whether the order should be ascending or descending |
This method can be used to get a java.util.Comparator for sorting objects within a WebFolder
Using a sort field argument specified from the interface EnumWebObjectSort
, one can
obtain a corresponding Comparator. The Comparator can be used on the WebDisplayUnits
object returned by getChildUnits()
method of a WebFolder to sort the
WebObjectInfo
objects of the WebFolder.
sortField | the sort field. Must be a value from EnumWebObjectSort . The
sort fields cannot be combined. |
---|---|
isAscending | Specify whether Comparator will be used for ascending sorting or descending sorting. |
This method is deprecated.
replaced by getObjectComparator(int, RegionalOptions, boolean)
This method can be used to get a java.util.Comparator for sorting objects within a WebFolder
Using a sort field argument specified from the interface EnumWebObjectSort
, one can
obtain a corresponding Comparator. The Comparator can be used on the WebDisplayUnits
object returned by getChildUnits()
method of a WebFolder to sort the
WebObjectInfo
objects of the WebFolder.
sortField | the sort field. Must be a value from EnumWebObjectSort . The
sort fields cannot be combined. |
---|---|
numberDateLocale | The associated locale. This will be used in number/date comparisons. If the locale parameter is passed in as null, then the default locale is used. |
isAscending | Specify whether Comparator will be used for ascending sorting or descending sorting. |
This method can be used to get a java.util.Comparator for sorting objects within a WebFolder
Using a sort field argument specified from the interface EnumWebObjectSort
, one can
obtain a corresponding Comparator. The Comparator can be used on the WebDisplayUnits
object returned by getChildUnits()
method of a WebFolder to sort the
WebObjectInfo
objects of the WebFolder.
sortField | the sort field. Must be a value from EnumWebObjectSort . The
sort fields cannot be combined. |
---|---|
locales | The associated locales. |
isAscending | Specify whether Comparator will be used for ascending sorting or descending sorting. |
This function maps the object type with the XML short name.
objectType | The type of object we want to look for. |
---|
Makes a checkConnection(String, int)
call, returning true/false
depending on whether it was successful. No exception is thrown by this method.
serverName | name of the Intelligence Server. |
---|---|
serverPort | port of the Intelligence Server. |
Removes the requested parameter from the URL, together with its value assigned.
URL | the query string from where the parameter should be removed |
---|---|
parameter | the name of the parameter to search and remove |