class documentation

class Constrained(Collection): (source)

Known subclasses: twisted.python.roots.Homogenous, twisted.python.roots.Locked

View In Hierarchy

A collection that has constraints on its names and/or entities.
Method entity​Constraint A method that determines whether an entity may be added to me.
Method name​Constraint A method that determines whether an entity may be added to me with a given name.
Method put​Entity Store an entity if it meets both constraints.
Method really​Put​Entity Undocumented

Inherited from Collection:

Method __init__ Initialize me.
Method del​Entity Remove a static reference for 'name'.
Method get​Dynamic​Entity Subclass this to generate an entity on demand.
Method get​Entity Retrieve an entity from me.
Method get​Static​Entity Get an entity that was added to me using putEntity.
Method list​Dynamic​Entities A list of all name, entity that I can generate on demand.
Method list​Dynamic​Names Retrieve a list of the names of entities that I store references to.
Method list​Entities Retrieve a list of all name, entity pairs I contain.
Method list​Names Retrieve a list of all names for entities that I contain.
Method list​Static​Entities Retrieve a list of all name, entity pairs that I store references to.
Method list​Static​Names Retrieve a list of the names of entities that I store references to.
Method remove​Entity Remove an entity for 'name', based on the content of 'request'.
Method store​Entity Store an entity for 'name', based on the content of 'request'.
Instance Variable entities Undocumented
def entityConstraint(self, entity): (source)

A method that determines whether an entity may be added to me.

If the constraint is satisfied, return 1; if the constraint is not satisfied, either return 0 or raise a descriptive ConstraintViolation.

def nameConstraint(self, name): (source)

A method that determines whether an entity may be added to me with a given name.

If the constraint is satisfied, return 1; if the constraint is not satisfied, either return 0 or raise a descriptive ConstraintViolation.

def putEntity(self, name, entity): (source)

Store an entity if it meets both constraints.

Otherwise raise a ConstraintViolation.

def reallyPutEntity(self, name, entity): (source)

Undocumented