public interface

WebProperties

com.microstrategy.web.objects.WebProperties

Class Overview

Interface for WebProperties. This is an interface for a group of properties, which are not from Meta Data. The difference between this interface and WebPropertySet is that WebPropertySet is a read-only collection, and represents a group of properties from Meta Data. The similarity is that both of them represent a collection of WebProperty objects. One usage of this interface is for web to create a group of properties, which can be submitted with report execution. From this interface, we can add a property into this set, remove a property, clear the set, get the delta property XML, load the set from an XML. This interface cannot be directly instantated, but is returned from many different places within the Web Objects to represent a set of properties.

Summary

Public Methods
abstract WebProperty add(int propertyID, String propertyName, String propertyValue)
Add a property into WebProperties collection.
abstract void clear()
Clear all properties inside this object.
abstract Enumeration elements()
Return an enumeration of the WebProperty objects inside this object.
abstract WebProperty get(int index)
Search a property based on index in the collection.
abstract WebProperty getByID(int propertyID)
Search a property based on the id of the property.
abstract WebProperty getByName(String propertyName)
Search a property based on the name of the property.
abstract String getReportStyleLocalizedName()
Returns the localized style name depending on the user's Locale and the report properties.
abstract String getXML()
Return the delta properties XML for this set of properties.
abstract boolean isEmpty()
Return true if there is no WebProperty object in this object.
abstract void populate(String deltaPropertiesXML)
Populate the WebProperty objects based on the input XML.
abstract void remove(int index)
Remove a property based on the index.
abstract void removeByID(int propertyID)
Remove a property based on the id of the property.
abstract void removeByName(String propertyName)
Remove a property based on the name of the property.
abstract int size()
Return the number of WebProperty objects inside this object.

Public Methods

public abstract WebProperty add (int propertyID, String propertyName, String propertyValue)

Add a property into WebProperties collection. If a property with the same propertyID already exists, this method will change the value and name of the existing one.

Parameters
propertyID the id of this property
propertyName the name of this property
propertyValue the value of this property
Returns
Throws
UnsupportedOperationException if trying to modify a read-only object.

public abstract void clear ()

Clear all properties inside this object.

Throws
UnsupportedOperationException if trying to modify a read-only object.

public abstract Enumeration elements ()

Return an enumeration of the WebProperty objects inside this object.

Returns
  • An enumeration of the WebProperty objects inside this object.

public abstract WebProperty get (int index)

Search a property based on index in the collection.

Parameters
index The index of the property to retrieve. 0-based index.
Returns
Throws
IndexOutOfBoundsException If index is less than zero or greater than the size of this WebProperties object, an IndexOutOfBoundsException is thrown.

public abstract WebProperty getByID (int propertyID)

Search a property based on the id of the property.

Parameters
propertyID The id of the property to retrieve.
Returns
  • A WebProperty object found by its ID. When there is no property found based on the property ID, null will be returned.
Throws
UnsupportedOperationException Thrown when this object is read only. Since when it is readonly, this collection include properties from several property sets, which may have property with conflicting property id, so this method is not supported.

public abstract WebProperty getByName (String propertyName)

Search a property based on the name of the property.

Parameters
propertyName The name of the property to retrieve.
Returns
  • A WebProperty object found by its name. When there is no property found based on the property name, null will be returned.

public abstract String getReportStyleLocalizedName ()

Returns the localized style name depending on the user's Locale and the report properties.

Returns
  • The localized Style name.

public abstract String getXML ()

Return the delta properties XML for this set of properties. If no property inside this object, an empty string will be returned.

Returns
  • The XML for delta properties ( node). When there is no property inside this object, an empty string returned.

public abstract boolean isEmpty ()

Return true if there is no WebProperty object in this object.

Returns
  • True If there is no WebProperty object in this object, otherwise, return false.

public abstract void populate (String deltaPropertiesXML)

Populate the WebProperty objects based on the input XML.

Parameters
deltaPropertiesXML The delta Property XML. See the MSTR definition of XML node .
Throws
WebObjectsException If the structure of deltaPropertiesXML is wrong.

public abstract void remove (int index)

Remove a property based on the index.

Parameters
index The index of the property to be removed.
Throws
IndexOutOfBoundsException When the index is less than zero or greater than the size of this WebProperties object, an IndexOutOfBoundsException is thrown.
UnsupportedOperationException if trying to modify a read-only object.

public abstract void removeByID (int propertyID)

Remove a property based on the id of the property.

Parameters
propertyID The id of the property to be removed.
Throws
UnsupportedOperationException if trying to modify a read-only object.

public abstract void removeByName (String propertyName)

Remove a property based on the name of the property.

Parameters
propertyName The name of the property to be removed
Throws
UnsupportedOperationException if trying to modify a read-only object.

public abstract int size ()

Return the number of WebProperty objects inside this object.

Returns