Personal tools
You are here: Home Zpydoc API documentation OFS.OrderSupport

 OFS.OrderSupport  

Up one level
OFS OrderSupport
Order support for 'Object Manager'. $Id: OrderSupport.py 40409 2005-11-29 15:43:35Z efge $
Classes
  class OrderSupport ( object )
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.
getDefaultSorting(self)
  Access contents information
Get default sorting key and direction.
getObjectPosition(self, id)
  Access contents information
Get the position of an object by its id.
manage_move_objects_down(self, REQUEST, ids=None, delta=1)
  Manage properties
Move specified sub-objects down by delta in container.
manage_move_objects_to_bottom(self, REQUEST, ids=None)
  Manage properties
Move specified sub-objects to bottom of container.
manage_move_objects_to_top(self, REQUEST, ids=None)
  Manage properties
Move specified sub-objects to top of container.
manage_move_objects_up(self, REQUEST, ids=None, delta=1)
  Manage properties
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)
  Manage properties
Set default sorting key and direction.
moveObjectToPosition(self, id, position, suppress_events=False)
  Manage properties
Move specified object to absolute position.
moveObjectsByDelta(self, ids, delta, subset_ids=None, suppress_events=False)
  Manage properties
Move specified sub-objects by delta.
moveObjectsDown(self, ids, delta=1, subset_ids=None)
  Manage properties
Move specified sub-objects down by delta in container.
moveObjectsToBottom(self, ids, subset_ids=None)
  Manage properties
Move specified sub-objects to bottom of container.
moveObjectsToTop(self, ids, subset_ids=None)
  Manage properties
Move specified sub-objects to top of container.
moveObjectsUp(self, ids, delta=1, subset_ids=None)
  Manage properties
Move specified sub-objects up by delta in container.
orderObjects(self, key, reverse=None)
  Manage properties
Order sub-objects by key and direction.
setDefaultSorting(self, key, reverse)
  Manage properties
Set default sorting key and direction.
tpValues(self)
Functions
default__class_init__ (self)
implements (*interfaces)
Declare interfaces implemented by instances of a class This function is called in a class definition. The arguments are one or more interfaces or interface specifications (IDeclaration objects). The interfaces given (including the interfaces in the specifications) are added to any interfaces previously declared. Previous declarations include declarations for base classes unless implementsOnly was used. This function is provided for convenience. It provides a more convenient way to call classImplements. For example:: implements(I1) is equivalent to calling:: classImplements(C, I1) after the class has been created. Consider the following example:: >>> from zope.interface import Interface >>> class IA1(Interface): pass ... >>> class IA2(Interface): pass ... >>> class IB(Interface): pass ... >>> class IC(Interface): pass ... >>> class A(object): implements(IA1, IA2) ... >>> class B(object): implements(IB) ... >>> class C(A, B): ... implements(IC) >>> ob = C() >>> int(IA1 in providedBy(ob)) 1 >>> int(IA2 in providedBy(ob)) 1 >>> int(IB in providedBy(ob)) 1 >>> int(IC in providedBy(ob)) 1 Instances of ``C`` implement ``I1``, ``I2``, and whatever interfaces instances of ``A`` and ``B`` implement.
notifyContainerModified (object, *descriptions)
Notify that the container was modified.
sort (sequence, sort=(), _=None, mapping=0)
- sequence is a sequence of objects to be sorted - sort is a sequence of tuples (key,func,direction) that define the sort order: - key is the name of an attribute to sort the objects by - func is the name of a comparison function. This parameter is optional allowed values: - "cmp" -- the standard comparison function (default) - "nocase" -- case-insensitive comparison - "strcoll" or "locale" -- locale-aware string comparison - "strcoll_nocase" or "locale_nocase" -- locale-aware case-insensitive string comparison - "xxx" -- a user-defined comparison function - direction -- defines the sort direction for the key (optional). (allowed values: "asc" (default) , "desc")
Document Actions
« September 2010 »
September
MoTuWeThFrSaSu
12345
6789101112
13141516171819
20212223242526
27282930
Log in


Forgot your password?
New user?