Back to index

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

List of all members.

Public Member Functions

def __init__
def Field
def getEditForm
def edit
def getCriteriaItems

Public Attributes

 id
 index
 reversed

Static Public Attributes

string meta_type = 'Sort Criterion'
tuple security = ClassSecurityInfo()
 field = None

Static Private Attributes

 __implements__ = z2ICriterion
tuple _editableAttributes = ( 'reversed', )

Detailed Description

    Represent a mock criterion, to allow spelling the sort order
    and reversal items in a catalog query.

Definition at line 30 of file SortCriterion.py.


Constructor & Destructor Documentation

def CMFTopic.SortCriterion.SortCriterion.__init__ (   self,
  id,
  index 
)

Definition at line 48 of file SortCriterion.py.

00048 
00049     def __init__( self, id, index ):
00050         self.id = id
00051         self.index = index
00052         self.reversed = 0


Member Function Documentation

def CMFTopic.SortCriterion.SortCriterion.edit (   self,
  reversed 
)
    Update the value we are to match up against.

Definition at line 69 of file SortCriterion.py.

00069 
00070     def edit( self, reversed ):
00071         """
00072             Update the value we are to match up against.
00073         """
00074         self.reversed = bool(reversed)

Here is the caller graph for this function:

    Map the stock Criterion interface.

Definition at line 54 of file SortCriterion.py.

00054 
00055     def Field( self ):
00056         """
00057             Map the stock Criterion interface.
00058         """
00059         return self.index

Here is the caller graph for this function:

    Return a tuple of query elements to be passed to the catalog
    (used by 'Topic.buildQuery()').

Definition at line 76 of file SortCriterion.py.

00076 
00077     def getCriteriaItems( self ):
00078         """
00079             Return a tuple of query elements to be passed to the catalog
00080             (used by 'Topic.buildQuery()').
00081         """
00082         result = [ ( 'sort_on', self.index ) ]
00083 
00084         if self.reversed:
00085             result.append( ( 'sort_order', 'reverse' ) )
00086 
00087         return tuple( result )
00088 
00089 InitializeClass( SortCriterion )
00090 
00091 # Register as a criteria type with the Topic class
00092 Topic._criteriaTypes.append( SortCriterion )
    Return the name of skin method which renders the form
    used to edit this kind of criterion.

Definition at line 61 of file SortCriterion.py.

00061 
00062     def getEditForm( self ):
00063         """
00064             Return the name of skin method which renders the form
00065             used to edit this kind of criterion.
00066         """
00067         return 'sort_edit'


Member Data Documentation

CMFTopic.SortCriterion.SortCriterion.__implements__ = z2ICriterion [static, private]

Definition at line 38 of file SortCriterion.py.

Definition at line 46 of file SortCriterion.py.

Definition at line 44 of file SortCriterion.py.

Definition at line 49 of file SortCriterion.py.

Definition at line 50 of file SortCriterion.py.

string CMFTopic.SortCriterion.SortCriterion.meta_type = 'Sort Criterion' [static]

Definition at line 40 of file SortCriterion.py.

Definition at line 51 of file SortCriterion.py.

tuple CMFTopic.SortCriterion.SortCriterion.security = ClassSecurityInfo() [static]

Definition at line 42 of file SortCriterion.py.


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