Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes | Static Private Attributes
Archetypes.Storage.AttributeStorage Class Reference
Inheritance diagram for Archetypes.Storage.AttributeStorage:
Inheritance graph
[legend]
Collaboration diagram for Archetypes.Storage.AttributeStorage:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def get
def set
def unset
def getName
def __repr__
def __cmp__

Static Public Attributes

tuple security = ClassSecurityInfo()

Static Private Attributes

 __implements__ = IStorage

Detailed Description

Stores data as an attribute of the instance. This is the most
commonly used storage

Definition at line 86 of file __init__.py.


Member Function Documentation

def Archetypes.Storage.Storage.__cmp__ (   self,
  other 
) [inherited]

Definition at line 36 of file __init__.py.

00036 
00037     def __cmp__(self, other):
00038         return cmp(self.getName(), other.getName())

Here is the call graph for this function:

def Archetypes.Storage.Storage.__repr__ (   self) [inherited]

Definition at line 33 of file __init__.py.

00033 
00034     def __repr__(self):
00035         return "<Storage %s>" % (self.getName())

Here is the call graph for this function:

def Archetypes.Storage.AttributeStorage.get (   self,
  name,
  instance,
  kwargs 
)

Reimplemented from Archetypes.Storage.Storage.

Definition at line 95 of file __init__.py.

00095 
00096     def get(self, name, instance, **kwargs):
00097         if not shasattr(instance, name):
00098             raise AttributeError(name)
00099         return getattr(instance, name)

Here is the call graph for this function:

Here is the caller graph for this function:

def Archetypes.Storage.Storage.getName (   self) [inherited]

Definition at line 30 of file __init__.py.

00030 
00031     def getName(self):
00032         return self.__class__.__name__

Here is the caller graph for this function:

def Archetypes.Storage.AttributeStorage.set (   self,
  name,
  instance,
  value,
  kwargs 
)

Reimplemented from Archetypes.Storage.Storage.

Definition at line 101 of file __init__.py.

00101 
00102     def set(self, name, instance, value, **kwargs):
00103         # Remove acquisition wrappers
00104         value = aq_base(value)
00105         setattr(aq_base(instance), name, value)
00106         instance._p_changed = 1

Here is the caller graph for this function:

def Archetypes.Storage.AttributeStorage.unset (   self,
  name,
  instance,
  kwargs 
)

Reimplemented from Archetypes.Storage.Storage.

Definition at line 108 of file __init__.py.

00108 
00109     def unset(self, name, instance, **kwargs):
00110         try:
00111             delattr(aq_base(instance), name)
00112         except AttributeError:
00113             pass
00114         instance._p_changed = 1


Member Data Documentation

Reimplemented from Archetypes.Storage.Storage.

Definition at line 90 of file __init__.py.

tuple Archetypes.Storage.AttributeStorage.security = ClassSecurityInfo() [static]

Reimplemented from Archetypes.Storage.Storage.

Definition at line 92 of file __init__.py.


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