Products.MightyCal.EventCatalog.EventCatalog (version 1.26)
index
/home/zope/lib/python/Products/MightyCal/EventCatalog/EventCatalog.py

EventCatalog.  A ZCatalog descendant that does double duty:
1) It holds the actual events that it catalogs.
2) It knows that how to keep its ZCatalog indexes in sync with the fields
   currently defined in the various EventTypes that MightyCal knows about.

 
Modules
            
Acquisition
Dumper
os
sys

 
Classes
            
Acquisition.ExplicitAcquirer
EventCatalog(Products.ZCatalog.ZCatalog.ZCatalog, Acquisition.ExplicitAcquirer)
Products.ZCatalog.ZCatalog.ZCatalog(OFS.Folder.Folder, Persistence.Persistent, Acquisition.Acquirer)
EventCatalog(Products.ZCatalog.ZCatalog.ZCatalog, Acquisition.ExplicitAcquirer)

 
class EventCatalog
      A specialized ZCatalog for indexing Event objects
 
  
__init__(self)
_setObject(self, id, object, roles=None, user=None, set_owner=1) from Products.MightyCal.SFolder.SFolder
_subobject_permissions(self) from Products.MightyCal.SFolder.SFolder
addNewIndex(self, indexId, indexType)
Adds the index info to our internal database of event indexes.  For each field in the new event, other than the title field, add an index of the appropriate type
approveEvents(self, eventIds, calendarId)
Mark the specified event as approved (for the specified Calendar), by moving the specified Calendar ID from the list of 'requested calendars' to the list of 'approved calendars'.  In addition, send an email to each administrator noting that their Event(s) were approved.
changeIndex(self, indexId, indexType, REQUEST=None)
For an event type that has already been set up for indexing, we need to figure out if the Index type has changed.  If so, we drop the index and create a new one of the new type.
createEvent(self, typeToAdd, REQUEST=None)
Redirect the user to the event edit/creation page of the DataEntryHandler
deleteEvents(self, ids, REQUEST=None)
Delete the given list of Events from our registry
getEventDescriptors(self, currCalendar, REQUEST)
Returns a List of Event objects from the Events container
getEventTypes(self, currCalendar=None, REQUEST=None)
Returns a List of EventType objects from the EventTypeRegistry container
getEvents(self, currCalendar, REQUEST=None)
Just return a list of the Events we contain, possibly constrained by a particular Calendar if the Admin Interface is embedding an Event list
getEventsByEventType(self, eventTypeID)
Returns a list of event IDs for events that implement a particular EventType
queryEvents(self, queryObject)
Returns a list of event objects that match the given query object.  The
rejectEvent(self, eventId, calendarId, reason)
Mark the Event as rejected (for a particular calendar) by removing the specified calendar ID from the list of requested calendar.  Also, send an email to the admin letting him know that their event was rejected.  Events can only be rejected one at a time, so that the admin can write a short note indicating why the event was rejected.  Finally, if the Event no longer has any 'requested calendars' in its list, it is permanently deleted, since that means that no administrator wants the Event in his calendar.
removeIndex(self, indexId)
Get rid of specified indexes
removeIndexAndProperty(self, eventType, fieldId)
When a DataType gets deleted, it calls this routine to have the EventCatalog remove its corresponding Index, and to delete the DataType's Property from every Event that carries it.
restructureEventProperties(self, eventType, fieldId, propertyType, defaultValue, conversionFunction)
When a DataType gets added or modified, it calls this routine so that the EventCatalog can handle adding new index(es) for new/modified Properties that Events will carry, and in addition, it handles restructuring Events so that they have all and only the properties they need.
setIndex(self, indexId, indexType, REQUEST)
Called when an EventType has been modified in some way... makes sure that any necessary new index is added,  and if an index-type has been changed, that the index is changed to reflect that.  Note that the REQUEST parameter is needed, because we may have to call reindexIndex() (in our changeIndex method), and for some reason that method requires a REQUEST object.
submitDataEntryTransaction(self, trans)
Given a DataEntryTransaction, either create a new event or update a current one using the values in the transaction fields.

 
Functions
            
manage_addEventCatalog(container, id)
manage_addEventCatalogForm()

 
Data
             APPROVED = 'approved'

APPROVED_CALENDARS_FIELD = 'ApprovedCalendarField'

BOOLEAN_PROPERTY_TYPE = 'int'

CALENDAR_OWNER = 'calendarOwner'

CALENDAR_REGISTRY = 'CalendarRegistry'

DATA_ENTRY_HANDLER = 'DataEntryHandler'

DATE_PROPERTY_TYPE = 'date'

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

DTML_DIR = 'dtml'

EDIT_URL = 'editURL'

EVENT_CATALOG = 'EventCatalog'

EVENT_OBJECT = 'Event'

EVENT_SNAPSHOT = 'EventSnapshot'

EVENT_TIME_FIELD = 'EventTimeField'

EVENT_TITLE = 'eventTitle'

EVENT_TYPE = 'eventType'

EVENT_TYPE_COLUMN = 'eventType'

EVENT_TYPE_OBJECT = 'EventType'

EVENT_TYPE_OWNER = 'eventTypeOwner'

EVENT_TYPE_REGISTRY = 'EventTypeRegistry'

FALSE = 0

FIELD_INDEX = 'FieldIndex'

ICON = 'icon'

INFO = 0

INTEGER_PROPERTY_TYPE = 'int'

KEYWORD_INDEX = 'KeywordIndex'

LIST_PROPERTY_TYPE = 'lines'

MEMO_PROPERTY_TYPE = 'text'

MODIFICATION_TIME = 'modificationTime'

OBJECT_MODIFICATION_TIME_INDEX_NAME = 'bobobase_modification_time'

OBJECT_TYPE = 'object_type'

REQUESTED_CALENDARS_FIELD = 'RequestedCalendarField'

STRING_PROPERTY_TYPE = 'string'

SUBMITTER_FIELD = 'SubmitterField'

TEMP_FOLDER = 'TempFolder'

TEXT_INDEX = 'TextIndex'

TITLE_FIELD = 'TitleField'

TRUE = 1

UNAPPROVED_EVENTS_CRITERION_ID = 'UnapprovedEvents'

USELESS_VALUE = 'abracadabra'

USER_REGISTRY = 'acl_users'

WIDGET_MAKER_BASE = 'WidgetMaker'

WIDGET_MAKER_REGISTRY = 'WidgetMakerRegistry'

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

__name__ = 'Products.MightyCal.EventCatalog.EventCatalog'

__version__ = '$Revision: 1.26 $'

permAddEvent = 'Add Events'

permDelObjs = 'Delete objects'

permViewMgmtScreen = 'View management screens'