Package com.microstrategy.web.objects
Interface WebThresholds
-
- All Superinterfaces:
EnumWebPersistableState
,Persistable
- All Known Subinterfaces:
WebReusableThresholds
- All Known Implementing Classes:
WebDeliveryThresholdsMetricImpl
,WebReusableThresholdsImpl
public interface WebThresholds extends Persistable
This interface encapsulates a collection ofWebThreshold
instances, as well as functions that operate on the collection.- Since:
- MicroStrategy Web 9.0.0
-
-
Field Summary
-
Fields inherited from interface com.microstrategy.utils.serialization.EnumWebPersistableState
BARE_MINIMAL_STATE_INFO, MAXIMAL_STATE_INFO, MINIMAL_STATE_INFO, TYPICAL_STATE_INFO
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WebThreshold
add(java.lang.String tmpId)
Adds a new threshold object with the given temporary identifier.WebThreshold
add(java.lang.String tmpId, WebThreshold template)
void
clear()
Removes all threshold instances.WebThresholds
createCopy()
Returns aWebThresholds
collection that is a copy of the current object.java.util.Enumeration
elements()
WebThreshold
get(int index)
WebThreshold
get(java.lang.String id)
boolean
isModified()
Returns whether theWebThresholds
object is modified or not.void
populate(WebThresholds template)
The populate method will populate the current collection with the contents of the given one.WebThreshold
remove(java.lang.String id)
Removes a threshold.void
reorder(java.lang.String[] ids)
The array of identifiers define the new relative ordering of thresholds.int
size()
-
Methods inherited from interface com.microstrategy.utils.serialization.Persistable
restoreState, restoreState, saveState, saveState, saveState, saveState
-
-
-
-
Method Detail
-
size
int size()
- Returns:
- the number of threshold instances.
-
elements
java.util.Enumeration elements()
- Returns:
Enumeration
of threshold instances.
-
get
WebThreshold get(java.lang.String id)
- Parameters:
id
- identifier of the threshold instance- Returns:
- the threshold instance matching the given identifier.
-
get
WebThreshold get(int index)
- Parameters:
index
- the index (starting from 0) of the threshold instance in the list- Returns:
- the threshold instance at the index
- Throws:
java.lang.IllegalArgumentException
- thrown if there is no threshold at the given index.
-
add
WebThreshold add(java.lang.String tmpId)
Adds a new threshold object with the given temporary identifier. The identifier is no longer valid once the manipulation is submitted.- Parameters:
tmpId
- a temporary id used to refer to the new threshold- Returns:
- a new threshold instance
-
add
WebThreshold add(java.lang.String tmpId, WebThreshold template)
-
reorder
void reorder(java.lang.String[] ids)
The array of identifiers define the new relative ordering of thresholds. Each identifier pair is subject toKeyedList.moveByKey(Object, Object)
. For example, if thresholds "a, b, c, d, e" were reordered with the parameter array "b, e", we would have "a, c, d, b, e".- Parameters:
ids
- array of threshold identifiers in relative order
-
remove
WebThreshold remove(java.lang.String id)
Removes a threshold.- Parameters:
id
- identifier of threshold to remove.- Returns:
- the threshold instance removed.
-
clear
void clear()
Removes all threshold instances. This is equivalent to invokingremove(String)
for all threshold identifiers.
-
createCopy
WebThresholds createCopy()
Returns aWebThresholds
collection that is a copy of the current object. Note that this copy will still be aware of its container, but the container will still be attached to the original WebThresholds object. The primary purpose of this method is to allow the caller to capture the state of the thresholds collection, and then edit the state without affecting the original collection. Typical usage will see this method being used along with the populate method, to move the information back from the copy to the original collection.- Returns:
- A
WebThresholds
collection that is in exactly the same state as the original.
-
populate
void populate(WebThresholds template)
The populate method will populate the current collection with the contents of the given one. This is primarily intended to be used to propagate changes made to a copy obtained via the createCopy method back to the original.- Parameters:
template
- The source object whose definition will be copied into the current object.
-
isModified
boolean isModified()
Returns whether theWebThresholds
object is modified or not.- Returns:
- True if the collection is modified, false otherwise.
-
-