Back to index

plone3  3.1.7
_content.py
Go to the documentation of this file.
00001 ##############################################################################
00002 #
00003 # Copyright (c) 2005 Zope Corporation and Contributors. All Rights Reserved.
00004 #
00005 # This software is subject to the provisions of the Zope Public License,
00006 # Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
00007 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
00008 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00009 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
00010 # FOR A PARTICULAR PURPOSE.
00011 #
00012 ##############################################################################
00013 """ CMFCalendar content interfaces.
00014 
00015 $Id: _content.py 77019 2007-06-24 19:01:14Z hannosch $
00016 """
00017 
00018 from zope.interface import Interface
00019 
00020 
00021 class IEvent(Interface):
00022 
00023     """ IEvent models an event.
00024     """
00025 
00026     def getEndStrings():
00027         """ Returns a mapping with string representations for the end time
00028 
00029         o keys are 'day', 'month' and 'year'
00030         """
00031 
00032     def getStartStrings():
00033         """ Returns a mapping with string representations for the start time
00034 
00035         o keys are 'day', 'month' and 'year'
00036         """
00037 
00038     def start():
00039         """ Return our start time as a DateTime object
00040         """
00041 
00042     def end():
00043         """ Return our end time as a DateTime object
00044         """
00045 
00046     def getStartTimeString():
00047         """ Return our start time as a string.
00048         """
00049 
00050     def getStopTimeString():
00051         """ Return our stop time as a string.
00052         """
00053 
00054     def getMetadataHeaders():
00055         """ Return metadata attributes in RFC-822-style header spec.
00056         """
00057 
00058 class IMutableEvent(IEvent):
00059 
00060     """ Updatable form of IEvent.
00061     """
00062     def edit( title=None
00063             , description=None
00064             , eventType=None
00065             , effectiveDay=None
00066             , effectiveMo=None
00067             , effectiveYear=None
00068             , expirationDay=None
00069             , expirationMo=None
00070             , expirationYear=None
00071             , start_time=None
00072             , startAMPM=None
00073             , stop_time=None
00074             , stopAMPM=None
00075             , location=None
00076             , contact_name=None
00077             , contact_email=None
00078             , contact_phone=None
00079             , event_url=None
00080             ):
00081         """ Update the event.
00082 
00083         o Only arguments that have a value are manipulated.
00084         """  
00085 
00086     def setStartDate(start):
00087         """ Setting the event start date when the event is scheduled to begin.
00088         """
00089 
00090     def setEndDate(end):
00091         """ Setting the event end date, when the event ends.
00092         """
00093 
00094     def setMetadata(headers):
00095         """ Set an Event's metadata
00096 
00097         o headers is a mapping containing keys corresponding to
00098         Dublin Core metadata fields
00099         o Only those attributes that are passed in with the mapping are
00100         manipulated
00101         """
00102