Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes | Static Private Attributes
ATContentTypes.criteria.selection.ATSelectionCriterion Class Reference
Inheritance diagram for ATContentTypes.criteria.selection.ATSelectionCriterion:
Inheritance graph
Collaboration diagram for ATContentTypes.criteria.selection.ATSelectionCriterion:
Collaboration graph

List of all members.

Public Member Functions

def getCurrentValues
def getCriteriaItems

Static Public Attributes

tuple security = ClassSecurityInfo()
 schema = ATSelectionCriterionSchema
string meta_type = 'ATSelectionCriterion'
string archetype_name = 'Selection Criterion'
string shortDesc = 'Select values from list'

Static Private Attributes

tuple __implements__ = ATBaseCriterion.__implements__+(IATTopicSearchCriterion, )

Detailed Description

A selection criterion

Definition at line 80 of file

Member Function Documentation

Definition at line 102 of file

00103     def getCriteriaItems(self):
00104         # filter out empty strings
00105         result = []
00107         value = tuple([ value for value in self.Value() if value ])
00108         if not value:
00109             return ()
00110         result.append((self.Field(), { 'query': value, 'operator': self.getOperator()}),)
00112         return tuple(result)
00114 registerCriterion(ATSelectionCriterion, LIST_INDICES)

Here is the call graph for this function:

Definition at line 90 of file

00091     def getCurrentValues(self):
00092         catalog = getToolByName(self, 'portal_catalog')
00093         options = catalog.uniqueValuesFor(self.Field())
00094         # AT is currently broken, and does not accept ints as
00095         # DisplayList keys though it is supposed to (it should
00096         # probably accept Booleans as well) so we only accept strings
00097         # for now
00098         options = [(o.lower(),o) for o in options if isinstance(o, basestring)]
00099         options.sort()
00100         return [o[1] for o in options]

Here is the call graph for this function:

Member Data Documentation

tuple ATContentTypes.criteria.selection.ATSelectionCriterion.__implements__ = ATBaseCriterion.__implements__+(IATTopicSearchCriterion, ) [static, private]

Definition at line 83 of file

Definition at line 87 of file

Definition at line 86 of file

Definition at line 85 of file

Definition at line 84 of file

string ATContentTypes.criteria.selection.ATSelectionCriterion.shortDesc = 'Select values from list' [static]

Definition at line 88 of file

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