getServices
Returns a ServiceList containing all
services available for this collection
Returns a ServiceList containing the names of all services
available for this collection
|
getService
Returns a Service instance for the service requested.
name The name of the service instance requested.
version The version string if a particular version of
a service is required.
|
The requested Service instance
|
registerService
Registers a new Service for use by this Collection. The Service
instance will be queried for the Service name and versions supported.
After registration the Service can be retrieved via
getService
.
service The service instance to register.
|
getParentCollection
Returns the parent Collection instance for this collection.
 | Should throw an exception if no parent collection
exists? |
The Collection instance for the parent of this collection.
|
getChildCollectionCount
Returns the number of child collections nested under this collection.
If no child collections exist 0 is returned.
The number of child collections.
|
getChildCollections
Returns a CollectionList containing all child collections for this collection.
If no child collections exist an empty list will be returned.
The CollectionList containing a child collections.
|
getResourceCount
Returns the number of resources contained by this collection.
If the collection is empty 0 is returned.
The number of resources contained in the collection.
|
getResources
Returns a ResourceIterator containing Resource objects for all resources
in the collection. Provides a simple way to perform operations on all
resources stored in the collection.
The ResourceIterator containing a list of all Resources in the
collection.
|
createResource
Creates a new Resource instance associated with the provided ID. The
ID must be unique within the context of the associated collection.
 | What happens if id is not unique? |
 | Should id be optional? Maybe this method should be createResource()
with no id and a seperate method setID on Resource should be added? |
id The ID to associate with this resource.
|
removeResource
Removes the provided resource from this collection.
 | What is the behavior with a Resource from another collection? |
 | How does this fit in a transaction? |
resource The resource instance to remove from the
repository.
|
storeResource
Saves the provided resource to the database.
resource The resource to save.
|
getResource
Retrieves a Resource from the database. The resource is located using
the id specified as a parameter.
id The id to use when locating the resource.
|
The Resource instance for the requested resource.
|
createId
Creates a new unique ID within the context of this collection.
close
Closes the Collection instance and releases all resources in use by
the instance. Once close has been called the Collection instance can
not be used again.