Package com.microstrategy.web.objects
Interface WebProperties
-
public interface WebProperties
Interface for WebProperties. This is an interface for a group of properties, which are not from Meta Data. The difference between this interface andWebPropertySet
is thatWebPropertySet
is a read-only collection, and represents a group of properties from Meta Data. The similarity is that both of them represent a collection ofWebProperty
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.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WebProperty
add(int propertyID, java.lang.String propertyName, java.lang.String propertyValue)
Add a property into WebProperties collection.void
clear()
Clear all properties inside this object.java.util.Enumeration
elements()
Return an enumeration of theWebProperty
objects inside this object.WebProperty
get(int index)
Search a property based on index in the collection.WebProperty
getByID(int propertyID)
Search a property based on the id of the property.WebProperty
getByName(java.lang.String propertyName)
Search a property based on the name of the property.java.lang.String
getReportStyleLocalizedName()
Returns the localized style name depending on the user's Locale and the report properties.java.lang.String
getXML()
Return the delta properties XML for this set of properties.boolean
isEmpty()
Return true if there is noWebProperty
object in this object.void
populate(java.lang.String deltaPropertiesXML)
Populate theWebProperty
objects based on the input XML.void
remove(int index)
Remove a property based on the index.void
removeByID(int propertyID)
Remove a property based on the id of the property.void
removeByName(java.lang.String propertyName)
Remove a property based on the name of the property.int
size()
Return the number ofWebProperty
objects inside this object.
-
-
-
Method Detail
-
add
WebProperty add(int propertyID, java.lang.String propertyName, java.lang.String propertyValue) throws java.lang.UnsupportedOperationException
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 propertypropertyName
- the name of this propertypropertyValue
- the value of this property- Returns:
- The newly added or changed
WebProperty
. - Throws:
java.lang.UnsupportedOperationException
- if trying to modify a read-only object.
-
removeByName
void removeByName(java.lang.String propertyName) throws java.lang.UnsupportedOperationException
Remove a property based on the name of the property.- Parameters:
propertyName
- The name of the property to be removed- Throws:
java.lang.UnsupportedOperationException
- if trying to modify a read-only object.
-
removeByID
void removeByID(int propertyID) throws java.lang.UnsupportedOperationException
Remove a property based on the id of the property.- Parameters:
propertyID
- The id of the property to be removed.- Throws:
java.lang.UnsupportedOperationException
- if trying to modify a read-only object.
-
remove
void remove(int index) throws java.lang.IndexOutOfBoundsException, java.lang.UnsupportedOperationException
Remove a property based on the index.- Parameters:
index
- The index of the property to be removed.- Throws:
java.lang.IndexOutOfBoundsException
- When the index is less than zero or greater than the size of this WebProperties object, an IndexOutOfBoundsException is thrown.java.lang.UnsupportedOperationException
- if trying to modify a read-only object.
-
clear
void clear() throws java.lang.UnsupportedOperationException
Clear all properties inside this object.- Throws:
java.lang.UnsupportedOperationException
- if trying to modify a read-only object.
-
get
WebProperty get(int index) throws java.lang.IndexOutOfBoundsException
Search a property based on index in the collection.- Parameters:
index
- The index of the property to retrieve. 0-based index.- Returns:
- A
WebProperty
object found by index. - Throws:
java.lang.IndexOutOfBoundsException
- If index is less than zero or greater than the size of this WebProperties object, an IndexOutOfBoundsException is thrown.
-
getByID
WebProperty getByID(int propertyID) throws java.lang.UnsupportedOperationException
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:
java.lang.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.
-
getByName
WebProperty getByName(java.lang.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.
-
size
int size()
Return the number ofWebProperty
objects inside this object.- Returns:
- The number of
WebProperty
objects inside this object.
-
isEmpty
boolean isEmpty()
Return true if there is noWebProperty
object in this object.- Returns:
- True If there is no
WebProperty
object in this object, otherwise, return false.
-
populate
void populate(java.lang.String deltaPropertiesXML) throws WebObjectsException
Populate theWebProperty
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.
-
getXML
java.lang.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.
-
elements
java.util.Enumeration elements()
Return an enumeration of theWebProperty
objects inside this object.- Returns:
- An enumeration of the
WebProperty
objects inside this object.
-
getReportStyleLocalizedName
java.lang.String getReportStyleLocalizedName()
Returns the localized style name depending on the user's Locale and the report properties.- Returns:
- The localized Style name.
-
-