Package OFS :: Module OrderSupport :: Class OrderSupport
[show private | hide private]
[frames | no frames]

Class OrderSupport

Known Subclasses:
OrderedFolder, PortalFolder

Ordered container mixin class.

This is an extension to the regular ObjectManager. It saves the objects in order and lets you change the order of the contained objects. This is particular helpful, if the order does not depend on object attributes, but is totally user-specific.
Method Summary
  getDefaultSorting(self)
Get default sorting key and direction.
  getObjectPosition(self, id)
Get the position of an object by its id.
  manage_move_objects_down(self, REQUEST, ids, delta)
Move specified sub-objects down by delta in container.
  manage_move_objects_to_bottom(self, REQUEST, ids)
Move specified sub-objects to bottom of container.
  manage_move_objects_to_top(self, REQUEST, ids)
Move specified sub-objects to top of container.
  manage_move_objects_up(self, REQUEST, ids, delta)
Move specified sub-objects up by delta in container.
  manage_renameObject(self, id, new_id, REQUEST)
Rename a particular sub-object without changing its position.
  manage_set_default_sorting(self, REQUEST, key, reverse)
Set default sorting key and direction.
  moveObjectsByDelta(self, ids, delta, subset_ids)
Move specified sub-objects by delta.
  moveObjectsDown(self, ids, delta, subset_ids)
Move specified sub-objects down by delta in container.
  moveObjectsToBottom(self, ids, subset_ids)
Move specified sub-objects to bottom of container.
  moveObjectsToTop(self, ids, subset_ids)
Move specified sub-objects to top of container.
  moveObjectsUp(self, ids, delta, subset_ids)
Move specified sub-objects up by delta in container.
  moveObjectToPosition(self, id, position)
Move specified object to absolute position.
  orderObjects(self, key, reverse)
Order sub-objects by key and direction.
  setDefaultSorting(self, key, reverse)
Set default sorting key and direction.
  tpValues(self)
Inherited from CopyContainer: _old_manage_renameObject

Class Variable Summary
tuple __ac_permissions__ = (('Access contents information', ('...
Interface __implements__ = <Interface OFS.IOrderSupport.IOrderedCo...
PermissionRole getDefaultSorting__roles__ = <PermissionRole object at 0...
PermissionRole getObjectPosition__roles__ = <PermissionRole object at 0...
int has_order_support = 1                                                                     
PermissionRole manage_move_objects_down__roles__ = <PermissionRole obje...
PermissionRole manage_move_objects_to_bottom__roles__ = <PermissionRole...
PermissionRole manage_move_objects_to_top__roles__ = <PermissionRole ob...
PermissionRole manage_move_objects_up__roles__ = <PermissionRole object...
tuple manage_options = ({'action': 'manage_main', 'help': ('OF...
tuple manage_renameObject__roles__ = ('Manager',)
PermissionRole manage_set_default_sorting__roles__ = <PermissionRole ob...
PermissionRole moveObjectsByDelta__roles__ = <PermissionRole object at ...
PermissionRole moveObjectsDown__roles__ = <PermissionRole object at 0xf...
PermissionRole moveObjectsToBottom__roles__ = <PermissionRole object at...
PermissionRole moveObjectsToTop__roles__ = <PermissionRole object at 0x...
PermissionRole moveObjectsUp__roles__ = <PermissionRole object at 0xff6...
PermissionRole moveObjectToPosition__roles__ = <PermissionRole object a...
PermissionRole orderObjects__roles__ = <PermissionRole object at 0xff68...
PermissionRole setDefaultSorting__roles__ = <PermissionRole object at 0...
str _default_sort_key = 'position'
int _default_sort_reverse = 0                                                                     

Method Details

getDefaultSorting(self)

Get default sorting key and direction.

getObjectPosition(self, id)

Get the position of an object by its id.

manage_move_objects_down(self, REQUEST, ids=None, delta=1)

Move specified sub-objects down by delta in container.

manage_move_objects_to_bottom(self, REQUEST, ids=None)

Move specified sub-objects to bottom of container.

manage_move_objects_to_top(self, REQUEST, ids=None)

Move specified sub-objects to top of container.

manage_move_objects_up(self, REQUEST, ids=None, delta=1)

Move specified sub-objects up by delta in container.

manage_renameObject(self, id, new_id, REQUEST=None)

Rename a particular sub-object without changing its position.

manage_set_default_sorting(self, REQUEST, key, reverse)

Set default sorting key and direction.

moveObjectsByDelta(self, ids, delta, subset_ids=None)

Move specified sub-objects by delta.

moveObjectsDown(self, ids, delta=1, subset_ids=None)

Move specified sub-objects down by delta in container.

moveObjectsToBottom(self, ids, subset_ids=None)

Move specified sub-objects to bottom of container.

moveObjectsToTop(self, ids, subset_ids=None)

Move specified sub-objects to top of container.

moveObjectsUp(self, ids, delta=1, subset_ids=None)

Move specified sub-objects up by delta in container.

moveObjectToPosition(self, id, position)

Move specified object to absolute position.

orderObjects(self, key, reverse=None)

Order sub-objects by key and direction.

setDefaultSorting(self, key, reverse)

Set default sorting key and direction.

Class Variable Details

__ac_permissions__

Type:
tuple
Value:
(('Access contents information', ('getObjectPosition', 'getDefaultSort\
ing')),
 ('Manage properties',
  ('manage_move_objects_down',
   'moveObjectsToBottom',
   'manage_move_objects_up',
   'moveObjectsDown',
   'setDefaultSorting',
...                                                                    

__implements__

Type:
Interface
Value:
<Interface OFS.IOrderSupport.IOrderedContainer at 137c930>             

getDefaultSorting__roles__

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

getObjectPosition__roles__

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

has_order_support

Type:
int
Value:
1                                                                     

manage_move_objects_down__roles__

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

manage_move_objects_to_bottom__roles__

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

manage_move_objects_to_top__roles__

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

manage_move_objects_up__roles__

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

manage_options

Type:
tuple
Value:
({'action': 'manage_main',
  'help': ('OFSP', 'OrderSupport_Contents.stx'),
  'label': 'Contents'},)                                               

manage_renameObject__roles__

Type:
tuple
Value:
('Manager',)                                                           

manage_set_default_sorting__roles__

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

moveObjectsByDelta__roles__

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

moveObjectsDown__roles__

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

moveObjectsToBottom__roles__

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

moveObjectsToTop__roles__

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

moveObjectsUp__roles__

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

moveObjectToPosition__roles__

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

orderObjects__roles__

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

setDefaultSorting__roles__

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

_default_sort_key

Type:
str
Value:
'position'                                                             

_default_sort_reverse

Type:
int
Value:
0                                                                     

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