Supported Collection Operations

This topic describes the collection operations that apply to the collection interfaces described in Collection Interface Summary.

Component | Supported operations
Object add(ObjectDetails details) | Adds a new Dimensions object to the collection. Typically, the creation of a Dimensions CM object requires many arguments. In order to deal with this relative complexity, the object model provides a number of `ObjectDetails` objects classes representing information required to create a Dimensions CM component. Normally, you create an `ObjectDetails` object and pass it to the collection's add method.
Object get(String name) Object get( String namePart1, String namePart2) | Returns an existing Dimensions CM object from the collection. If `null` is returned, the object was not found. Some collection objects are identified by a pair of 'names' (for example, a Lifecycle Transition is uniquely identified by its 'From State' and 'To State'). In such cases, the corresponding collection provides a convenient method, by accepting all components of a 'name' as parameters.
ObjectDetails remove(Object obj) | Removes a Dimensions CM object from the collection, and returns an `ObjectDetails` object that represents the removed object.
Iterator iterator() | Returns a `java.util.Iterator` object over the names of the collection objects.
void refresh() | Reloads the objects in the collection in order to reflect the current contents of the base database. You need to reacquire references to the collection's objects after calling this method. NOTE Changes to the data held in the base database made by other processes (for example, the Administration Console or other dmpmcli sessions) after the collection was accessed for the first time, might not be automatically reflected in the collection unless the `refresh()` method is explicitly invoked.
int size() | Returns the number of objects in the collection.

NOTE Both add and remove methods automatically commit changes to the database.

Related Topics

Using the Scripting Interface Shell