Interface WebMessages


  • public interface WebMessages
    The WebMessages interface simply represents a collection of WebMessage objects. This object cannot be directly instantiated, and must instead be obtained from WebInboxSource interface
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Enumeration elements()
      Returns a java.util.Enumeration containing the items in the collection.
      WebMessage get​(int index)
      Return the WebMessage object according to the index.
      int getBlockSize()
      Returns the max number of items in any block of messages.
      WebDisplayUnits getChildUnits()
      Returns the collection of child display units, or null if the object is not a collection.
      int getMaxMessageCount()
      Returns the max number of messages per user inbox.
      int getMessageCount()
      Returns the total number of messages per user inbox including the child messages that are embedded in the document messages.
      int getSavedCount()
      Returns the count of the number of reports/documents from this collection that are saved on the Inbox Server
      int getSavedCount​(int requestType)
      Returns the count of the number of reports/documents from this collection that are saved on the Inbox Server filtered by the request Type.
      int getSortBy()
      Returns the current sorting field of EnumWebMessageSortByField on the current object.
      int getStartMessageIndex()
      Returns the index of the starting message in the user inbox when only partial content is returned.
      java.lang.String getTimeZone()
      Returns the time zone from the inbox content tag.
      boolean isEmpty()
      Return true if there is no WebMessage objects in the collection, else return false.
      boolean isSortAsc()
      Returns the current sorting order.
      void removeFromInbox()
      Removes all WebMessage objects currently in this collection.
      void setStatus​(int newStatus)
      Sets the status for all messages in this collection
      int size()
      Return the number of WebMessage in this collection
      void sort​(int newSortField)
      Sets the sorting field to the specified one and then sorts the collection in the default order -- ascending order.
      void sort​(int newSortField, boolean ascending)
      Sets the sorting field to the specified one and then sorts the collection in the specified sorting order.
    • Method Detail

      • get

        WebMessage get​(int index)
                throws java.lang.IndexOutOfBoundsException
        Return the WebMessage object according to the index.
        Parameters:
        index - 0-based index
        Returns:
        The WebMessage object according to the index
        Throws:
        java.lang.IndexOutOfBoundsException - If the index is less than 0 or greater than the size, an exception of IndexOutOfBoundsException will be thrown.
      • size

        int size()
        Return the number of WebMessage in this collection
        Returns:
        The number of WebMessage objects inside this collection.
      • isEmpty

        boolean isEmpty()
        Return true if there is no WebMessage objects in the collection, else return false.
        Returns:
        True if there is no WebMessage objects in the collection, else return false.
      • elements

        java.util.Enumeration elements()
        Returns a java.util.Enumeration containing the items in the collection.
        Returns:
        An Enumeration object containing the objects in the collection.
      • removeFromInbox

        void removeFromInbox()
                      throws WebObjectsException
        Removes all WebMessage objects currently in this collection. If any messages are still executing, their execution is cancelled.
        Throws:
        WebObjectsException - Thrown if an error occurs in the XML creation.
      • getBlockSize

        int getBlockSize()
        Returns the max number of items in any block of messages.
        Returns:
        The max number of items in any block of messages.
      • getStartMessageIndex

        int getStartMessageIndex()
        Returns the index of the starting message in the user inbox when only partial content is returned. The starting message and the block size determine the window of the inbox messages
        Returns:
        The index of the starting message in the user inbox when only partial content is returned.
      • getMaxMessageCount

        int getMaxMessageCount()
        Returns the max number of messages per user inbox.

        The default value of the max message count parameter is -1, which means that all messages will be brought back.

        Returns:
        The max number of messages per user inbox.
      • getMessageCount

        int getMessageCount()
        Returns the total number of messages per user inbox including the child messages that are embedded in the document messages.
        Returns:
        The total number of messages per user inbox including the child messages that are embedded in the document messages.
      • getTimeZone

        java.lang.String getTimeZone()
        Returns the time zone from the inbox content tag.
        Returns:
        The time zone from the inbox content tag.
      • setStatus

        void setStatus​(int newStatus)
                throws WebObjectsException
        Sets the status for all messages in this collection
        Throws:
        WebObjectsException - Thrown if an error occurs in the XML creation.
      • sort

        void sort​(int newSortField)
        Sets the sorting field to the specified one and then sorts the collection in the default order -- ascending order.
        Parameters:
        newSortField - the specified new sorting type of EnumWebMessageSortByField.
      • sort

        void sort​(int newSortField,
                  boolean ascending)
        Sets the sorting field to the specified one and then sorts the collection in the specified sorting order.
        Parameters:
        newSortField - the specified new sorting type of EnumWebMessageSortByField.
        ascending - specifying the sorting order. True if sorting in ascending order.
      • isSortAsc

        boolean isSortAsc()
        Returns the current sorting order.
        Returns:
        true if sorting order is ascending.
      • getSavedCount

        int getSavedCount()
                   throws WebObjectsException
        Returns the count of the number of reports/documents from this collection that are saved on the Inbox Server
        Returns:
        the count of the reports/documents from this messages collection saved on the Inbox Server
        Throws:
        WebObjectsException
      • getSavedCount

        int getSavedCount​(int requestType)
                   throws WebObjectsException
        Returns the count of the number of reports/documents from this collection that are saved on the Inbox Server filtered by the request Type. Possible request types are listed in EnumDSSXMLRequestTypes
        Returns:
        the count of the reports/documents (from this messages collection) of the request type saved on the Inbox Server
        Throws:
        WebObjectsException
      • getChildUnits

        WebDisplayUnits getChildUnits()
                               throws WebObjectsException
        Returns the collection of child display units, or null if the object is not a collection. Note that several display units are actually collections of display units as well.
        Returns:
        The collection of child display units of this instance, or null if this object is not a collection.
        Throws:
        WebObjectsException