public interface

WebAttributeForms

com.microstrategy.web.objects.WebAttributeForms

Class Overview

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.

Summary

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

Public Methods

public abstract void add (WebAttributeForm form, int index)

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
IllegalArgumentException Thrown if the parameter is null.
UnsupportedOperationException Thrown if the collection is read-only.

public abstract void add (WebAttributeForm form)

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
IllegalArgumentException Thrown if the parameter is null.
UnsupportedOperationException Thrown if the collection is read-only.

public abstract 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.

public abstract 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.

public abstract WebAttributeForm get (int index)

Returns the attribute form with the given index from the collection.

Parameters
index The index (0-based) of the WebAttributeForm to retrieve.
Returns
Throws
IndexOutOfBoundsException Indicates that the given index is invalid.

public abstract WebAttributeForm get (String name)

Returns the named attribute form from the collection.

Parameters
name the name of an attribute form
Returns
  • the named attribute form.
Throws
IllegalArgumentException thrown if there is no such a named attribute form.

public abstract WebDisplayUnits getChildUnits ()

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.

public abstract WebAttributeForm getIDForm ()

Returns the attribute ID form.

Returns
  • the ID form. null if there is no ID form available.

public abstract 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.

public abstract boolean isEmpty ()

Returns whether the collection is empty.

Returns
  • True if the collection is empty, false otherwise.

public abstract void move (int fromIndex, int toIndex)

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
IllegalArgumentException Thrown if either position is invalid.
UnsupportedOperationException Thrown if the collection is read-only.

public abstract void remove (WebAttributeForm form)

Removes the given form from the collection.

Parameters
form The form to remove from the collection.
Throws
IllegalArgumentException Thrown if the parameter is null or not found in the collection.
UnsupportedOperationException Thrown if the collection is read-only.

public abstract void remove (int index)

Removes the form at the given index from the collection.

Parameters
index The index of the form to remove from the collection.
Throws
IllegalArgumentException Thrown if the given index does not exist.
UnsupportedOperationException Thrown if the collection is read-only.
IndexOutOfBoundsException

public abstract int size ()

Returns the number of items in the collection.

Returns
  • The number of forms in the collection.