Package com.microstrategy.web.objects
Interface WebWorkingSet
-
public interface WebWorkingSet
The WebWorkingSet interface allows access the working set and base filter of a report instance. This interface allows the user to obtain the working set subject to a filter on object type, along with supplying incremental fetch capabilities for the working set folder. In addition, objects can be removed from the base report using this interface.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
add(WebObjectInfo object)
Adds the given object to the working set.boolean
canAddMDXUnit(WebMDXDisplayUnit unit)
This method will tell whether the given MDX unit is acceptable to add to the report.java.lang.String
getAlias(WebObjectInfo object)
Returns the alias for an object which is in the working set folder.WebAttributeForms
getAllForms(WebAttribute attribute)
Returns all forms of the given attribute in the working set.int
getArity(WebAttribute object)
Returns arity of a specific attribute.WebAttributeForms
getBrowseFormsInWorkingSet(WebAttribute attribute)
This method returns the collection of the browse forms of the attribute which are available within the working set.WebDerivedElements
getDerivedElements(WebAttribute attribute)
WebElementSource
getElementSource()
Returns aWebElementSource
object, which can be used to browse elements within the working set.WebFilter
getFilter()
Returns aWebFilter
object, which contains the contents of the base filter (also known as the report filter or working set filter) of the report.WebAttributeForms
getForms(WebObjectInfo object)
Retrieve the forms of a particular object in the working set.java.lang.String
getFormula(WebMetric object)
Retrieves the formula of a particular derived metric in working set.WebExpression
getLimitSummary(int flags)
Returns a summary containing the full limit expression which constrains the working set.WebExpression
getMetricsLimit()
Returns the metrics limit, which is the limit on the metrics collection.WebObjectInfo
getObject(java.lang.String objectID, int objectType)
Returns a correspondingWebObjectInfo
object in this working set.WebObjectInfo
getObjectByName(java.lang.String objectName, int objectType)
Returns a correspondingWebObjectInfo
object in this working set.int
getObjectDataType(WebObjectInfo obj)
Return the data type of a specific object, particularly for metrics.SimpleList
getObjectFilter()
Deprecated.Use theWebFolder.findTypedObjects(int[])
instead.int
getSortBy()
Returns the sort by item used while retrieving the working set objects.WebAttributeForms
getTemplateForms(WebAttribute attribute)
Returns the template forms of the given attribute in the working set.WebExpression
getUnitLimit(WebObjectInfo object)
Returns aWebExpression
object describing the unit limit on the given object in the working set.WebAttributeForms
getViewForms(WebAttribute attribute)
Returns the view forms of the given attribute in the working set.WebAttributeForms
getWorkingSetForms(WebAttribute attribute)
Returns the working set forms of the given attribute in the working set.WebFolder
getWorkingSetObjects()
Returns the set of working set objects for the current report instance as aWebFolder
object.WebFolder
getWorkingSetObjects(int blockBegin, int blockCount)
Returns the set of working set objects for the current report instance as aWebFolder
object.java.lang.String
getXdaDimensionId(WebObjectInfo oi)
java.lang.String
getXdaHierarchyId(WebObjectInfo oi)
java.lang.String
getXDATechnicalName(WebObjectInfo object)
boolean
hasDerivedElements(WebObjectInfo obj)
boolean
hasViewFilterOn(WebObjectInfo objectInfo)
Returns whether the report view filter contains an qualification on specified objectboolean
isDerivedAttribute(WebAttribute object)
Returns whether a specific attribute is derived or not.boolean
isDerivedMetric(WebMetric object)
Returns whether a specific metric in working set is derived or not.boolean
isFormOnView(WebAttribute attribute, WebAttributeForm form)
Returns whether the given form is in the view forms of the given attribute.boolean
isFormOnWorkingSet(WebAttribute attribute, WebAttributeForm form)
Returns whether the given form is in the working set forms of the given attribute.boolean
isLockedAttribute(WebAttribute object)
Returns whether a specific attribute is locked for element browser.boolean
isOnTemplate(WebObjectInfo object)
Returns whether the given working set object is currently on the template.boolean
isPassThrough(WebObjectInfo object)
boolean
isSortAsc()
Returns whether the sort by will be ascending or descending.WebObjectInfo
optObject(java.lang.String objectID)
WebReportInstance
removeUnit(WebObjectInfo object)
Removes an object from the working set of the report.WebReportInstance
removeUnit(WebObjectInfo object, boolean applyNow)
Removes an object from the working set of the report.void
setSortAsc(boolean ascending)
Sets the sort by item to be either ascending or descending.void
setSortBy(int field)
Sets the sort by item value.void
setXdaInfo(WebObjectInfo oi, java.lang.String xdaDimensionId, java.lang.String xdaHierarchyId)
-
-
-
Method Detail
-
getFilter
WebFilter getFilter() throws WebObjectsException
Returns aWebFilter
object, which contains the contents of the base filter (also known as the report filter or working set filter) of the report. This is equivalent to getFilter(true).- Returns:
- A
WebFilter
object which contains the filter information for this report instance. - Throws:
WebObjectsException
- Indicates an inability to obtain the filter definition from the Intelligence Server.
-
getObjectFilter
SimpleList getObjectFilter()
Deprecated.Use theWebFolder.findTypedObjects(int[])
instead.Returns aSimpleList
object, which will allow Integer objects to be added to it. These Integers should correspond to values inEnumDSSXMLObjectTypes
. If this list is nonempty when getWorkingSetObjects is called, the list of objects returned will be the objects from the working set which are of one of the types set on this object. Note that this filter is applied before incremental fetch is applied.- Returns:
- A
SimpleList
, which can be used to view, add, and remove items from the object filter.
-
getWorkingSetObjects
WebFolder getWorkingSetObjects() throws WebObjectsException
Returns the set of working set objects for the current report instance as aWebFolder
object. If the object filter was set, then the objects returned will be only those objects in the working set which fit the filter criteria. If the sortBy parameter is set, then the list of objects in the folder will be sorted.- Returns:
- A
WebFolder
object, containing the objects in this report's working set. - Throws:
WebObjectsException
- Thrown if an error occurs in obtaining the working set objects.
-
getWorkingSetObjects
WebFolder getWorkingSetObjects(int blockBegin, int blockCount) throws WebObjectsException
Returns the set of working set objects for the current report instance as aWebFolder
object. If the object filter was set, then the objects returned will be only those objects in the working set which fit the filter criteria. Note that this method supports incremental fetch. The incremental fetch boundaries will be applied after applying the filter. If the sortBy parameter is set, then the list of objects in the folder will be sorted.- Parameters:
blockBegin
- The first object in the working set collection to return.blockCount
- The total number of objects to return from the working set collection.- Returns:
- A
WebFolder
object, containing the objects in this report's working set. - Throws:
WebObjectsException
- Thrown if an error occurs in obtaining the working set objects.
-
getAlias
java.lang.String getAlias(WebObjectInfo object) throws java.lang.IllegalArgumentException
Returns the alias for an object which is in the working set folder.- Parameters:
object
- AWebObjectInfo
object which is in the working set folder.- Returns:
- The alias of the given object in the working set.
- Throws:
java.lang.IllegalArgumentException
- Thrown if the given object is not in the working set.
-
isOnTemplate
boolean isOnTemplate(WebObjectInfo object)
Returns whether the given working set object is currently on the template.- Parameters:
object
- TheWebObjectInfo
object to search for on the template.- Returns:
- True if the object is found, false otherwise.
-
getElementSource
WebElementSource getElementSource()
Returns aWebElementSource
object, which can be used to browse elements within the working set.- Returns:
- A
WebElementSource
object linked to this working set.
-
removeUnit
WebReportInstance removeUnit(WebObjectInfo object) throws java.lang.IllegalArgumentException, WebObjectsException, WebReportValidationException
Removes an object from the working set of the report. This will also cause any other manipulations made to be applied to the report. Returns the resultant report instance.- Parameters:
object
- AWebObjectInfo
object referring to the object to remove from the working set of the report.- Returns:
- A
WebReportInstance
referring to the report resulting from this call. - Throws:
java.lang.IllegalArgumentException
- Thrown if the input parameter is null, or input object does not represent an object in the workingset.WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.WebReportValidationException
- Signals a report validation error from the Intelligence Server.
-
removeUnit
WebReportInstance removeUnit(WebObjectInfo object, boolean applyNow) throws java.lang.IllegalArgumentException, WebObjectsException, WebReportValidationException
Removes an object from the working set of the report. The applyNow parameter will determine whether the changes will be applied immediately, or simply added to the string of manipulations on the report instance without sending the changes to the Intelligence Server. If the applyNow parameter is true, a newWebReportInstance
object will be returned, which will refer to a report instance on the Intelligence Server with the requested changes. If the applyNow parameter is false, the report instance which owns the WebWorkingSet object will be returned. This object should already be held by the user, and thus should not be of any importance in this use case.- Parameters:
object
- AWebObjectInfo
object referring to the object to remove from the working set of the report.applyNow
- Tells the API whether to apply the change now by sending all changes to the Intelligence Server or simply add the manipulation to the current report instance without applying the changes.- Returns:
- A
WebReportInstance
referring to the report resulting from this call. - Throws:
java.lang.IllegalArgumentException
- Thrown if the input parameter is null, or input object does not represent an object in the workingset.WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.WebReportValidationException
- Signals a report validation error from the Intelligence Server.
-
getForms
WebAttributeForms getForms(WebObjectInfo object) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException
Retrieve the forms of a particular object in the working set.- Parameters:
object
- TheWebObjectInfo
object which is in the working set folder.- Returns:
- the
WebAttributeForms
object which inclues all the forms for this object. When there is no form specified for this object, this object is an empty collection. - Throws:
java.lang.IllegalArgumentException
- Thrown if the object is not of type attribute, dimension or custom group, or this object is not in workingset.java.lang.UnsupportedOperationException
- Thrown if the object is of type dimension and custorm group, since currently we do not support them
-
getFormula
java.lang.String getFormula(WebMetric object) throws java.lang.IllegalArgumentException
Retrieves the formula of a particular derived metric in working set.- Parameters:
object
- TheWebMetric
object which is in the working set folder.- Returns:
- The formula for this derived metric.
- Throws:
java.lang.IllegalArgumentException
- Thrown if the object is null, or object is not in workingset, or object is not a derived metric.
-
isDerivedMetric
boolean isDerivedMetric(WebMetric object) throws java.lang.IllegalArgumentException
Returns whether a specific metric in working set is derived or not.- Parameters:
object
- TheWebMetric
object which is in the working set folder.- Returns:
- true if this metric is derived metric, else returns false.
- Throws:
java.lang.IllegalArgumentException
- Thrown if the object is null, or object is not in workingset.
-
getSortBy
int getSortBy()
Returns the sort by item used while retrieving the working set objects. FromEnumWebWorkingSetSortByField
- Returns:
- the sort by item used.
- See Also:
setSortBy(int)
-
setSortBy
void setSortBy(int field)
Sets the sort by item value. FromEnumWebWorkingSetSortByField
- Parameters:
field
- The value of the sort by item.- See Also:
getSortBy()
-
isSortAsc
boolean isSortAsc()
Returns whether the sort by will be ascending or descending.- Returns:
- whether the sort by will be ascending or descending.
-
setSortAsc
void setSortAsc(boolean ascending)
Sets the sort by item to be either ascending or descending.- Parameters:
ascending
- Indicates whether the sort by is ascending or descending.
-
getObjectByName
WebObjectInfo getObjectByName(java.lang.String objectName, int objectType) throws java.lang.IllegalArgumentException
Returns a correspondingWebObjectInfo
object in this working set. The returned WebObjectInfo object will be populated with the object's definition in this working set.- Parameters:
objectName
- The name of the object.objectType
- The type of the object. This value comes fromEnumDSSXMLObjectTypes
.- Returns:
- A
WebObjectInfo
object corresponding to a WebObjectInfo object in this working set, with the given name and type. - Throws:
java.lang.IllegalArgumentException
- Thrown if the object could not be found in this working set, or the parameterobjectName
isnull
.
-
getObject
WebObjectInfo getObject(java.lang.String objectID, int objectType) throws java.lang.IllegalArgumentException
Returns a correspondingWebObjectInfo
object in this working set. The returned WebObjectInfo object will be populated with the object's definition in this working set.- Parameters:
objectID
- The DSS ID of the object.objectType
- The type of the object. This value comes fromEnumDSSXMLObjectTypes
.- Returns:
- A
WebObjectInfo
object corresponding to a WebObjectInfo object in this working set, with the given DSS ID and type. - Throws:
java.lang.IllegalArgumentException
- Thrown if the object could not be found in this working set, or the parameterobjectID
isnull
.
-
optObject
WebObjectInfo optObject(java.lang.String objectID) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
getWorkingSetForms
WebAttributeForms getWorkingSetForms(WebAttribute attribute) throws java.lang.IllegalArgumentException
Returns the working set forms of the given attribute in the working set.- Parameters:
attribute
- The attribute to get the forms for. This attribute must be in the working set.- Returns:
- A
WebAttributeForms
collection containing the working set forms of the attribute. If the Intelligence Server supports form editing, this collection will be read/write. - Throws:
java.lang.IllegalArgumentException
- Thrown if the attribute is not found in the working set, or if it is null.- Since:
- MicroStrategy Web 8.0.0
-
getViewForms
WebAttributeForms getViewForms(WebAttribute attribute) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException
Returns the view forms of the given attribute in the working set. This will only work on Intelligence Servers 7.2.2 and later.- Parameters:
attribute
- The attribute to get the view forms for. This attribute must be in the working set.- Returns:
- An editable
WebAttributeForms
collection of view forms. - Throws:
java.lang.IllegalArgumentException
- Thrown if the attribute is null or not found in the working set.java.lang.UnsupportedOperationException
- Thrown if the Intelligence Server does not support view form retrieval from the working set.- Since:
- MicroStrategy Web 8.0.0
-
getAllForms
WebAttributeForms getAllForms(WebAttribute attribute) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException
Returns all forms of the given attribute in the working set. This will only work on Intelligence Servers 7.2.2 or later.- Parameters:
attribute
- The attribute to return the forms for.- Returns:
- A read-only
WebAttributeForms
object which contains all forms for the attribute. - Throws:
java.lang.IllegalArgumentException
- Thrown if the attribute is null or does not exist in the working set.java.lang.UnsupportedOperationException
- Thrown if the Intelligence Server does not support retrieval of all forms from the working set.- Since:
- MicroStrategy Web 8.0.0
-
isFormOnWorkingSet
boolean isFormOnWorkingSet(WebAttribute attribute, WebAttributeForm form) throws java.lang.UnsupportedOperationException
Returns whether the given form is in the working set forms of the given attribute.- Parameters:
attribute
- The attribute in the working set to check.form
- The form to check for within the working set.- Returns:
- Whether the given form is in the working set forms of the given attribute. If the attribute or form is invalid, this method will return false.
- Throws:
java.lang.UnsupportedOperationException
- Thrown if the Intelligence Server is earlier than 7.2.2.- Since:
- MicroStrategy Web 8.0.0
-
isFormOnView
boolean isFormOnView(WebAttribute attribute, WebAttributeForm form) throws java.lang.UnsupportedOperationException
Returns whether the given form is in the view forms of the given attribute.- Parameters:
attribute
- The attribute in the working set to check.form
- The form to check for within the view forms.- Returns:
- Whether the given form is in the view forms of the given attribute. If the attribute or form is invalid, this method will return false.
- Throws:
java.lang.UnsupportedOperationException
- Thrown if the Intelligence Server is earlier than 7.2.2.- Since:
- MicroStrategy Web 8.0.0
-
add
void add(WebObjectInfo object) throws WebObjectsException, java.lang.UnsupportedOperationException, java.lang.IllegalArgumentException
Adds the given object to the working set.- Parameters:
object
- The object to add to the working set.- Throws:
WebObjectsException
- Thrown if an error occurs in the operation.java.lang.UnsupportedOperationException
- Thrown if the I-Server does not support this operation (it is only supported in 7.2.3 or later).java.lang.IllegalArgumentException
- Thrown if the object is null or already exists in the working set.- Since:
- MicroStrategy Web 8.0.0
-
getLimitSummary
WebExpression getLimitSummary(int flags) throws WebObjectsException
Returns a summary containing the full limit expression which constrains the working set. This summary cannot be edited. This expression will be made up of the combination of the unit limits on each object in the working set, and the metrics limit on the metrics collection.- Parameters:
flags
- Which limit summary to return, fromEnumWebLimitSummaryFlags
.- Returns:
- A summary containing the full limit expression, built using the unit limits and the metrics limit..
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 8.0.0
-
getUnitLimit
WebExpression getUnitLimit(WebObjectInfo object)
Returns aWebExpression
object describing the unit limit on the given object in the working set.- Parameters:
object
- The working set object to retrieve the unit limit for.- Returns:
- A
WebExpression
object representing the unit limit on the object. - Since:
- MicroStrategy Web 8.0.0
-
getMetricsLimit
WebExpression getMetricsLimit()
Returns the metrics limit, which is the limit on the metrics collection.- Returns:
- A
WebExpression
object representing the limit on the metrics collection. - Since:
- MicroStrategy Web 8.0.0
-
getTemplateForms
WebAttributeForms getTemplateForms(WebAttribute attribute) throws java.lang.IllegalArgumentException
Returns the template forms of the given attribute in the working set.- Parameters:
attribute
- The attribute to get the forms for. This attribute must be in the working set.- Returns:
- A
WebAttributeForms
collection containing the template forms of the attribute. If the Intelligence Server supports form editing, this collection will be read/write. - Throws:
java.lang.IllegalArgumentException
- Thrown if the attribute is not found in the working set, or if it is null.- Since:
- MicroStrategy Web 8.0.0
-
canAddMDXUnit
boolean canAddMDXUnit(WebMDXDisplayUnit unit) throws WebObjectsException
This method will tell whether the given MDX unit is acceptable to add to the report. This is provided because when editing an MDX-based report, it is possible that the report may have a restriction on whether units in different hierarchies of the same dimension are allowed on the report. If they are not, then this method can be used to determine whether the given object is eligible for addition to the report.- Parameters:
unit
- TheWebMDXDisplayUnit
object to be checked.- Returns:
- Whether the object is legal to be added to the report or not. This will also apply to child objects - for example, if a hierarchy is passed, then if this returns false, all attributes of the hierarchy are forbidden.
- Throws:
WebObjectsException
- Thrown if an error occurs when retrieving information about the object.- Since:
- MicroStrategy Web 8.0.2
-
setXdaInfo
void setXdaInfo(WebObjectInfo oi, java.lang.String xdaDimensionId, java.lang.String xdaHierarchyId)
- Since:
- MicroStrategy Web 8.0.2
-
getXdaDimensionId
java.lang.String getXdaDimensionId(WebObjectInfo oi)
- Since:
- MicroStrategy Web 9.3.2
-
getXdaHierarchyId
java.lang.String getXdaHierarchyId(WebObjectInfo oi)
- Since:
- MicroStrategy Web 9.3.2
-
getBrowseFormsInWorkingSet
WebAttributeForms getBrowseFormsInWorkingSet(WebAttribute attribute) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException
This method returns the collection of the browse forms of the attribute which are available within the working set.- Parameters:
attribute
- The attribute to get the forms for. This attribute must be in the working set.- Returns:
- the collection of the browse forms.
- Throws:
java.lang.IllegalArgumentException
- Thrown ifjava.lang.UnsupportedOperationException
- Thrown if the Intelligence Server is earlier than 7.2.2.- Since:
- MicroStrategy Web 8.1.2
-
hasDerivedElements
boolean hasDerivedElements(WebObjectInfo obj) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException
- Throws:
java.lang.IllegalArgumentException
java.lang.UnsupportedOperationException
- Since:
- MicroStrategy Web 9.0.0
-
getDerivedElements
WebDerivedElements getDerivedElements(WebAttribute attribute)
-
hasViewFilterOn
boolean hasViewFilterOn(WebObjectInfo objectInfo)
Returns whether the report view filter contains an qualification on specified object
-
getXDATechnicalName
java.lang.String getXDATechnicalName(WebObjectInfo object)
-
isPassThrough
boolean isPassThrough(WebObjectInfo object)
-
isDerivedAttribute
boolean isDerivedAttribute(WebAttribute object) throws java.lang.IllegalArgumentException
Returns whether a specific attribute is derived or not.- Parameters:
object
- TheWebAttribute
object.- Returns:
- true if this attribute is derived, else returns false.
- Throws:
java.lang.IllegalArgumentException
- Thrown if the object is null.
-
getObjectDataType
int getObjectDataType(WebObjectInfo obj) throws java.lang.IllegalArgumentException
Return the data type of a specific object, particularly for metrics.- Parameters:
obj
-- Returns:
- value from
EnumDSSXMLDataType
- Throws:
java.lang.IllegalArgumentException
-
isLockedAttribute
boolean isLockedAttribute(WebAttribute object) throws java.lang.IllegalArgumentException
Returns whether a specific attribute is locked for element browser.- Parameters:
object
- TheWebAttribute
object.- Returns:
- true if this attribute is locked, else returns false;
- Throws:
java.lang.IllegalArgumentException
-
getArity
int getArity(WebAttribute object) throws java.lang.IllegalArgumentException
Returns arity of a specific attribute.- Parameters:
object
- TheWebAttribute
object.- Returns:
- arity of a specific attribute
- Throws:
java.lang.IllegalArgumentException
-
-