Package occi :: Module backend :: Class KindBackend
[hide private]
[frames] | no frames]

Class KindBackend

source code

object --+
         |
        KindBackend
Known Subclasses:

A prototype backend which essentially does nothing.

Use this Backend for your Resource and Link types.

Note that it can happen that an entity has more than one backend assigned (this is the case when it has a couple of mixins). But you can assign multiple kinds to one backend.

Instance Methods [hide private]
 
create(self, entity, extras)
Call the Resource Management and create this entity.
source code
 
retrieve(self, entity, extras)
Call the Resource Management and refresh this entity so the client gets up to date information.
source code
 
update(self, old, new, extras)
Call the Resource Management and update this entity.
source code
 
replace(self, old, new, extras)
Call the Resource Management and update this entity.
source code
 
delete(self, entity, extras)
Call the Resource Management and delete this entity.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

create(self, entity, extras)

source code 

Call the Resource Management and create this entity.

entity -- The entity which is to be created. extras -- Any extra arguments which are defined by the user.

retrieve(self, entity, extras)

source code 

Call the Resource Management and refresh this entity so the client gets up to date information.

entity -- The entity which is to be retrieved. extras -- Any extra arguments which are defined by the user.

update(self, old, new, extras)

source code 

Call the Resource Management and update this entity.

It is up to the backend implementation to decide which information from new if copied into old.

Note that the new entity might no have all the information the old one had.

old -- The old entity which is to be updated. new -- The new entity holding the updated information. extras -- Any extra arguments which are defined by the user.

replace(self, old, new, extras)

source code 

Call the Resource Management and update this entity. This is essentially a full update (Which allows removal of attributes for example).

It is up to the backend implementation to decide which information from new if copied into old. So if you really want to replace old with new you need to have an old.* = new.* somewhere here (RECOMMENDED).

old -- The old entity which is to be updated. new -- The new entity holding the updated information. extras -- Any extra arguments which are defined by the user.

delete(self, entity, extras)

source code 

Call the Resource Management and delete this entity.

entity -- The entity which is to be deleted. extras -- Any extra arguments which are defined by the user.