Back to index

plone3  3.1.7
Public Member Functions | Private Attributes
Archetypes.Registry.PropertyMapping Class Reference

List of all members.

Public Member Functions

def __init__
def register
def getType

Private Attributes

 _default
 _mapping

Detailed Description

Definition at line 252 of file Registry.py.


Constructor & Destructor Documentation

Definition at line 254 of file Registry.py.

00254 
00255     def __init__(self):
00256         self._default = {}
00257         self._mapping = {}

Here is the caller graph for this function:


Member Function Documentation

def Archetypes.Registry.PropertyMapping.getType (   self,
  property,
  klass 
)

Definition at line 267 of file Registry.py.

00267 
00268     def getType(self, property, klass):
00269         value = None
00270         if self._mapping.has_key(klass):
00271             value = self._mapping[klass].get(property, None)
00272         return value or self._default.get(property, 'not-registered')

Here is the call graph for this function:

def Archetypes.Registry.PropertyMapping.register (   self,
  property,
  type,
  klass = None 
)

Definition at line 258 of file Registry.py.

00258 
00259     def register(self, property, type, klass=None):
00260         if not klass:
00261             map = self._default
00262         else:
00263             if not self._mapping.has_key(klass):
00264                 self._mapping[klass] = {}
00265             map = self._mapping[klass]
00266         map[property] = type

Here is the caller graph for this function:


Member Data Documentation

Definition at line 255 of file Registry.py.

Definition at line 256 of file Registry.py.


The documentation for this class was generated from the following file: