java.lang.Object | |
↳ | com.microstrategy.web.objects.WebElementHelper |
Helper class for extracting information from element IDs. Conversion between different types of element IDs.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | DETAIL_TERSE_DEFAULT | ||||||||||
int | DETAIL_TERSE_DISPLAY_NAME | ||||||||||
int | DETAIL_TERSE_SOURCE_UNIT_ID | ||||||||||
int | PRESENTATION_OLD_LONG | "BB:8D679D4B11D3E4981000E787EC6DE8A4:1:2:0:2:1:3:1:Northeast" is an example of the old long element ID. | |||||||||
int | PRESENTATION_OLD_SHORT | "8D679D4B11D3E4981000E787EC6DE8A4:1" is an example of the old short element ID. | |||||||||
int | PRESENTATION_TERSE_DEFAULT | This is not explicitly supported. | |||||||||
int | PRESENTATION_TERSE_LONG | This will become the standard presentation of the element ID. | |||||||||
char | SEPARATOR_TERSE_FIELD |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
WebElementHelper() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static WebElement |
addToElementsCollection(WebElements collection, String originalID)
Utility method to add an element to the element collection
| ||||||||||
static WebElement |
addToElementsCollection(WebElements collection, String originalID, String displayFormIndices)
Utility method to add an element to the element collection
| ||||||||||
static String | decodeHTML(String oldStr) | ||||||||||
static int |
determinePresentation(String elementID)
Tries to determine presentation type.
| ||||||||||
static String |
getElementID(WebElement e, int detail)
Returns a terse element ID composed according to detail fields
DETAIL_TERSE_DEFAULT , DETAIL_TERSE_SOURCE_UNIT_ID ,
and DETAIL_TERSE_DISPLAY_NAME . | ||||||||||
static String | getElementIDForSortID(WebElement e) | ||||||||||
static String | getElementSourceID(String elementID) | ||||||||||
static int |
getElementType(String elementID)
Determines the
EnumDSSXMLElementType
from the element ID. | ||||||||||
static int | getFormIndex(String originalID, String displayName) | ||||||||||
static String |
getNodeKey(String panelElementID)
Extracts the node key of a panel element ID in a
report services document.
| ||||||||||
static int |
getTemplateUnitType(WebElement e)
Determines the
EnumDSSXMLTemplateUnitType
of the WebElement . | ||||||||||
static int |
getTemplateUnitType(String elementID)
Determines the
EnumDSSXMLTemplateUnitType
from the element ID. | ||||||||||
static boolean |
isNullElemID(String elementID)
Check if it is a null element by the given element id.
| ||||||||||
static String | reduceElementID(String originalID) | ||||||||||
static String | reduceElementID(String originalID, boolean removeAttribute) | ||||||||||
static String | removeAttributeId(String originalID) | ||||||||||
static String | toShortElementID(String originalID) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
"BB:8D679D4B11D3E4981000E787EC6DE8A4:1:2:0:2:1:3:1:Northeast"
is an example of the old long element ID. Code should not
be written to rely on disseminating the contents of this
element ID. This presentation will be replaced by
PRESENTATION_TERSE_LONG
.
"8D679D4B11D3E4981000E787EC6DE8A4:1" is an example of the old short element ID.
This is not explicitly supported. While we read terse default element IDs such as "h1" from the Intelligence Server, in order to submit an attribute element ID, we also require at least the source attribute DSS ID as well, such as "h1;8D679D4B11D3E4981000E787EC6DE8A4".
This will become the standard presentation of the element ID.
"h1;8D679D4B11D3E4981000E787EC6DE8A4;Northeast" is an example.
It consists of "
Utility method to add an element to the element collection
collection | - WebElements the collection to add the element to. |
---|---|
originalID | - The element id. |
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 |
Tries to determine presentation type. If unknown, 0 is returned.
Returns a terse element ID composed according to detail fields
DETAIL_TERSE_DEFAULT
, DETAIL_TERSE_SOURCE_UNIT_ID
,
and DETAIL_TERSE_DISPLAY_NAME
.
DETAIL_TERSE_SOURCE_UNIT_ID
implies inclusion of
DETAIL_TERSE_DEFAULT
, and DETAIL_TERSE_DISPLAY_NAME
implies inclusion of DETAIL_TERSE_SOURCE_UNIT_ID
. Fields
are delimited by SEPARATOR_TERSE_FIELD
- separator
is omitted if there is no subsequent field. Most element IDs will
require at least DETAIL_TERSE_SOURCE_UNIT_ID
to be
consumed by the Intelligence Server.
MSTRUncheckedException | thrown if element source ID cannot be determined |
---|---|
NullPointerException | thrown if element ID is null |
Determines the EnumDSSXMLElementType
from the element ID. Only works for long versions. Returns 0 if unable
to determine type.
Extracts the node key of a panel element ID in a report services document.
Determines the EnumDSSXMLTemplateUnitType
of the WebElement
. Returns 0 if unable to determine type.
Determines the EnumDSSXMLTemplateUnitType
from the element ID. Returns 0 if unable to determine type.
Check if it is a null element by the given element id. It can handle both long id format and terse id format.