Package com.microstrategy.web.objects
Interface WebElementSource
-
public interface WebElementSource
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.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
changeType(int type)
Changes the element source type to the given type.void
changeType(int type, java.lang.String messageID)
Changes the element source type to the given type.void
changeType(int type, java.lang.String messageID, java.lang.String datasetID)
Changes the element source type to the given type.void
changeType(int type, java.lang.String messageID, java.lang.String datasetID, java.lang.String controlKey)
void
changeType(int type, java.lang.String messageID, java.lang.String datasetID, java.lang.String controlKey, java.lang.String templateKey)
WebBrowsePath
createBrowsePath(WebDimension dimension)
Factory method for creating newWebBrowsePath
instances.java.lang.String
getAttributeFormsXML()
Returns the attribute forms XML, which specifies which attribute forms to return from an element browse.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.int
getBlockCount()
Returns the blockCount property, which tells the Intelligence Server how many objects to return in the API call.WebBrowsePath
getBrowsePath()
returns the browse path object associated with this instance.java.lang.String
getBrowsePathXML()
Returns the browse path XML.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.java.lang.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.WebFilter
getFilter()
Returns aWebFilter
object, which can be used to set a filter to be used when element browsing.int
getFlags()
Returns the flags setting, which will be used for element browsing.int
getLevel()
Returns the setting of the level parameter, a value used in hierarchy browsing which is not currently implemented on the backend.java.lang.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.WebObjectInfo
getObject()
Returns the current attribute source object.java.lang.String
getRawInput()
Returns the user's raw input.java.lang.String
getResolutionXML()
Returns the resolution XML property.WebAttributeForm[]
getSearchForms()
Returns the attribute forms which search pattern will be filtered on.boolean
getSearchMatchCase()
java.lang.String
getSearchPattern()
int
getType()
Returns the type of element source object, fromEnumWebElementSourceType
.boolean
getUseBrowseForm()
Returns the useBrowseForm flag, which will be used for element browsing.boolean
getUseClientForms()
Returns the useBrowseForm flag, which will be used for element browsing.void
setAttributeForms(java.util.List<java.lang.String> formIds)
Sets the attribute form IDs.void
setAttributeFormsXML(java.lang.String attributeFormsXML)
Sets the attribute forms XML, which specifies which attribute forms to return from an element browse.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.void
setBlockCount(int blockCount)
Sets the blockCount property, which tells the Intelligence Server how many objects to return in the API call.void
setBrowsePath(WebBrowsePath path)
void
setBrowsePathXML(java.lang.String browsePathXML)
Sets the browse path XML.void
setDataSources(java.lang.String _dataSources)
void
setFilter(WebFilter filter)
Sets aWebFilter
object, which can be used when browsing element.void
setFlags(int flags)
Sets the flags setting to use when element browsing.void
setLevel(int level)
Sets the level parameter, a value used in hierarchy browsing which is not implemented for this release.void
setMessageID(java.lang.String mid)
void
setObject(WebObjectInfo objectInfo)
Sets the source object in the case of an element source object obtained from a report instance.void
setObjectCurrentCondition(java.util.Map<java.lang.String,java.util.List<java.lang.String>> webElements, java.util.Map<java.lang.String,WebExpression> webExpressions)
Sets currently selected expression/elements, to populate result based on current selection.void
setRawInput(java.lang.String rawInput)
Sets the user's raw input for this search.void
setResolutionXML(java.lang.String resolutionXML)
Sets the resolution XML property.void
setSearchForms(WebAttributeForm[] forms)
Sets the attribute forms which search pattern will be filtered on.void
setSearchMatchCase(boolean matchCase)
Configures whether the attribute element search pattern is case sensitive.void
setSearchPattern(java.lang.String pattern)
Sets a search pattern for attribute element based searches.void
setUseBrowseForm(boolean useBrowseForm)
Sets the flag that using browse forms when element browsing.void
setUseClientForms(boolean useClientForms)
Sets the flag that using client forms when element browsing.
-
-
-
Method Detail
-
setObject
void setObject(WebObjectInfo objectInfo) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException
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
- AWebObjectInfo
object referring to the object to retrieve elements for.- Throws:
java.lang.IllegalArgumentException
- Thrown if the object is null or is not an object which elements can be retrieved for.java.lang.UnsupportedOperationException
- Thrown if the source object is read-only or cannot be set because of the context of the object.- See Also:
getObject()
-
getObject
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. - See Also:
setObject(com.microstrategy.web.objects.WebObjectInfo)
-
getFilter
WebFilter getFilter()
Returns aWebFilter
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.
-
setFilter
void setFilter(WebFilter filter) throws WebObjectsException
Sets aWebFilter
object, which can be used when browsing element.- Parameters:
filter
- element browsing filter.- Throws:
WebObjectsException
- Signals an error when the filter type isn't right.
-
setSearchPattern
void setSearchPattern(java.lang.String pattern)
Sets a search pattern for attribute element based searches.- Parameters:
pattern
- attribute element search pattern.- Since:
- MicroStrategy Web 9.0.0
-
getSearchPattern
java.lang.String getSearchPattern()
- Returns:
- attribute element search pattern
- Since:
- MicroStrategy Web 9.0.0
- See Also:
setSearchPattern(String)
-
setSearchMatchCase
void setSearchMatchCase(boolean matchCase)
Configures whether the attribute element search pattern is case sensitive.- Parameters:
matchCase
-- Since:
- MicroStrategy Web 9.0.0
- See Also:
setSearchPattern(String)
-
getSearchMatchCase
boolean getSearchMatchCase()
- Returns:
- whether the attribute element search pattern is case sensitive.
- Since:
- MicroStrategy Web 9.0.0
- See Also:
setSearchMatchCase(boolean)
-
getElements
WebElements getElements() throws WebObjectsException
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.
-
getElementsXML
java.lang.String getElementsXML() throws WebObjectsException
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.
-
getBlockBegin
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.
- See Also:
setBlockBegin(int)
-
setBlockBegin
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:
getBlockBegin()
-
getBlockCount
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.
- See Also:
setBlockCount(int)
-
setBlockCount
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:
getBlockCount()
-
getFlags
int getFlags()
Returns the flags setting, which will be used for element browsing.- Returns:
- The current flags value.
- See Also:
setFlags(int)
-
setFlags
void setFlags(int flags)
Sets the flags setting to use when element browsing. This value comes fromEnumDSSXMLGetElementsFlags
.- Parameters:
flags
- The new value of the flags property.- See Also:
getFlags()
-
setUseBrowseForm
void setUseBrowseForm(boolean useBrowseForm)
Sets the flag that using browse forms when element browsing.- Parameters:
useBrowseForm
- The new value of the property.- See Also:
getUseBrowseForm()
-
getUseBrowseForm
boolean getUseBrowseForm()
Returns the useBrowseForm flag, which will be used for element browsing.- Returns:
- The current value.
- See Also:
setUseBrowseForm(boolean)
-
setUseClientForms
void setUseClientForms(boolean useClientForms)
Sets the flag that using client forms when element browsing.- Parameters:
useClientForms
- The new value of the property.- See Also:
getUseBrowseForm()
-
getUseClientForms
boolean getUseClientForms()
Returns the useBrowseForm flag, which will be used for element browsing.- Returns:
- The current value.
- See Also:
setUseBrowseForm(boolean)
-
getLevel
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:
setLevel(int)
-
setLevel
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:
getLevel()
-
getAttributeFormsXML
java.lang.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.
- See Also:
setAttributeFormsXML(java.lang.String)
-
setAttributeFormsXML
void setAttributeFormsXML(java.lang.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.- See Also:
getAttributeFormsXML()
-
setAttributeForms
void setAttributeForms(java.util.List<java.lang.String> formIds)
Sets the attribute form IDs. The form IDs will be used to construct the attribute form XML.It has specified which attribute forms to return from an element browse. Please note that if the form not exist in the attribute, then no related value will returned.- Parameters:
formIds
- The desired form ids.
-
getBrowsePathXML
java.lang.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.
- See Also:
setBrowsePathXML(java.lang.String)
,setBrowsePath(WebBrowsePath)
-
setBrowsePathXML
void setBrowsePathXML(java.lang.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.- See Also:
getBrowsePathXML()
,getBrowsePath()
-
getResolutionXML
java.lang.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.
- See Also:
setResolutionXML(java.lang.String)
-
setResolutionXML
void setResolutionXML(java.lang.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.- See Also:
getResolutionXML()
-
getType
int getType()
Returns the type of element source object, fromEnumWebElementSourceType
. This will tell the source of the elements retrieved from the element source object.- Returns:
- The type of element source object, from
EnumWebElementSourceType
.
-
setMessageID
void setMessageID(java.lang.String mid)
-
getMessageID
java.lang.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.
-
changeType
void changeType(int type) throws java.lang.IllegalArgumentException
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, fromEnumWebElementSourceType
.- Throws:
java.lang.IllegalArgumentException
- Thrown if the type is invalid, or a type of working set type is specified without a message ID.
-
changeType
void changeType(int type, java.lang.String messageID) throws java.lang.IllegalArgumentException
Changes the element source type to the given type.- Parameters:
type
- The type of working set that this is, fromEnumWebElementSourceType
.messageID
- The message ID to use for a working set element source.- Throws:
java.lang.IllegalArgumentException
- Thrown if the type is invalid, or a type of working set type is specified without a message ID.
-
changeType
void changeType(int type, java.lang.String messageID, java.lang.String datasetID) throws java.lang.IllegalArgumentException
Changes the element source type to the given type.- Parameters:
type
- The type of working set that this is, fromEnumWebElementSourceType
.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:
java.lang.IllegalArgumentException
- Thrown if the type is invalid, or a type of working set type is specified without a message ID.- Since:
- MicroStrategy Web 8.0.1
-
changeType
void changeType(int type, java.lang.String messageID, java.lang.String datasetID, java.lang.String controlKey) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
changeType
void changeType(int type, java.lang.String messageID, java.lang.String datasetID, java.lang.String controlKey, java.lang.String templateKey) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
setDataSources
void setDataSources(java.lang.String _dataSources)
- Since:
- MicroStrategy Web 8.0.2
-
getBrowsePath
WebBrowsePath getBrowsePath() throws java.lang.UnsupportedOperationException
returns the browse path object associated with this instance.- Returns:
- persistable browse path object.
- Throws:
java.lang.UnsupportedOperationException
- if the source is not set on the element source.- Since:
- MicroStrategy Web 9.0.0
-
setBrowsePath
void setBrowsePath(WebBrowsePath path)
- Parameters:
path
- new browse path to be associated with this instance.- Since:
- MicroStrategy Web 9.0.0
-
createBrowsePath
WebBrowsePath createBrowsePath(WebDimension dimension)
Factory method for creating newWebBrowsePath
instances. The new instance is not tied to this or any otherWebElementSource
- to associate the browse path with an element source, seesetBrowsePath(WebBrowsePath)
.- Parameters:
dimension
- dimension object underlying the browse path.- Returns:
- a new browse path.
- Since:
- MicroStrategy Web 9.0.0
-
setSearchForms
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.
-
getSearchForms
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.
-
setRawInput
void setRawInput(java.lang.String rawInput)
Sets the user's raw input for this search.- Parameters:
rawInput
- user's input string
-
getRawInput
java.lang.String getRawInput()
Returns the user's raw input.- Returns:
- raw input
-
setObjectCurrentCondition
void setObjectCurrentCondition(java.util.Map<java.lang.String,java.util.List<java.lang.String>> webElements, java.util.Map<java.lang.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 togetControlExpression
-
-