Table of Contents

Class: Collection Twisted-0.19.0/twisted/python/roots.py

I represent a static collection of entities.

I contain methods designed to represent collections that can be dynamically created.

Methods   
__init__
delEntity
getDynamicEntity
getEntity
getStaticEntity
listDynamicEntities
listDynamicNames
listEntities
listNames
listStaticEntities
listStaticNames
putEntity
removeEntity
storeEntity
  __init__ 
__init__ ( self,  entities=None )

Initialize me.

  delEntity 
delEntity ( self,  name )

Remove a static reference for name.

Raises a KeyError if the operation fails.

  getDynamicEntity 
getDynamicEntity (
        self,
        name,
        request,
        )

Subclass this to generate an entity on demand.

This method should return None if it fails.

  getEntity 
getEntity (
        self,
        name,
        request,
        )

Retrieve an entity from me.

I will first attempt to retrieve an entity statically; static entities will obscure dynamic ones. If that fails, I will retrieve the entity dynamically.

If I cannot retrieve an entity, I will return None.

  getStaticEntity 
getStaticEntity ( self,  name )

Get an entity that was added to me using putEntity.

This method will return None if it fails.

  listDynamicEntities 
listDynamicEntities ( self,  request )

A list of all name, entity that I can generate on demand.

See getDynamicEntity.

  listDynamicNames 
listDynamicNames ( self )

Retrieve a list of the names of entities that I store references to.

See getDynamicEntity.

  listEntities 
listEntities ( self,  request )

Retrieve a list of all name, entity pairs I contain.

See getEntity.

  listNames 
listNames ( self,  request )

Retrieve a list of all names for entities that I contain.

See getEntity.

  listStaticEntities 
listStaticEntities ( self )

Retrieve a list of all name, entity pairs that I store references to.

See getStaticEntity.

  listStaticNames 
listStaticNames ( self )

Retrieve a list of the names of entities that I store references to.

See getStaticEntity.

  putEntity 
putEntity (
        self,
        name,
        entity,
        )

Store a static reference on name for entity.

Raises a KeyError if the operation fails.

  removeEntity 
removeEntity (
        self,
        name,
        request,
        )

Remove an entity for name, based on the content of request.

Exceptions   
NotSupportedError("%s.removeEntity" % str( self.__class__ ) )
  storeEntity 
storeEntity (
        self,
        name,
        request,
        )

Store an entity for name, based on the content of request.

Exceptions   
NotSupportedError("%s.storeEntity" % str( self.__class__ ) )

Table of Contents

This document was automatically generated on Sun Jul 14 19:53:11 2002 by HappyDoc version 2.0