Package buildbot :: Package process :: Module properties :: Class PropertiesMixin
[frames] | no frames]

Class PropertiesMixin

source code

Known Subclasses:

A mixin to add IProperties methods to a class which does not implement the interface, but which can be coerced to the interface via an adapter.

This is useful because IProperties methods are often called on Build and BuildStatus objects without first coercing them.

Instance Methods
 
getProperty(self, propname, default=None) source code
 
hasProperty(self, propname) source code
 
has_key(self, propname) source code
 
setProperty(self, propname, value, source='Unknown', runtime=None) source code
 
getProperties(self) source code
 
render(self, value) source code
 
__providedBy__(...)
Object Specification Descriptor
source code
 
__provides__(...)
Special descriptor for class __provides__
Class Variables
  __implemented__ = <implementedBy buildbot.process.properties.P...
Instance Variables
  set_runtime_properties = False
the default value for the runtime parameter of setProperty.
Method Details

__provides__(...)

 
Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that
we can get declarations for objects without instance-specific
interfaces a bit quicker.

For example:

  >>> from zope.interface import Interface
  >>> class IFooFactory(Interface):
  ...     pass
  >>> class IFoo(Interface):
  ...     pass
  >>> class C(object):
  ...     implements(IFoo)
  ...     classProvides(IFooFactory)
  >>> [i.getName() for i in C.__provides__]
  ['IFooFactory']

  >>> [i.getName() for i in C().__provides__]
  ['IFoo']


Class Variable Details

__implemented__

Value:
<implementedBy buildbot.process.properties.PropertiesMixin>