Package Products :: Package BTreeFolder2 :: Module BTreeFolder2 :: Class BTreeFolder2Base
[show private | hide private]
[frames | no frames]

Type BTreeFolder2Base

object --+        
         |        
      Base --+    
             |    
object --+   |    
         |   |    
Persistent --+    
             |    
    Persistent --+
                 |
                BTreeFolder2Base

Known Subclasses:
BTreeFolder2

Base for BTree-based folders.
Method Summary
  __init__(self, id)
  __getattr__(self, name)
  __len__(self)
Returns the number of items in the folder.
  generateId(self, prefix, suffix, rand_ceiling)
Returns an ID not used yet by this folder.
  get(self, name, default)
  getBatchObjectListing(self, REQUEST)
Return a structure for a page template to show the list of objects.
  has_key(self, id)
Indicates whether the folder has an item by ID.
  hasObject(self, id)
Indicates whether the folder has an item by ID.
  items(self, spec)
  keys(self, spec)
  manage_cleanup(self)
Calls self._cleanup() and reports the result as text.
  manage_fixCount(self)
Calls self._fixCount() and reports the result as text.
  manage_object_workspace(self, ids, REQUEST)
Redirects to the workspace of the first object in the list.
  objectCount(self)
Returns the number of items in the folder.
  objectIds(self, spec)
  objectIds_d(self, t)
  objectItems(self, spec)
  objectMap(self)
  objectMap_d(self, t)
  objectValues(self, spec)
  tpValues(self)
Ensures the items don't show up in the left pane.
  values(self, spec)
  _checkId(self, id, allow_dup)
  _cleanup(self)
Cleans up errors in the BTrees.
  _delOb(self, id)
Remove the named object from the folder.
  _delObject(self, id, dp)
  _fixCount(self)
Checks if the value of self._count disagrees with len(self.objectIds()).
  _getOb(self, id, default)
Return the named object from the folder.
  _initBTrees(self)
  _populateFromFolder(self, source)
Fill this folder with the contents of another folder.
  _setOb(self, id, object)
Store the named object in the folder.
  _setObject(self, id, object, roles, user, set_owner)
Inherited from Persistent: __class_init__, __getattribute__, bobobase_modification_time, locked_in_version, modified_in_version
Inherited from Persistent: __delattr__, __getstate__, __new__, __reduce__, __setattr__, __setstate__, _p_activate, _p_deactivate, _p_delattr, _p_getattr, _p_invalidate, _p_setattr
Inherited from Base: __getnewargs__
Inherited from object: __hash__, __reduce_ex__, __repr__, __str__

Class Variable Summary
tuple __ac_permissions__ = (('Access contents information', ('...
PermissionRole generateId__roles__ = <PermissionRole object at 0x20b523...
PermissionRole get__roles__ = <PermissionRole object at 0x20b5230>
PermissionRole getBatchObjectListing__roles__ = <PermissionRole object ...
PermissionRole has_key__roles__ = <PermissionRole object at 0x20b5230>
PermissionRole manage_cleanup__roles__ = <PermissionRole object at 0x20...
PermissionRole manage_fixCount__roles__ = <PermissionRole object at 0x2...
DTMLFile manage_main = <App.special_dtml.DTMLFile object at 0x220...
PermissionRole manage_main__roles__ = <PermissionRole object at 0x20b52...
PermissionRole manage_object_workspace__roles__ = <PermissionRole objec...
tuple manage_options = ({'action': 'manage_main', 'label': 'Co...
PermissionRole objectCount__roles__ = <PermissionRole object at 0x20b52...
PermissionRole objectIds__roles__ = <PermissionRole object at 0x20b5230...
PermissionRole objectIds_d__roles__ = <PermissionRole object at 0x20b52...
PermissionRole objectItems__roles__ = <PermissionRole object at 0x20b52...
PermissionRole objectMap__roles__ = <PermissionRole object at 0x20b5230...
PermissionRole objectMap_d__roles__ = <PermissionRole object at 0x20b52...
PermissionRole objectValues__roles__ = <PermissionRole object at 0x20b5...
str title = ''
PermissionRole tpValues__roles__ = <PermissionRole object at 0x20b5230>
NoneType _count = None                                                                  
NoneType _mt_index = None                                                                  
tuple _objects = ()
NoneType _tree = None                                                                  
int _v_nextid = 0                                                                     
Inherited from Persistent: _p_changed, _p_jar, _p_mtime, _p_oid, _p_serial, _p_state

Method Details

__len__(self)
(Length operator)

Returns the number of items in the folder.

generateId(self, prefix='item', suffix='', rand_ceiling=999999999)

Returns an ID not used yet by this folder.

The ID is unlikely to collide with other threads and clients. The IDs are sequential to optimize access to objects that are likely to have some relation.

getBatchObjectListing(self, REQUEST=None)

Return a structure for a page template to show the list of objects.

has_key(self, id)

Indicates whether the folder has an item by ID.

hasObject(self, id)

Indicates whether the folder has an item by ID.

manage_cleanup(self)

Calls self._cleanup() and reports the result as text.

manage_fixCount(self)

Calls self._fixCount() and reports the result as text.

manage_object_workspace(self, ids=(), REQUEST=None)

Redirects to the workspace of the first object in the list.

objectCount(self)

Returns the number of items in the folder.

tpValues(self)

Ensures the items don't show up in the left pane.

_cleanup(self)

Cleans up errors in the BTrees.

Certain ZODB bugs have caused BTrees to become slightly insane. Fortunately, there is a way to clean up damaged BTrees that always seems to work: make a new BTree containing the items() of the old one.

Returns 1 if no damage was detected, or 0 if damage was detected and fixed.

_delOb(self, id)

Remove the named object from the folder.

_fixCount(self)

Checks if the value of self._count disagrees with len(self.objectIds()). If so, corrects self._count. Returns the old and new count values. If old==new, no correction was performed.

_getOb(self, id, default=[])

Return the named object from the folder.

_populateFromFolder(self, source)

Fill this folder with the contents of another folder.

_setOb(self, id, object)

Store the named object in the folder.

Class Variable Details

__ac_permissions__

Type:
tuple
Value:
(('Access contents information',
  ('objectValues',
   'objectMap',
   'objectIds_d',
   'objectMap_d',
   'objectItems',
   'generateId',
   'get',
...                                                                    

generateId__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x20b5230>                                   

get__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x20b5230>                                   

getBatchObjectListing__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x20b5248>                                   

has_key__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x20b5230>                                   

manage_cleanup__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x20b5248>                                   

manage_fixCount__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x20b5248>                                   

manage_main

Type:
DTMLFile
Value:
<App.special_dtml.DTMLFile object at 0x22091b0>                        

manage_main__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x20b5248>                                   

manage_object_workspace__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x20b5248>                                   

manage_options

Type:
tuple
Value:
({'action': 'manage_main', 'label': 'Contents'},
 {'action': '', 'help': ('OFSP', 'Folder_View.stx'), 'label': 'View'},
 {'action': 'manage_propertiesForm',
  'help': ('OFSP', 'Properties.stx'),
  'label': 'Properties'},
 {'action': 'manage_access',
  'filter': <function _isNotBeingUsedAsAMethod at 0x1492270>,
  'help': ('OFSP', 'Security.stx'),
...                                                                    

objectCount__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x20b5230>                                   

objectIds__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x20b5230>                                   

objectIds_d__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x20b5230>                                   

objectItems__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x20b5230>                                   

objectMap__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x20b5230>                                   

objectMap_d__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x20b5230>                                   

objectValues__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x20b5230>                                   

title

Type:
str
Value:
''                                                                     

tpValues__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x20b5230>                                   

_count

Type:
NoneType
Value:
None                                                                  

_mt_index

Type:
NoneType
Value:
None                                                                  

_objects

Type:
tuple
Value:
()                                                                     

_tree

Type:
NoneType
Value:
None                                                                  

_v_nextid

Type:
int
Value:
0                                                                     

Generated by Epydoc 2.1 on Thu Aug 16 09:55:13 2007 http://epydoc.sf.net