public interface

WebElementSource

com.microstrategy.web.objects.WebElementSource

Class Overview

The WebElementSource interface is used for retrieving elements XML from the Intelligence Server. This interface includes functionality such as incremental fetch and the ability to set a filter to be applied when element browsing. This interface will retrieve either elements from the project, or from a working set/report, depending upon the type parameter of the element source.

Summary

Public Methods
abstract void changeType(int type, String messageID, String datasetID, String controlKey)
abstract void changeType(int type)
Changes the element source type to the given type.
abstract void changeType(int type, String messageID)
Changes the element source type to the given type.
abstract void changeType(int type, String messageID, String datasetID, String controlKey, String templateKey)
abstract void changeType(int type, String messageID, String datasetID)
Changes the element source type to the given type.
abstract WebBrowsePath createBrowsePath(WebDimension dimension)
Factory method for creating new WebBrowsePath instances.
abstract String getAttributeFormsXML()
Returns the attribute forms XML, which specifies which attribute forms to return from an element browse.
abstract int getBlockBegin()
Returns the blockBegin property, which will tell the first element to bring down when making an element browse call to the Intelligence Server.
abstract int getBlockCount()
Returns the blockCount property, which tells the Intelligence Server how many objects to return in the API call.
abstract WebBrowsePath getBrowsePath()
returns the browse path object associated with this instance.
abstract String getBrowsePathXML()
Returns the browse path XML.
abstract WebElements getElements()
This method will build the elements collection for the attribute set as the attribute source, using the various properties set on this object.
abstract String getElementsXML()
This method will obtain the elements XML for the attribute set as the attribute source, using the various properties set on this object.
abstract WebFilter getFilter()
Returns a WebFilter object, which can be used to set a filter to be used when element browsing.
abstract int getFlags()
Returns the flags setting, which will be used for element browsing.
abstract int getLevel()
Returns the setting of the level parameter, a value used in hierarchy browsing which is not currently implemented on the backend.
abstract String getMessageID()
If the type is of type WebElementSourceWorkingSet, then this will return the message ID of the report instance of the working set that the elements will come from.
abstract WebObjectInfo getObject()
Returns the current attribute source object.
abstract String getRawInput()
Returns the user's raw input.
abstract String getResolutionXML()
Returns the resolution XML property.
abstract WebAttributeForm[] getSearchForms()
Returns the attribute forms which search pattern will be filtered on.
abstract boolean getSearchMatchCase()
abstract String getSearchPattern()
abstract int getType()
Returns the type of element source object, from EnumWebElementSourceType.
abstract boolean getUseBrowseForm()
Returns the useBrowseForm flag, which will be used for element browsing.
abstract boolean getUseClientForms()
Returns the useBrowseForm flag, which will be used for element browsing.
abstract void setAttributeFormsXML(String attributeFormsXML)
Sets the attribute forms XML, which specifies which attribute forms to return from an element browse.
abstract void setBlockBegin(int blockBegin)
Sets the blockBegin property, which will tell the first element to bring down when making an element browse call to the Intelligence Server.
abstract void setBlockCount(int blockCount)
Sets the blockCount property, which tells the Intelligence Server how many objects to return in the API call.
abstract void setBrowsePath(WebBrowsePath path)
abstract void setBrowsePathXML(String browsePathXML)
Sets the browse path XML.
abstract void setDataSources(String _dataSources)
abstract void setFlags(int flags)
Sets the flags setting to use when element browsing.
abstract void setLevel(int level)
Sets the level parameter, a value used in hierarchy browsing which is not implemented for this release.
abstract void setMessageID(String mid)
abstract void setObject(WebObjectInfo objectInfo)
Sets the source object in the case of an element source object obtained from a report instance.
abstract void setObjectCurrentCondition(Map<String, List<String>> webElements, Map<String, WebExpression> webExpressions)
Sets currently selected expression/elements, to populate result based on current selection.
abstract void setRawInput(String rawInput)
Sets the user's raw input for this search.
abstract void setResolutionXML(String resolutionXML)
Sets the resolution XML property.
abstract void setSearchForms(WebAttributeForm[] forms)
Sets the attribute forms which search pattern will be filtered on.
abstract void setSearchMatchCase(boolean matchCase)
Configures whether the attribute element search pattern is case sensitive.
abstract void setSearchPattern(String pattern)
Sets a search pattern for attribute element based searches.
abstract void setUseBrowseForm(boolean useBrowseForm)
Sets the flag that using browse forms when element browsing.
abstract void setUseClientForms(boolean useClientForms)
Sets the flag that using client forms when element browsing.

Public Methods

public abstract void changeType (int type, String messageID, String datasetID, String controlKey)

Throws
IllegalArgumentException

public abstract void changeType (int type)

Changes the element source type to the given type. Note that this method can only be used to change it to a project-based working set.

Parameters
type The type of working set that this is, from EnumWebElementSourceType.
Throws
IllegalArgumentException Thrown if the type is invalid, or a type of working set type is specified without a message ID.

public abstract void changeType (int type, String messageID)

Changes the element source type to the given type.

Parameters
type The type of working set that this is, from EnumWebElementSourceType.
messageID The message ID to use for a working set element source.
Throws
IllegalArgumentException Thrown if the type is invalid, or a type of working set type is specified without a message ID.

public abstract void changeType (int type, String messageID, String datasetID, String controlKey, String templateKey)

Throws
IllegalArgumentException

public abstract void changeType (int type, String messageID, String datasetID)

Changes the element source type to the given type.

Parameters
type The type of working set that this is, from EnumWebElementSourceType.
messageID The message ID to use for a working set element source.
datasetID The dataset object ID to use for a RW dataset element source.
Throws
IllegalArgumentException Thrown if the type is invalid, or a type of working set type is specified without a message ID.

public abstract WebBrowsePath createBrowsePath (WebDimension dimension)

Factory method for creating new WebBrowsePath instances. The new instance is not tied to this or any other WebElementSource - to associate the browse path with an element source, see setBrowsePath(WebBrowsePath).

Parameters
dimension dimension object underlying the browse path.
Returns
  • a new browse path.

public abstract String getAttributeFormsXML ()

Returns the attribute forms XML, which specifies which attribute forms to return from an element browse.

Returns
  • The current value of the attribute forms XML.

public abstract int getBlockBegin ()

Returns the blockBegin property, which will tell the first element to bring down when making an element browse call to the Intelligence Server. This, along with blockCount, enable the user to implement incremental fetch.

Returns
  • The current blockBegin setting.

public abstract int getBlockCount ()

Returns the blockCount property, which tells the Intelligence Server how many objects to return in the API call. Used to implement incremental fetch.

Returns
  • The current blockCount setting.

public abstract WebBrowsePath getBrowsePath ()

returns the browse path object associated with this instance.

Returns
  • persistable browse path object.
Throws
UnsupportedOperationException if the source is not set on the element source.

public abstract String getBrowsePathXML ()

Returns the browse path XML. The browse path XML is a substitute for a filter, and can be used to more efficiently apply simple filtering on single elements of attributes while element browsing.

Returns
  • The current browse path XML.

public abstract WebElements getElements ()

This method will build the elements collection for the attribute set as the attribute source, using the various properties set on this object.

Returns
  • The elements collection returned from the Intelligence Server.
Throws
WebObjectsException Signals an error in retrieving the elements XML from the Intelligence Server.

public abstract String getElementsXML ()

This method will obtain the elements XML for the attribute set as the attribute source, using the various properties set on this object. The element XML response from the Intelligence Server will be returned.

Returns
  • The element XML returned from the Intelligence Server.
Throws
WebObjectsException Signals an error in retrieving the elements XML from the Intelligence Server.

public abstract WebFilter getFilter ()

Returns a WebFilter object, which can be used to set a filter to be used when element browsing.

Returns
  • A WebFilter object, which is applied to any element browses.

public abstract int getFlags ()

Returns the flags setting, which will be used for element browsing.

Returns
  • The current flags value.
See Also

public abstract int getLevel ()

Returns the setting of the level parameter, a value used in hierarchy browsing which is not currently implemented on the backend.

Returns
  • the current setting of the level parameter.
See Also

public abstract String getMessageID ()

If the type is of type WebElementSourceWorkingSet, then this will return the message ID of the report instance of the working set that the elements will come from.

Returns
  • The message ID of the report instance that the elements are coming from.

public abstract WebObjectInfo getObject ()

Returns the current attribute source object. This is used to specify the object whose elements are to be retrieved.

Returns
  • A WebObjectInfo object, corresponding to the current object which will be browsed upon. This will return null if it is not set.

public abstract String getRawInput ()

Returns the user's raw input.

Returns
  • raw input

public abstract String getResolutionXML ()

Returns the resolution XML property. This is currently reserved, and should not be changed from the default value.

Returns
  • The current setting of the resolution XML.

public abstract WebAttributeForm[] getSearchForms ()

Returns the attribute forms which search pattern will be filtered on.

Returns
  • the WebAttributeForms the search pattern is filtered on. null will be returned if no forms specified. If not search forms specified, then search pattern will be used to filter on browse forms.

public abstract boolean getSearchMatchCase ()

Returns
  • whether the attribute element search pattern is case sensitive.

public abstract String getSearchPattern ()

Returns
  • attribute element search pattern

public abstract int getType ()

Returns the type of element source object, from EnumWebElementSourceType. This will tell the source of the elements retrieved from the element source object.

Returns

public abstract boolean getUseBrowseForm ()

Returns the useBrowseForm flag, which will be used for element browsing.

Returns
  • The current value.

public abstract boolean getUseClientForms ()

Returns the useBrowseForm flag, which will be used for element browsing.

Returns
  • The current value.

public abstract void setAttributeFormsXML (String attributeFormsXML)

Sets the attribute forms XML, which specifies which attribute forms to return from an element browse. The attribute forms XML format is:
<fct>
  <oi did="8D67A35B11D3E4981000E787EC6DE8A4"/>
  <oi did="8D67A36311D3E4981000E787EC6DE8A4"/>
  <oi did="8D67A36711D3E4981000E787EC6DE8A4"/>
</fct>
Where each did is the object ID of the attribute form to be displayed in the XML. Each element in the resultant XML will look like the following:
<e ei="8D679D3C11D3E4981000E787EC6DE8A4:3" emt="1" art="1">
  <fv bfi="1">Smith</fv>
  <fv bfi="3">107 South Terrace Dr</fv>
  <fv bfi="4">jsmith@hotmail.demo</fv>
</e>
In other words, each form specified in this call will be in a separate "fv" node. The form information sent will be contained as part of the attribute XML.

Parameters
attributeFormsXML The desired value for the attribute forms XML.

public abstract void setBlockBegin (int blockBegin)

Sets the blockBegin property, which will tell the first element to bring down when making an element browse call to the Intelligence Server. This, along with blockCount, enable the user to implement incremental fetch.

Parameters
blockBegin The blockBegin setting for future element browses.
See Also

public abstract void setBlockCount (int blockCount)

Sets the blockCount property, which tells the Intelligence Server how many objects to return in the API call. Used to implement incremental fetch.

Parameters
blockCount The blockCount setting for future element/hierarchy browse operations.
See Also

public abstract void setBrowsePath (WebBrowsePath path)

Parameters
path new browse path to be associated with this instance.

public abstract void setBrowsePathXML (String browsePathXML)

Sets the browse path XML. The browse path XML is a substitute for a filter, and can be used to more efficiently apply simple filtering on single elements of attributes while element browsing.

Parameters
browsePathXML The new value for the browse path XML.

public abstract void setDataSources (String _dataSources)

public abstract void setFlags (int flags)

Sets the flags setting to use when element browsing. This value comes from EnumDSSXMLGetElementsFlags.

Parameters
flags The new value of the flags property.
See Also

public abstract void setLevel (int level)

Sets the level parameter, a value used in hierarchy browsing which is not implemented for this release.

Parameters
level The value to use for the level parameter.
See Also

public abstract void setMessageID (String mid)

public abstract void setObject (WebObjectInfo objectInfo)

Sets the source object in the case of an element source object obtained from a report instance. This will determine the object which the getElementsXML method will return elements from.

Parameters
objectInfo A WebObjectInfo object referring to the object to retrieve elements for.
Throws
IllegalArgumentException Thrown if the object is null or is not an object which elements can be retrieved for.
UnsupportedOperationException Thrown if the source object is read-only or cannot be set because of the context of the object.
See Also

public abstract void setObjectCurrentCondition (Map<String, List<String>> webElements, Map<String, WebExpression> webExpressions)

Sets currently selected expression/elements, to populate result based on current selection. Used for getting target filter data based on current filter selections without actually applying the changes.

Parameters
webElements a map with key=Attribute/metric ObjectId (ex.E1925F9B4403BBAFCBE7AE82938CD354) , value = Array of elementIds (ex.["h201502;E71DB84A11D464AE900093B141733F27;2015 Q2", ...])
webExpressions a map with key=objectId, value= Array of populated webExpressionObjects. To generate WebExpression object refer to getControlExpression

public abstract void setRawInput (String rawInput)

Sets the user's raw input for this search.

Parameters
rawInput user's input string

public abstract void setResolutionXML (String resolutionXML)

Sets the resolution XML property. This is currently reserved, and should not be changed from the default value.

Parameters
resolutionXML The new value for the resolution XML.

public abstract void setSearchForms (WebAttributeForm[] forms)

Sets the attribute forms which search pattern will be filtered on. If not search forms specified, then search pattern will be used to filter on browse forms.

Parameters
forms The attribute forms which search pattern will be filtered on.

public abstract void setSearchMatchCase (boolean matchCase)

Configures whether the attribute element search pattern is case sensitive.

public abstract void setSearchPattern (String pattern)

Sets a search pattern for attribute element based searches.

Parameters
pattern attribute element search pattern.

public abstract void setUseBrowseForm (boolean useBrowseForm)

Sets the flag that using browse forms when element browsing.

Parameters
useBrowseForm The new value of the property.

public abstract void setUseClientForms (boolean useClientForms)

Sets the flag that using client forms when element browsing.

Parameters
useClientForms The new value of the property.