Managing Collections
WTE object collections have the following methods and properties:
- Add(Name, HomePage) method – Creates a new object in the collection, and returns a reference to it. The object must be identified by the application name, which must be unique to that array and the name of the application's start page. Note that in this initial implementation of WTE some collections hold only a single object. For example, WTE currently supports a single server on a single array and the corresponding object collections, WTEArrays and WTEServers, do not have Add methods.
- Count property – Returns the number of items in the collection. Use this property to obtain the index of a newly created object. Then you can use this unique identifier (ID) to retrieve the object.
- Item(index) property – Returns a specific object from the collection. The index is the value of the Count property after the object was created. This is the default method for identifying an object, if you omit the Item method name when requesting an object.
- Remove(index) method – Removes a specific object (identified by its index) from the collection.
- Save method – Writes the values of all the objects in the collection to persistent storage.
- Refresh method – Reads the values of all the objects in the collection from the persistent storage.
- VendorDataSets property – This property retrieves a reference to the collection of VendorDataSet subobjects that store and retrieve vendor-specific data for the parent object.