mandates.container - Mandate Container Components

Containers which contain mandate objects.

class waeup.kofa.mandates.container.MandatesContainer[source]

Bases: grokcore.content.components.Container

This is a container for all kind of mandates.

__doc__ = 'This is a container for all kind of mandates.\n '
__implemented__ = <implementedBy waeup.kofa.mandates.container.MandatesContainer>
__module__ = 'waeup.kofa.mandates.container'
__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']
addMandate(mandate)[source]
count

Count active and expired mandates.

removeExpired()[source]

Remove all expired mandates.

class waeup.kofa.mandates.container.MandatesPlugin[source]

Bases: grokcore.component.components.GlobalUtility

A plugin that creates container for mandates inside a university.

__doc__ = 'A plugin that creates container for mandates inside a university.\n '
__implemented__ = <implementedBy waeup.kofa.mandates.container.MandatesPlugin>
__module__ = 'waeup.kofa.mandates.container'
__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']
setup(site, name, logger)[source]
update(site, name, logger)[source]