Home | Trees | Indices | Help |
|
---|
|
Collections base class. ComodIT server maintains collections of
entities. Entities are listed, retrieved, created and deleted through
these collections. Each collection has a unique URL. An instance of
Collection
is a local representation of a remote ComodIT
collection. Requests are sent to ComodIT server to clear or list the content of the collection, or to get a particular entity of the collection. Creation and
update of particular remote entities must be handled by subclasses. Also,
subclasses should provide local entity instantiation helpers. Indeed,
creation, update and instantiation are specific to entity type.
Note that some operations on collections are optional. For instance, a read-only collection will not allow the deletion, update or creation of entities. In particular, most collections do not allow clear operation.
Collection
instances may be iterated with for ...
in
construction. For instance, the following snippet prints the
name of all entities of collection c
.
>>> for r in c: ... print r.name
Above snippet is equivalent to:
>>> for r in c.list(): ... print r.name
Instance Methods | |||
|
|||
|
|||
list of Entity |
|
||
iterator |
|
||
Entity |
|
||
|
|||
|
|||
Inherited from Inherited from |
Properties | |
Inherited from |
Method Details |
Creates an instance of collection. Note that
|
Updates the local representation of a remote entity.
|
Fetches the entities in this collection.
|
Provides an iterator on the entities of this collection.
|
Retrieves a particular entity of this collection.
|
Deletes a particular entity in this collection.
|
Clears the content of the collection i.e. deletes all entities of the collection. As a result, a subsequent call to list would return an empty list (if nobody re-added entities to the list in the meantime).
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Dec 5 14:16:50 2017 | http://epydoc.sourceforge.net |