Interface WebAttributeForms


  • public interface WebAttributeForms
    The WebAttributeForms interface represents a collection of attribute forms. This collection will be either read-only or read-write based upon its origin, and is index-based.
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void add​(WebAttributeForm form)
      Adds the given attribute form to the forms collection.
      void add​(WebAttributeForm form, int index)
      Adds the given attribute form to the forms collection at the given index.
      boolean contains​(WebAttributeForm form)
      Returns whether the given form is contained in the collection.
      java.util.Enumeration elements()
      Returns a java.util.Enumeration, which can be used to iterate through the collection.
      WebAttributeForm get​(int index)
      Returns the attribute form with the given index from the collection.
      WebAttributeForm get​(java.lang.String name)
      Returns the named attribute form from the collection.
      WebDisplayUnits getChildUnits()
      Returns the collection of child display units, or null if the object is not a collection.
      WebAttributeForm getIDForm()
      Returns the attribute ID form.
      int indexOf​(WebAttributeForm form)
      Returns the index of the given form in the collection.
      boolean isEmpty()
      Returns whether the collection is empty.
      void move​(int fromIndex, int toIndex)
      Moves the form from one position to another.
      void remove​(int index)
      Removes the form at the given index from the collection.
      void remove​(WebAttributeForm form)
      Removes the given form from the collection.
      int size()
      Returns the number of items in the collection.
    • Method Detail

      • add

        void add​(WebAttributeForm form)
          throws java.lang.IllegalArgumentException,
                 java.lang.UnsupportedOperationException
        Adds the given attribute form to the forms collection. It is only possible to add forms to the collections which are attached to the working set and template attributes.
        Parameters:
        form - The form object to add to the forms collection. If the form already exists in the collection, it will be moved to the end of the collection.
        Throws:
        java.lang.IllegalArgumentException - Thrown if the parameter is null.
        java.lang.UnsupportedOperationException - Thrown if the collection is read-only.
        Since:
        MicroStrategy Web 8.0.0
      • add

        void add​(WebAttributeForm form,
                 int index)
          throws java.lang.IllegalArgumentException,
                 java.lang.UnsupportedOperationException
        Adds the given attribute form to the forms collection at the given index. It is only possible to add forms to the collections which are attached to the working set and template attributes. All forms greater than or equal to the given index will be pushed back one position in the collection.
        Parameters:
        form - The form object to add to the forms collection. If the form already exists in the collection, it will be moved to the given index.
        index - The index of the collection to insert the form object at.
        Throws:
        java.lang.IllegalArgumentException - Thrown if the parameter is null.
        java.lang.UnsupportedOperationException - Thrown if the collection is read-only.
        Since:
        MicroStrategy Web 8.0.0
      • move

        void move​(int fromIndex,
                  int toIndex)
           throws java.lang.IllegalArgumentException,
                  java.lang.UnsupportedOperationException
        Moves the form from one position to another.
        Parameters:
        fromIndex - The index of the form to move (0-based).
        toIndex - The index the form should be moved to (0-based).
        Throws:
        java.lang.IllegalArgumentException - Thrown if either position is invalid.
        java.lang.UnsupportedOperationException - Thrown if the collection is read-only.
        Since:
        MicroStrategy Web 8.0.0
      • remove

        void remove​(WebAttributeForm form)
             throws java.lang.IllegalArgumentException,
                    java.lang.UnsupportedOperationException
        Removes the given form from the collection.
        Parameters:
        form - The form to remove from the collection.
        Throws:
        java.lang.IllegalArgumentException - Thrown if the parameter is null or not found in the collection.
        java.lang.UnsupportedOperationException - Thrown if the collection is read-only.
        Since:
        MicroStrategy Web 8.0.0
      • remove

        void remove​(int index)
             throws java.lang.IndexOutOfBoundsException,
                    java.lang.UnsupportedOperationException
        Removes the form at the given index from the collection.
        Parameters:
        index - The index of the form to remove from the collection.
        Throws:
        java.lang.IllegalArgumentException - Thrown if the given index does not exist.
        java.lang.UnsupportedOperationException - Thrown if the collection is read-only.
        java.lang.IndexOutOfBoundsException
        Since:
        MicroStrategy Web 8.0.0
      • get

        WebAttributeForm get​(int index)
                      throws java.lang.IndexOutOfBoundsException
        Returns the attribute form with the given index from the collection.
        Parameters:
        index - The index (0-based) of the WebAttributeForm to retrieve.
        Returns:
        A WebAttributeForm object with the given index within this collection.
        Throws:
        java.lang.IndexOutOfBoundsException - Indicates that the given index is invalid.
      • isEmpty

        boolean isEmpty()
        Returns whether the collection is empty.
        Returns:
        True if the collection is empty, false otherwise.
      • size

        int size()
        Returns the number of items in the collection.
        Returns:
        The number of forms in the collection.
      • contains

        boolean contains​(WebAttributeForm form)
        Returns whether the given form is contained in the collection.
        Parameters:
        form - The form to check for within the collection.
        Returns:
        Whether the form exists in the collection.
        Since:
        MicroStrategy Web 8.0.0
      • indexOf

        int indexOf​(WebAttributeForm form)
        Returns the index of the given form in the collection. Returns -1 if the given form is not found.
        Parameters:
        form - The form to search for in the collection
        Returns:
        The index of the form in the collection, or -1 if it is not found.
        Since:
        MicroStrategy Web 8.0.0
      • elements

        java.util.Enumeration elements()
        Returns a java.util.Enumeration, which can be used to iterate through the collection.
        Returns:
        An Enumeration containing the objects in this collection.
      • 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 - thrown if there is any error encountered.
      • get

        WebAttributeForm get​(java.lang.String name)
                      throws java.lang.IllegalArgumentException
        Returns the named attribute form from the collection.
        Parameters:
        name - the name of an attribute form
        Returns:
        the named attribute form.
        Throws:
        java.lang.IllegalArgumentException - thrown if there is no such a named attribute form.
        Since:
        MicroStrategy Web 8.0.1
      • getIDForm

        WebAttributeForm getIDForm()
        Returns the attribute ID form.
        Returns:
        the ID form. null if there is no ID form available.
        Since:
        MicroStrategy Web 8.0.1