java.lang.Object | |
↳ | com.microstrategy.web.objects.admin.DataSourceEnumerator |
The DataSourceEnumerator interface represents the list of DataSource
objects
active on the current server. The DataSource
objects are persisted in the
registry of the machine that the API is local to. Finally, note that any changes
made to the enumerator or the objects in the enumerator will not be svaed to
metadata until the save method is called.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DataSourceEnumerator() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract DataSource |
add(String name, int connectionType)
Adds a new
DataSource object to the collection. | ||||||||||
abstract DataSource |
addCopy(String destName, DataSource origin)
Adds a copy of the given
DataSource object to the collection with a different name. | ||||||||||
abstract Enumeration |
elements()
Returns a java.util.Enumeration containing the items in the collection.
| ||||||||||
abstract DataSource |
get(int i)
Returns the
DataSource at the given index in the collection. | ||||||||||
static DataSourceEnumerator |
getInstance()
Returns a
DataSourceEnumerator object containing the list of DataSource
objects in the registry. | ||||||||||
abstract DataSource |
getItemByName(String name)
Returns the
DataSource object with the given name. | ||||||||||
abstract void |
remove(int i)
Removes the
DataSource object at the given index from the collection. | ||||||||||
abstract void |
remove(DataSource ds)
Removes the given
DataSource object from the collection. | ||||||||||
abstract void |
save()
Saves the DataSourceEnumerator back to the registry.
| ||||||||||
abstract int |
size()
Returns the number of items in the collection.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Adds a new DataSource
object to the collection. The newly added DataSource
object will have the given connection type. Note that the newly created Data Source will not be
saved to metadata until the save method is called on either the new DataSource
or the DataSourceEnumerator.
name | The name of the Data Source to create. |
---|---|
connectionType | The connection type of the data source, from EnumDSSXMLDataSourceConnectionType . |
DataSource
object.
Adds a copy of the given DataSource
object to the collection with a different name.
Note that the newly created Data Source will not be
saved to metadata until the save method is called on either the new DataSource
or the DataSourceEnumerator. *
destName | The name of the newly created Data Source. |
---|---|
origin | The DataSource object to copy. |
DataSource
object.
Returns a java.util.Enumeration containing the items in the collection.
Returns the DataSource
at the given index in the collection.
i | The index of the DataSource object to return. |
---|
DataSource
object at the given index.
Returns a DataSourceEnumerator
object containing the list of DataSource
objects in the registry.
DataSourceEnumerator
containing the list of DataSource objects.
Returns the DataSource
object with the given name.
name | The name of the object to find. |
---|
DataSource
object with the given name.IllegalArgumentException | Thrown if no item with the given name exists. |
---|
Removes the DataSource
object at the given index from the collection.
Note that the change will not be propagated to the metadata until the save
method on the DataSourceEnumerator is called.
i | The index of the item to remove from the collection. |
---|
Removes the given DataSource
object from the collection.
Note that the change will not be propagated to the metadata until the save
method on the DataSourceEnumerator is called.
ds | The DataSource object to remove from the collection.
|
---|
Saves the DataSourceEnumerator back to the registry. This will save all added, and changed DataSource objects back to registry, and will cause the final deletion of the deleted objects to be persisted to the registry.
WebObjectsAdminException | Thrown if an error occurs when saving. |
---|
Returns the number of items in the collection.