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 Detail

      • getFilter

        WebFilter getFilter()
                     throws WebObjectsException
        Returns a WebFilter 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

        @Deprecated
        SimpleList getObjectFilter()
        Deprecated.
        Returns a SimpleList object, which will allow Integer objects to be added to it. These Integers should correspond to values in EnumDSSXMLObjectTypes. 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 a WebFolder 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 a WebFolder 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 - A WebObjectInfo 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 - The WebObjectInfo object to search for on the template.
        Returns:
        True if the object is found, false otherwise.
      • 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 - A WebObjectInfo 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 new WebReportInstance 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 - A WebObjectInfo 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 - The WebObjectInfo 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 - The WebMetric 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 - The WebMetric 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.
      • 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 corresponding WebObjectInfo 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 from EnumDSSXMLObjectTypes.
        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 parameter objectName is null.
      • getObject

        WebObjectInfo getObject​(java.lang.String objectID,
                                int objectType)
                         throws java.lang.IllegalArgumentException
        Returns a corresponding WebObjectInfo 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 from EnumDSSXMLObjectTypes.
        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 parameter objectID is null.
      • 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, from EnumWebLimitSummaryFlags.
        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 a WebExpression 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 - The WebMDXDisplayUnit 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 if
        java.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
      • hasViewFilterOn

        boolean hasViewFilterOn​(WebObjectInfo objectInfo)
        Returns whether the report view filter contains an qualification on specified object
      • getXDATechnicalName

        java.lang.String getXDATechnicalName​(WebObjectInfo object)
      • isDerivedAttribute

        boolean isDerivedAttribute​(WebAttribute object)
                            throws java.lang.IllegalArgumentException
        Returns whether a specific attribute is derived or not.
        Parameters:
        object - The WebAttribute 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 - The WebAttribute 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 - The WebAttribute object.
        Returns:
        arity of a specific attribute
        Throws:
        java.lang.IllegalArgumentException
      • resetForms

        void resetForms​(WebAttribute attribute)
                 throws java.lang.UnsupportedOperationException
        Return the data type of a specific object, particularly for metrics.
        Parameters:
        attribute - The WebAttribute object.
        Throws:
        java.lang.UnsupportedOperationException - Thrown if the object is not supported.