Products.MightyCal.EventType.DataRangeProviders (version 1.12)
index
/home/zope/lib/python/Products/MightyCal/EventType/DataRangeProviders.py

DataRangeProvider definitions for the MightyCal product.  DataRangeProviders are similar to validators,
in that they define what sets of possible values are acceptable for entry in a field.
* DataRangeProviders are intended to be flexible and user configurable via the Zope Management
  Interface (ZMI); this is the purpose of the getEditor() method in each DataRangeProvider class.
  The editor widgets that are provided by this routine get embedded in the overall FieldSpec editing
  framework.
* In addition to providing simple validation of user entry, DataRangeProviders also can deliver a set
  of valid values (as in the case of FieldSpecs that provide a list of values to choose from, or
  Resource ContentTypes, which need to be able to provide a set of date/times that they are available)
* Even though DataRangeProviders are not intended to be callable from the Web, their methods are still
  declared to be private using security.declarePrivate(), to prevent hackers from trying to modify
  backend data by cleverly constructed HTTP requests to objects that aren't accessible from the normal
  user interface.

 
Modules
            
Products.MightyCal.EventType.DataRangeProviders
re
types

 
Classes
            
Products.ZCatalog.CatalogAwareness.CatalogAware
AbstractDataRangeProvider(Products.MightyCal.SFolder.SFolder, Products.ZCatalog.CatalogAwareness.CatalogAware)
BaseRegexpDataRangeProvider
CustomizableRegexpDataRangeProvider
SimplisticStringDataRangeProvider
TelephoneNumberDataRangeProvider
CalendarDataRangeProvider
CalendarPlusNoneDataRangeProvider
NumericRangeDataRangeProvider
SimpleListDataRangeProvider
SimplisticDataRangeProvider
UserDataRangeProvider
exceptions.Exception
UpdateSpecificationException
ValidationException
Products.MightyCal.SFolder.SFolder(OFS.Folder.Folder, Acquisition.ExplicitAcquirer, Acquisition.Acquirer)
AbstractDataRangeProvider(Products.MightyCal.SFolder.SFolder, Products.ZCatalog.CatalogAwareness.CatalogAware)
BaseRegexpDataRangeProvider
CustomizableRegexpDataRangeProvider
SimplisticStringDataRangeProvider
TelephoneNumberDataRangeProvider
CalendarDataRangeProvider
CalendarPlusNoneDataRangeProvider
NumericRangeDataRangeProvider
SimpleListDataRangeProvider
SimplisticDataRangeProvider
UserDataRangeProvider

 
class AbstractDataRangeProvider
      AbstractDataRangeProvider is the base class for all MightyCal DataRangeProvider types. It's only here to provide a base class that we can look for during introspection, as well as to establish the interface that all descendants implement.
 
  
__init__(self, defaultValueProvider)
# Define a generic constructor
_checkNull(self, value)
_destroy(self)
A cleanup routine called whenever a DataRangeProvider needs to be gotten rid of
_editorEnhancements(self, frozen='')
Return HTML snippet that will provide for editing special properties of the particular data provider
_index(self)
Record this object in the ZCatalog, and requests its children to do the same
_updateInternalSpecification(self, specInfo)
Update the regular expression we use for validation
getDefaultValue(self)
Ask the DataType to send back a default value
getEditor(self, parentType)
Return HTML snippet that will provide for editing an IntegerDataType
getSearchWidgetInfo(self)
Return a dictionary of info about the recommended search widget for this DataRangeProvider.   The dictionary slots are:   WIDGET_TYPE: The recommended type of widget (e.g. SpecifiedValueWidgetImpl or KeywordSearchWidget)   WIDGET_VALUES: A list of valid possible values for a <SELECT>-type widget.   By default return a WIDGET_TYPE of SPECIFIED_CRITERIA_SEARCH_WIDGET and a null WIDGET_VALUES list.
getValidDataPoints(self)
Provide a default behavior of providing no data range at all
overrideIndexType(self, indexType)
Some data range providers will need to override the default IndexType.  Default behavior is to leave the original index type alone.
overrideWidgetType(self, widgetType)
Some data range providers will need to override the default recommended display widget. Normal behavior is to leave the widget type alone
setDefaultValueProvider(self, provider)
Change our default value provider
updateInternalSpecification(self, specInfo)
Update our RangeProvider info, then let the DefaultValueProvider update itself
validate(self, value)
Provide a default behavior of returning true, unless mandatoriness is violated

 
class BaseRegexpDataRangeProvider
      BaseRegexpDataRangeProvider is a range provider for a String that provides no data points for input, but restricts entries based upon their matching the provided regular expression.  It is intended to be subclassed to provide a variety of prebuilt template fields, such as phone number, email, web addresses, etc.
 
  
validate(self, value)
Check to see if the field data passed to us matches the regular expression

 
class CalendarDataRangeProvider
      Specifies a list of Calendars the field can have
 
  
_editorEnhancements(self)
Return HTML snippet that will provide for editing an our data provider
_updateInternalSpecification(self, specInfo)
Updating this DataRangeProvider does nothing
getValidDataPoints(self)
Returns the values considered as valid for this field
overrideIndexType(self, indexType)
List Range Provider fields should be indexed as a FieldIndex
validate(self, valueList)
Check to see if the field data passed to is in our list of good values.

 
class CalendarPlusNoneDataRangeProvider
      Specifies a list of Calendars the field can have
 
  
getValidDataPoints(self)
Returns the values considered as valid for this field

 
class CustomizableRegexpDataRangeProvider
      Forces text to match a custom regular expression
 
  
__init__(self, defaultValueProvider)
_editorEnhancements(self)
Return HTML snippet that will provide for editing an our data provider
_updateInternalSpecification(self, specInfo)
Update the regular expression we use for validation

 
class NumericRangeDataRangeProvider
      Makes sure a number falls within upper/lower bounds
 
  
__init__(self, defaultValueProvider)
_editorEnhancements(self)
Return HTML snippet that will provide for editing an our data provider
_updateInternalSpecification(self, specInfo)
Update the regular expression we use for validation
validate(self, value)
Check to see if the field data passed to us is within the bounds registered with us

 
class SimpleListDataRangeProvider
      Specifies a list of values the field can have
 
  
__init__(self, defaultValueProvider)
_editorEnhancements(self)
Return HTML snippet that will provide for editing an our data provider
_updateInternalSpecification(self, specInfo)
Update the list of valid values we use for validation
getSearchWidgetInfo(self)
Return a dictionary of info about the recommended search widget for this DataRangeProvider.   The dictionary slots are:   WIDGET_TYPE: The recommended type of widget (e.g. SpecifiedValueWidgetImpl or KeywordSearchWidget)   WIDGET_VALUES: A list of valid possible values for a <SELECT>-type widget.   Return a WIDGET_TYPE of LIST_FIELD_SEARCH_WIDGET and a WIDGET_VALUES list of our valid values.
getValidDataPoints(self)
Returns the values considered as valid for this field
overrideIndexType(self, indexType)
List Range Provider fields should be indexed as a FieldIndex
overrideWidgetType(self, widgetType)
Some data range providers will need to override the default recommended display widget. Normal behavior is to leave the widget type alone
validate(self, value)
Check to see if the field data passed to is in our list of good values.

 
class SimplisticDataRangeProvider
      Allows unrestricted data entry
 
  

 
class SimplisticStringDataRangeProvider
      Allows unrestricted string input
 
  
__init__(self, defaultValueProvider)

 
class TelephoneNumberDataRangeProvider
      Accepts only text matching telephone number format
 
  
__init__(self, defaultValueProvider)
overrideIndexType(self, indexType)
Telephone numbers should be indexed as whole entities
validate(self, value)
Check to see if the field data passed to us matches the regular expression

 
class UpdateSpecificationException
      # When the admin tried to update the definition for a field, one of # the fields components (i.e. ContentType, DataType or DataRangeProvider) # was unable to process the new specification information
 
  
__init__(self, value)
__str__(self)

 
class UserDataRangeProvider
      Specifies a list of Users registered in the system
 
  
_editorEnhancements(self)
Return HTML snippet that will provide for editing an our data provider
_updateInternalSpecification(self, specInfo)
Updating this DataRangeProvider does nothing
getValidDataPoints(self)
Returns the values considered as valid for this field
overrideIndexType(self, indexType)
List Range Provider fields should be indexed as a FieldIndex
validate(self, value)
Check to see if the field data passed to is in our list of good values.

 
class ValidationException
      # Indicates that a DataRangeProvider found that the value of a field # was not within the valid range for that field
 
  
__init__(self, value)
__str__(self)

 
Data
             ACTION_CONTENT_TYPE = 'ActionContentType'

ADD_EVENT_TYPE_METHOD = 'addEventType'

APPROVED_CALENDARS_FIELD = 'ApprovedCalendarField'

BASE_REGEXP_DATA_RANGE_PROVIDER = 'BaseRegexpDataRangeProvider'

BASIC_CONTENT_TYPE = 'BasicContentType'

BOOLEAN_DATA_TYPE = 'BooleanDataType'

BOX_CHECKED = 'on'

CALENDAR_DATA_RANGE_PROVIDER = 'CalendarDataRangeProvider'

CALENDAR_DATA_TYPE = 'CalendarDataType'

CALENDAR_DEFAULT_VALUE_PROVIDER = 'CalendarDefaultValueProvider'

CALENDAR_OBJECT = 'Calendar'

CALENDAR_OWNER = 'calendarOwner'

CALENDAR_REGISTRY = 'CalendarRegistry'

CONTENT_TYPES = 'ContentTypes'

CUSTOMIZABLE_REGEXP_DATA_RANGE_PROVIDER = 'CustomizableRegexpDataRangeProvider'

DATA_RANGE_PROVIDER = 'DataRangeProvider'

DATA_RANGE_PROVIDERS = 'DataRangeProviders'

DATA_TYPES = 'DataTypes'

DATE_TIME_DATA_TYPE = 'DateTimeDataType'

DEFAULT_BOOLEAN_FORMAT = 'T'

DEFAULT_DATE_FORMAT = '%m/%d/%y %I:%M %p'

DEFAULT_INTEGER_FORMAT = '%d'

DEFAULT_STRING_FORMAT = '%s'

DEFAULT_VALUE_PROVIDER = 'DefaultValueProvider'

DEFAULT_VALUE_PROVIDERS = 'DefaultValueProviders'

DESCRIPTION_FIELD = 'DescriptionField'

DESCRIPTION_PROPERTY = 'description'

EMPTY_LIST_DEFAULT_VALUE_PROVIDER = 'EmptyListDefaultValueProvider'

EVENT_DETAIL_TEMPLATE = 'EventDetail'

EVENT_EDITOR_TEMPLATE = 'EventEditor'

EVENT_TIME_FIELD = 'EventTimeField'

FALSE = 0

FIELD_COMMENT = 'fieldComment'

FIELD_INDEX = 'FieldIndex'

FIELD_TITLE = 'fieldTitle'

IMMUTABLE_FIELD = 'ImmutableField'

INDEXED_FIELD = 'IndexedField'

INFO = 0

INTEGER_DATA_TYPE = 'IntegerDataType'

KEYWORD_INDEX = 'KeywordIndex'

KEYWORD_SEARCH_WIDGET = 'KeywordWidgetImpl'

LIST_FIELD_SEARCH_WIDGET = 'ListFieldWidgetImpl'

LOGGED_IN_USER_DEFAULT_VALUE_PROVIDER = 'LoggedInUserDefaultValueProvider'

MANDATORY_FIELD = 'MandatoryField'

MEMO_DATA_TYPE = 'MemoDataType'

MULTI_VALUE_DATA_TYPE = 'MultiValueDataType'

NAME = 'name'

NOW_DATE_TIME_DEFAULT_VALUE_PROVIDER = 'NowDateTimeDefaultValueProvider'

NUMERIC_RANGE_DATA_RANGE_PROVIDER = 'NumericRangeDataRangeProvider'

ONE_LINE_DISPLAY_TEMPLATE = 'SingleLineDisplay'

PUBLIC_FIELD = 'PublicField'

RANGE_LIST_CONTENTS = 'rangeListContents'

REQUESTED_CALENDARS_FIELD = 'RequestedCalendarField'

RESOURCE_CONTENT_TYPE = 'ResourceContentType'

SELECT_WIDGET = 'SelectWidget'

SIMPLE_BOOLEAN_DEFAULT_VALUE_PROVIDER = 'SimpleBooleanDefaultValueProvider'

SIMPLE_INTEGER_DEFAULT_VALUE_PROVIDER = 'SimpleIntegerDefaultValueProvider'

SIMPLE_LIST_DATA_RANGE_PROVIDER = 'SimpleListDataRangeProvider'

SIMPLE_LIST_DEFAULT_VALUE_PROVIDER = 'SimpleListDefaultValueProvider'

SIMPLE_STRING_DEFAULT_VALUE_PROVIDER = 'SimpleStringDefaultValueProvider'

SIMPLISTIC_DATA_RANGE_PROVIDER = 'SimplisticDataRangeProvider'

SIMPLISTIC_STRING_DATA_RANGE_PROVIDER = 'SimplisticStringDataRangeProvider'

SPECIFIED_CRITERIA_SEARCH_WIDGET = 'SpecifiedCriteriaWidgetImpl'

SPECIFIED_DEFAULT_VALUED = 'specifiedDefaultValue'

STRING_DATA_TYPE = 'StringDataType'

SUBMITTER_FIELD = 'SubmitterField'

TELEPHONE_NUMBER_DATA_RANGE_PROVIDER = 'TelephoneNumberDataRangeProvider'

TITLE_FIELD = 'TitleField'

TITLE_ONLY_DISPLAY_TEMPLATE = 'TitleOnlyDisplay'

TRUE = 1

USER_DATA_RANGE_PROVIDER = 'UserDataRangeProvider'

USER_DATA_TYPE = 'UserDataType'

USER_REGISTRY = 'acl_users'

WIDGET_TYPE = 'Widget Type'

WIDGET_VALUES = 'Widget Values'

__file__ = '/home/zope/lib/python/Products/MightyCal/EventType/DataRangeProviders.pyc'

__name__ = 'Products.MightyCal.EventType.DataRangeProviders'

__version__ = '$Revision: 1.12 $'

cLowerBound = 'lowerBound'

cRegexp = 'regexp'

cUpperBound = 'upperBound'