Package occi :: Module registry :: Class Registry
[hide private]
[frames] | no frames]

Class Registry

source code

object --+
         |
        Registry
Known Subclasses:

Abstract class so users can implement registries themselves.

Instance Methods [hide private]
 
get_hostname(self)
Returns the hostname of the service.
source code
 
set_hostname(self, hostname)
Set the hostname of the service.
source code
 
get_default_type(self)
Returns the default mime type.
source code
 
get_renderer(self, mime_type)
Retrieve a rendering for a given mime type.
source code
 
set_renderer(self, mime_type, renderer)
Retrieve a rendering for a given mime type.
source code
 
get_backend(self, category, extras)
Retrieve a backend which is able to deal with the given category.
source code
 
get_all_backends(self, entity, extras)
Retrieve all backends associated with a resource instance
source code
 
set_backend(self, category, backend, extras)
Set a backend which is able to deal with the given category.
source code
 
delete_mixin(self, mixin, extras)
Remove a mixin from the service.
source code
 
get_category(self, path, extras)
Return the category which is associated with an Location.
source code
 
get_categories(self, extras)
Return all registered categories.
source code
 
get_resource(self, key, extras)
Return a certain resource.
source code
 
add_resource(self, key, entity, extras)
Add a resource.
source code
 
delete_resource(self, key, extras)
Delete a resource.
source code
 
get_resource_keys(self, extras)
Return all keys of all resources.
source code
 
get_resources(self, extras)
Return all resources.
source code
 
get_extras(self, extras)
Will return what goes into the extras attribute of the entity and category.
source code

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

Class Variables [hide private]
  hostname = ''
  default_mime_type = 'text/plain'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

get_renderer(self, mime_type)

source code 

Retrieve a rendering for a given mime type.

mime_type -- The mime type you a looking for.

set_renderer(self, mime_type, renderer)

source code 

Retrieve a rendering for a given mime type.

mime_type -- The mime type you want to add a rendering for. renderer -- Instance of an Rendering class.

get_backend(self, category, extras)

source code 

Retrieve a backend which is able to deal with the given category.

category -- The category a backend is needed for. extras -- Extras object - same as the one passed on to the backends.

get_all_backends(self, entity, extras)

source code 

Retrieve all backends associated with a resource instance

entity -- The resource instance. extras -- Extras object - same as the one passed on to the backends.

set_backend(self, category, backend, extras)

source code 

Set a backend which is able to deal with the given category.

category -- The category a backend is needed for. backend -- The backend which should handle this category. extras -- Extras object - same as the one passed on to the backends.

delete_mixin(self, mixin, extras)

source code 

Remove a mixin from the service.

mixin -- The mixin extras -- Extras object - same as the one passed on to the backends.

get_category(self, path, extras)

source code 

Return the category which is associated with an Location.

path -- The location which the category should define. extras -- Extras object - same as the one passed on to the backends.

get_categories(self, extras)

source code 

Return all registered categories.

extras -- Extras object - same as the one passed on to the backends.

get_resource(self, key, extras)

source code 

Return a certain resource.

key -- Unique identifier of the resource. extras -- Extras object - same as the one passed on to the backends.

add_resource(self, key, entity, extras)

source code 

Add a resource.

key -- the unique identifier. entity -- the OCCI representation. extras -- Extras object - same as the one passed on to the backends.

delete_resource(self, key, extras)

source code 

Delete a resource.

key -- Unique identifier of the resource. extras -- Extras object - same as the one passed on to the backends.

get_resource_keys(self, extras)

source code 

Return all keys of all resources.

extras -- Extras object - same as the one passed on to the backends.

get_resources(self, extras)

source code 

Return all resources.

extras -- Extras object - same as the one passed on to the backends.