Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes
plone.app.content.container.OFSContainer Class Reference
Inheritance diagram for plone.app.content.container.OFSContainer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def keys
def values
def items
def get
def __setitem__
def __delitem__
def __contains__
def __iter__
def __len__

Public Attributes

 id

Static Public Attributes

int isPrincipiaFolderish = 1

Detailed Description

A folder that's also a container.

Borrowed in part from megrok.five.

Definition at line 12 of file container.py.


Constructor & Destructor Documentation

def plone.app.content.container.OFSContainer.__init__ (   self,
  id = None 
)

Definition at line 22 of file container.py.

00022 
00023     def __init__(self, id=None):
00024         if id is not None:
00025             self.id = id

Here is the caller graph for this function:


Member Function Documentation

Definition at line 49 of file container.py.

00049 
00050     def __contains__(self, name):
00051         return self.hasObject(name)

Definition at line 46 of file container.py.

00046 
00047     def __delitem__(self, name):
00048         self.manage_delObjects([name])

Here is the call graph for this function:

Definition at line 52 of file container.py.

00052 
00053     def __iter__(self):
00054         return iter(self.objectIds())

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 55 of file container.py.

00055 
00056     def __len__(self):
00057         return len(self.objectIds())
00058         
00059 # Notes on this insane mixing of classes:
00060 # 
00061 #  - OFSContainer gives us Zope3-like container operations, and we want that
00062 #       to take priority so it comes first
00063 #  - CMFCatalogAware gives us catalog functionality. So does PortalContent,
00064 #       but PortalFolderBase overrides indexObject() and friends to do 
00065 #       nothing.
00066 #  - PortalFolderBase gives folder-like behaviour. It needs to come before
00067 #       PortalContent, otherwise objectIds() and friends don't work
00068 #  - PortalContent gives us SearchableText and WebDAV
00069 #  - DublinCoreImpl gives us DC fields
00070 #  - Contained gives us Zope3-like containment
00071 # 
00072 # ... I WANT AN ADAPTER!
        

Here is the call graph for this function:

def plone.app.content.container.OFSContainer.__setitem__ (   self,
  name,
  obj 
)

Definition at line 42 of file container.py.

00042 
00043     def __setitem__(self, name, obj):
00044         name = name.encode('ascii') # may raise if there's a bugus id
00045         self._setObject(name, obj)

Here is the call graph for this function:

Here is the caller graph for this function:

def plone.app.content.container.OFSContainer.get (   self,
  name,
  default = None 
)

Definition at line 37 of file container.py.

00037 
00038     def get(self, name, default=None):
00039         return getattr(self, name, default)

Definition at line 34 of file container.py.

00034 
00035     def items(self):
00036         return self.objectItems()

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 28 of file container.py.

00028 
00029     def keys(self):
00030         return self.objectIds()

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 31 of file container.py.

00031 
00032     def values(self):
00033         return self.objectValues()

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Reimplemented in plone.app.content.container.Container.

Definition at line 24 of file container.py.

Definition at line 20 of file container.py.


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