qm :: test :: database :: ResourceDescriptor :: Class ResourceDescriptor
[hide private]
[frames] | no frames]

Class ResourceDescriptor
source code

ItemDescriptor --+
                 |
                ResourceDescriptor

A resource instance.

Instance Methods [hide private]
  __init__(self, database, resource_id, resource_class_name=None, arguments=None, resource=None)
Create a new resource instance.
  GetClass(self)
Return the class of the entity.
  GetResource(self)
Return the 'Resource' object described by this descriptor.
  SetUp(self, context, result)
Set up the resource.
  CleanUp(self, result)
Clean up the resource.

Inherited from ItemDescriptor: GetArguments, GetClassArguments, GetClassName, GetDatabase, GetId, GetItem, GetResources

Inherited from ItemDescriptor (private): _Execute


Method Details [hide private]

__init__(self, database, resource_id, resource_class_name=None, arguments=None, resource=None)
(Constructor)

source code 

Create a new resource instance.

'database' -- The 'Database' containing this resource.

'resource_id' -- The resource ID.

'resource_class_name' -- The name of the resource class of which this is an instance. Omit this argument if 'resource' is provided.

'arguments' -- This resource's arguments to the resource class. Omit this argument if 'resource' is provided.

'resource' -- The resource class of which this is an instance.
Overrides: ItemDescriptor.__init__

GetClass(self)

source code 

Return the class of the entity.

returns -- The Python class object for the entity. For example, for a 'TestDescriptor', this method returns the test class.
Overrides: ItemDescriptor.GetClass

GetResource(self)

source code 
Return the 'Resource' object described by this descriptor.

SetUp(self, context, result)

source code 

Set up the resource.

'context' -- The 'Context' in which the resource should be executed.

'result' -- The 'Result' object for this resource.

CleanUp(self, result)

source code 

Clean up the resource.

'result' -- The 'Result' object for this resource.