Back to index

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

List of all members.

Public Member Functions

def getCriteriaItems
def post_validate

Static Public Attributes

tuple security = ClassSecurityInfo()
 schema = ATSimpleIntCriterionSchema
string meta_type = 'ATSimpleIntCriterion'
string archetype_name = 'Simple Int Criterion'
string shortDesc = 'Integer value or range'

Static Private Attributes

tuple __implements__ = ATBaseCriterion.__implements__+(IATTopicSearchCriterion, )

Detailed Description

A simple int criterion

Definition at line 93 of file

Member Function Documentation

Definition at line 104 of file

00105     def getCriteriaItems(self):
00106         result = []
00107         val = self.Value()
00108         direction = self.getDirection()
00109         if val or val == 0:
00110             if direction == 'min:max':
00111                 val = tuple([int(val), int(self.Value2())])
00112             else:
00113                 val = int(val)
00114             if direction:
00115                 result.append((self.Field(), {'query': val,  'range': direction}))
00116             else:
00117                 result.append((self.Field(), {'query': val}))
00119         return tuple(result)

Here is the call graph for this function:

Check that Value2 is set if range is set to min:max

Definition at line 121 of file

00122     def post_validate(self, REQUEST, errors):
00123         """Check that Value2 is set if range is set to min:max"""
00124         direction = REQUEST.get('direction', self.getDirection())
00125         val2 = REQUEST.get('value2', self.Value2())
00126         if direction == 'min:max' and not val2 and not val2 == 0:
00127             errors['value2']='You must enter a second value to do a "Between" search.'
00128         errors['value2']='You must enter a second value to do a "Between" search.'
00129         return errors
00131 registerCriterion(ATSimpleIntCriterion, LIST_INDICES)

Member Data Documentation

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

Definition at line 96 of file

Definition at line 100 of file

Definition at line 99 of file

Definition at line 98 of file

Definition at line 97 of file

string ATContentTypes.criteria.simpleint.ATSimpleIntCriterion.shortDesc = 'Integer value or range' [static]

Definition at line 101 of file

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