Products.MightyCal.Search.NamedCriterion (version 1.4)
index
/home/zope/lib/python/Products/MightyCal/Search/NamedCriterion.py

NamedCriterion object:  An NamedCriterion Object defines a set of search criteria that
are given a name.  This makes it easy to refer to complex criteria in HTTP requests, e.g.
by requesting 'Next30Days' instead of some ugly combination of request parameters.

 
Modules
            
Acquisition
Dumper
os
sys

 
Classes
            
Products.MightyCal.SItem.SItem(OFS.SimpleItem.Item, Acquisition.Acquirer, Acquisition.ExplicitAcquirer, OFS.PropertyManager.PropertyManager, App.PersistentExtra.Persistent, AccessControl.Role.RoleManager)
AbstractNamedCriterion
DateRangeNamedCriterion
SimpleNamedCriterion

 
class AbstractNamedCriterion
      The base class for NamedCriterion classes
 
  
__init__(self, id=None, title='', linkedField=None, criteriaDict=None)
Construct a new instance of a NamedCriterion.
getCriteriaDict(self)
Return the criteria we store
getLinkedField(self, REQUEST=None)
Returns the field that this criterion links to, along with the parent EventType

 
class DateRangeNamedCriterion
      A NamedCriterion for selecting events in a particular date range
 
  
getCriteriaDict(self)
Return the criteria we store.  Since the DateRange criterion object has to dynamically calculate a range (i.e. 'this week' means from 0 to 7 days from *today*, not from the day the criterion was created), we have to override the base class method and create a query dictionary de novo.
getRange(self, REQUEST=None)
Returns the beginning and end of the date range as a pair of integers
manage_update(self, title, rangeBeginning, rangeEnd, REQUEST=None)
Apply the updates requested by the Administrator to this NamedCriterion object
setupDefaultCriteriaDict(self)
Set the default criteria dictionary / aka QueryObject for this DateRangeNamedCriterion

 
class SimpleNamedCriterion
      A named criterion class that links a single EventCatalog index to a single criterion.
 
  
getValue(self, REQUEST=None)
Returns the value that this criterion performs matches on
manage_update(self, title, value, REQUEST=None)
Apply the updates requested by the Administrator to this NamedCriterion object
setupDefaultCriteriaDict(self)
Set the default criteria dictionary / aka QueryObject for this SimpleNamedCriterion

 
Functions
            
manage_addNamedCriterionForm()
# Some dummy external constructors
manage_addNamedCriterionInstance(container, id)

 
Data
             COMMON_FIELD_SPECS = ['TitleField', 'EventTimeField', 'DescriptionField', 'SubmitterField']

COMMON_FIELD_TITLE = 'Common Field'

CRITERIA_POLICY = 'Policy for NamedCriterion and related objects'

DATE_RANGE_BEGINNING = 'rangeBeginning'

DATE_RANGE_CRITERIA_SET = 'DateRangeCriteriaSet'

DATE_RANGE_CRITERIA_SET_DESCRIPTION = 'Searches for Events within a range of dates'

DATE_RANGE_END = 'rangeEnd'

DATE_RANGE_NAMED_CRITERION = 'DateRangeNamedCriterion'

DATE_RANGE_SEARCH_WIDGET = 'DateRangeWidget'

DATE_RANGE_SEARCH_WIDGET_TITLE = 'Date Range Search Widget'

DATE_RANGE_USAGE_SPECIFIER = 'range:min:max'

DESCRIPTION_FIELD = 'DescriptionField'

DIALOG_BOX = 'dialogBox'

DTML_DIR = 'dtml'

EDIT_URL = 'editURL'

EVENT_CATALOG = 'EventCatalog'

EVENT_TIME_FIELD = 'EventTimeField'

EVENT_TYPE_ID = 'eventTypeId'

EVENT_TYPE_TITLE = 'eventTypeTitle'

FIELD_SPECS = 'fieldSpecs'

FIELD_SPEC_ID = 'fieldSpecId'

FIELD_SPEC_TITLE = 'fieldSpecTitle'

ID_ATTRIBUTE = 'id'

INFO = 0

KEYWORD_SEARCH_WIDGET = 'KeywordWidgetImpl'

KEYWORD_SEARCH_WIDGET_NAME = 'Keyword Search Widget'

LABEL_ATTRIBUTE = 'label'

LIST_FIELD_SEARCH_WIDGET = 'ListFieldWidgetImpl'

LIST_FIELD_SEARCH_WIDGET_NAME = 'List Field Search Widget'

NAMED_CRITERION_OBJECT = 'NamedCriterion'

PACKAGE_NAME = 'Search'

PRODUCT_NAME = 'MightyCal'

RANGE_SUFFIX = '_ranges'

SIMPLE_CRITERIA_SET = 'SimpleCriteriaSet'

SIMPLE_CRITERIA_SET_DESCRIPTION = 'Performs a match against a single field'

SIMPLE_NAMED_CRITERION_OBJECT = 'SimpleNamedCriterion'

SPECIFIED_CRITERIA_SEARCH_WIDGET = 'SpecifiedCriteriaWidgetImpl'

SPECIFIED_CRITERIA_SEARCH_WIDGET_NAME = 'Specified Criteria Search Widget'

SUBMITTER_FIELD = 'SubmitterField'

THIS_CALENDAR_CRITERION_TITLE = 'Selects Events Approved for this Calendar'

THIS_MONTH_CRITERION_ID = 'ThisMonth'

THIS_MONTH_CRITERION_TITLE = "Selects This Month's Events"

THIS_WEEK_CRITERION_ID = 'ThisWeek'

THIS_WEEK_CRITERION_TITLE = "Selects This Week's Events"

TITLE_FIELD = 'TitleField'

TODAY_CRITERION_ID = 'Today'

TODAY_CRITERION_TITLE = "Selects only Today's Events"

UNAPPROVED_EVENTS_CRITERION_ID = 'UnapprovedEvents'

UNAPPROVED_EVENTS_CRITERION_TITLE = 'Selects Unapproved Events for this Calendar'

UPCOMING_EVENTS_CRITERION_ID = 'UpcomingEvents'

UPCOMING_EVENTS_CRITERION_TITLE = 'Selects All Upcoming Events'

USAGE_SUFFIX = '_usage'

WIDGET_DEFINITION_TAG = 'search-widget-definition'

WIDGET_FIELD_BINDING = 'Widget Field Binding'

WIDGET_ID = 'widgetId'

WIDGET_ID_TAG = 'widget-id'

WIDGET_ITEMS_TAG = 'widget-items'

WIDGET_ITEM_TAG = 'widget-item'

WIDGET_LABEL = 'widgetLabel'

WIDGET_LABEL_TAG = 'widget-label'

WIDGET_TYPE = 'Widget Type'

WIDGET_TYPES_INFO = {'KeywordWidgetImpl': 'Keyword Search Widget', 'ListFieldWidgetImpl': 'List Field Search Widget', 'SpecifiedCriteriaWidgetImpl': 'Specified Criteria Search Widget'}

WIDGET_VALUES = 'Widget Values'

__file__ = '/home/zope/lib/python/Products/MightyCal/Search/NamedCriterion.pyc'

__name__ = 'Products.MightyCal.Search.NamedCriterion'

__version__ = '$Revision: 1.4 $'

permAdministerCalendar = 'Administer Calendar'