Products.MightyCal.EventType.FieldSpec (version 1.28) | index /home/zope/lib/python/Products/MightyCal/EventType/FieldSpec.py |
FieldSpec object. FieldSpec provides the description for how a particular field is structured & operates. It is designed around the Composite design pattern. Actually, the FieldSpec is the Facade, and the FieldSpec's ContentType is the actual composite. FieldSpec objects are intended to be highly malleable, so that they can represent and manage many kinds of field data, from simple String field to Action 'fields' that actually require numerous Zope Properties to be present in the Event objects which carry the Action info. Field Specs are structured as follows: They contain a field called _content, which holds an instance of a ContentType object (See ContentTypes.py for a list of available types). ContentTypes hold a DataType object, which specifies whether the field holds a String, an integer, a boolean, etc. The DataType in turn holds a DataRangeProvider (which determines which values are valid for that field) and a DefaultValueProvider, which can be queried for an appropriate default value. ContentTypes can be told (via their updateInternalSpecification() method) to restructure themselves, thereby taking on different DataType objects as their children. The FieldSpec's manage_main method provides an interface for telling the different pieces of the FieldSpec composite how to change or restructure themselves. FieldSpecs are also a TemplateCollection owner, which makes it possible for administrators to customize how a particular field is going to be presented to the end user. Finally, FieldSpecs cooperate in handling Event objects. They have the responsibility for adding and removing Zope Properties from Events (since it is these Properties that actually hold the Event information), and for setting these Zope Properties based on input from the user. The idea is that since Events are Flyweights, they shouldn't need to know anything about the data they carry. FieldSpecs, on the other hand, know all about the structure of the information they need to store, so they are the logical managers of the information contained in Events.
Modules | ||||||
|
Classes | ||||||||||
|
Functions | ||
|
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' BOOLEAN_PROPERTY_TYPE = 'int' BOX_CHECKED = 'on' CALENDAR_DATA_RANGE_PROVIDER = 'CalendarDataRangeProvider' CALENDAR_DATA_TYPE = 'CalendarDataType' CALENDAR_DEFAULT_VALUE_PROVIDER = 'CalendarDefaultValueProvider' CALENDAR_OWNER = 'calendarOwner' COCOON_HTML_WIDGET_MAKER = 'CocoonHTMLWidgetMaker' 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' DISPLAY_TEMPLATE = 'StandardDisplay' DTML_DIR = 'dtml' EMPTY_LIST_DEFAULT_VALUE_PROVIDER = 'EmptyListDefaultValueProvider' EVENT_CATALOG = 'EventCatalog' EVENT_DETAIL_TEMPLATE = 'EventDetail' EVENT_EDITOR_TEMPLATE = 'EventEditor' EVENT_TIME_FIELD = 'EventTimeField' EVENT_TYPE_OWNER = 'eventTypeOwner' FALSE = 0 FIELD_COMMENT = 'fieldComment' FIELD_NAME_TAG = 'field-name' FIELD_SPEC = 'FieldSpec' FIELD_SPEC_DESCRIPTOR_TAG = 'fieldspec-descriptor' FIELD_SPEC_TAG = 'field-spec' FIELD_TITLE = 'fieldTitle' FIELD_VALUE_TAG = 'field-value' ID_ATTRIBUTE = 'id' IMMUTABLE_FIELD = 'ImmutableField' INDEXED_FIELD = 'IndexedField' INFO = 0 INTEGER_DATA_TYPE = 'IntegerDataType' LOGGED_IN_USER_DEFAULT_VALUE_PROVIDER = 'LoggedInUserDefaultValueProvider' MANDATORY_FIELD = 'MandatoryField' MEMO_DATA_TYPE = 'MemoDataType' MULTI_VALUE_DATA_TYPE = 'MultiValueDataType' MessageDialog = <HTML instance at 82c28f8> NAME = 'name' NOW_DATE_TIME_DEFAULT_VALUE_PROVIDER = 'NowDateTimeDefaultValueProvider' NUMERIC_RANGE_DATA_RANGE_PROVIDER = 'NumericRangeDataRangeProvider' OBJECT_CATALOG = 'ObjectCatalog' ONE_LINE_DISPLAY_TEMPLATE = 'SingleLineDisplay' PUBLIC_FIELD = 'PublicField' RANGE_LIST_CONTENTS = 'rangeListContents' REQUESTED_CALENDARS_FIELD = 'RequestedCalendarField' RESOURCE_CONTENT_TYPE = 'ResourceContentType' 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_DEFAULT_VALUED = 'specifiedDefaultValue' STRING_DATA_TYPE = 'StringDataType' STRING_PROPERTY_TYPE = 'string' STYLE_BASE = 'StyleBase' STYLE_FOR_ERROR = 'StyleForError' SUBMITTER_FIELD = 'SubmitterField' TELEPHONE_NUMBER_DATA_RANGE_PROVIDER = 'TelephoneNumberDataRangeProvider' TEMPLATE_COLLECTION = 'TemplateCollection' TEMPLATE_TITLE = 'title' TITLE_FIELD = 'TitleField' TITLE_ONLY_DISPLAY_TEMPLATE = 'TitleOnlyDisplay' TRUE = 1 USELESS_VALUE = 'abracadabra' USER_DATA_RANGE_PROVIDER = 'UserDataRangeProvider' USER_DATA_TYPE = 'UserDataType' WIDGET_MAKER_REGISTRY = 'WidgetMakerRegistry' XML_START_TAG = '<?xml version="1.0" ?>' ZOPE_WIDGET_MAKER = 'ZopeWidgetMaker' __file__ = '/home/zope/lib/python/Products/MightyCal/EventType/FieldSpec.pyc' __name__ = 'Products.MightyCal.EventType.FieldSpec' __version__ = '$Revision: 1.28 $' permViewMgmtScreen = 'View management screens' |