Package osaf :: Package pim :: Package calendar :: Module Recurrence :: Class RecurrenceRuleSet
[frames | no frames]

Type RecurrenceRuleSet

object --+                
         |                
     CItem --+            
             |            
          Item --+        
                 |        
              Item --+    
                     |    
           ContentItem --+
                         |
                        RecurrenceRuleSet


A collection of recurrence and exclusion rules, dates, and exclusion dates.
Method Summary
  addRule(self, rule, rrulesorexrules)
Add an rrule or exrule, defaults to rrule.
dateutil.rrule.rruleset createDateUtilFromRule(self, dtstart, ignoreIsCount)
Return an appropriate dateutil.rrule.rruleset.
str getCustomDescription(self)
Return a string describing custom rules.
bool isComplex(self)
Determine if the rule is too complex to display a meaningful description about it.
bool isCustomRule(self)
Determine if this is a custom rule.
  moveDatesAfter(self, after, delta)
Move dates (later than "after") in exdates and rdates by delta.
  moveRuleEndBefore(self, dtstart, end)
Make self's rules end before end.
  onValueChanged(self, name)
If the RuleSet changes, update the associated event.
  removeDates(self, cmp, endpoint)
Remove dates in exdates and rdates before or after endpoint.
  setRuleFromDateUtil(self, ruleSetOrRule)
Extract rules and dates from ruleSetOrRule, set them in self.
Inherited from ContentItem: __init__, __str__, __unicode__, addToCollection, ExportItemData, getBasedAttributes, getCurrentMeEmailAddress, getEmailAddress, getMembershipItem, getSharedState, InitOutgoingAttributes, isAttributeModifiable, ItemAboutString, ItemBodyString, ItemWhoFromString, ItemWhoString, removeFromCollection, SetItemBodyString, StampKind
Inherited from Item: getDefaultParent, getKind, iterItems
Inherited from Item: __getitem__, __iter__, _repr_, addValue, check, clone, collectionChanged, copy, delete, dir, find, findMatch, findPath, findUUID, getACL, getAttributeValue, getItemChild, getItemCloud, getItemDisplayName, getItemDisplayString, getValue, getVersion, hasAttributeAspect, hasChild, hasChildren, hashItem, hasKey, hasLocalAttributeValue, hasValue, isAttributeDirty, isItemOf, isRemote, iterAttributeValues, iterChildren, mixinKinds, move, placeChild, printItem, refCount, removeACL, removeAttributeValue, removeValue, rename, setACL, setAttributeValue, setPinned, setValue, unwatchCollection, unwatchKind, walk, watchCollection, watchKind
Inherited from CItem: __new__, __repr__, getAttributeAspect, getDirty, isDeleted, isDeleting, isDirty, isNew, isPinned, isSchema, isStale, setDirty
Inherited from object: __delattr__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __setattr__

Property Summary
Inherited from ContentItem: bodyString, sharedState

Instance Variable Summary
  events: Events -- Sequence(CalendarEventMixin)
  exdates: Exclusion Dates -- Sequence(DateTime)
  exrules: Exclusion rules -- Sequence(RecurrenceRule)
  rdates: Recurrence Dates -- Sequence(DateTime)
  rrules: Recurrence rules -- Sequence(RecurrenceRule)
Inherited from ContentItem: body, contentsOwner, createdOn, creator, importance, lastModified, lastModifiedBy, mine, modifiedOn, previousStamps, private, read, sharedIn, shares, TPBDetailItemOwner, TPBSelectedItemOwner, viewContainer
Inherited from Item: collections, description, displayName, kindExtent, monitors, references, watcherDispatch, watchers, watches
Inherited from Item: aliasedBy, path, typeFor, version
Inherited from CItem: itsKind, itsName, itsParent, itsPath, itsRoot, itsUUID, itsVersion, itsView

Class Variable Summary
dict __kind_clouds__ = {'sharing': <application.schema.Cloud ...
tuple RULENAMES = ('rrules', 'exrules', 'rdates', 'exdates')
Inherited from ContentItem: __kind_info__, READONLY, READWRITE, UNSHARED
Inherited from Item: __default_path__
Inherited from CItem: ADIRTY, CDIRTY, CMERGED, CONTAINER, COPYEXPORT, CORESCHEMA, DELETED, DELETING, DIRTY, FDIRTY, IMPORTING, MERGED, MUTATING, NDIRTY, NEW, NMERGED, NODIRTY, PINNED, RAW, RDIRTY, RMERGED, SAVEMASK, SCHEMA, STALE, VDIRTY, VMERGED, VRDIRTY

Instance Method Details

addRule(self, rule, rrulesorexrules='rrules')

Add an rrule or exrule, defaults to rrule.
Parameters:
rule - Rule to be added
           (type=RecurrenceRule)
rrulesorexrules - Whether the rule is an rrule or exrule
           (type='rrules' or 'exrules')

createDateUtilFromRule(self, dtstart, ignoreIsCount=True)

Return an appropriate dateutil.rrule.rruleset.
Parameters:
dtstart - The start time for the recurrence rule
           (type=datetime)
ignoreIsCount - Whether the isCount flag should be used to convert until endtimes to a count. Converting to count takes extra cycles and is only necessary when the rule is going to be serialized
           (type=bool)
Returns:
dateutil.rrule.rruleset

getCustomDescription(self)

Return a string describing custom rules.
Returns:
str

isComplex(self)

Determine if the rule is too complex to display a meaningful description about it.
Returns:
bool

isCustomRule(self)

Determine if this is a custom rule.

For the moment, simple daily, weekly, or monthly repeating events, optionally with an UNTIL date, or the abscence of a rule, are the only rules which are not custom.
Returns:
bool

moveDatesAfter(self, after, delta)

Move dates (later than "after") in exdates and rdates by delta.
Parameters:
after - Earliest date to move
           (type=datetime)
delta - Time difference
           (type=timedelta)

moveRuleEndBefore(self, dtstart, end)

Make self's rules end before end.
Parameters:
dtstart - Start time for the recurrence rule
           (type=datetime)
end - Date not to include in the rule's new end
           (type=datetime)

onValueChanged(self, name)

If the RuleSet changes, update the associated event.

removeDates(self, cmp, endpoint)

Remove dates in exdates and rdates before or after endpoint.
Parameters:
cmp - Comparison operator
           (type='<', '<=', '>', '>=', or '==')
endpoint - Start or end point for comparisons
           (type=datetime)

setRuleFromDateUtil(self, ruleSetOrRule)

Extract rules and dates from ruleSetOrRule, set them in self.

If a dateutil.rrule.rrule is passed in instead of an rruleset, treat it as the new rruleset.
Parameters:
ruleSetOrRule - The rule to marshall into Chandler
           (type=dateutil.rrule.rrule or dateutil.rrule.rruleset)

Instance Variable Details

events

Events -- Sequence(CalendarEventMixin)
Value:
<Role events of <class 'osaf.pim.calendar.Recurrence.RecurrenceRuleSet\
'>>                                                                    

exdates

Exclusion Dates -- Sequence(DateTime)
Value:
<Role exdates of <class 'osaf.pim.calendar.Recurrence.RecurrenceRuleSe\
t'>>                                                                   

exrules

Exclusion rules -- Sequence(RecurrenceRule)
Value:
<Role exrules of <class 'osaf.pim.calendar.Recurrence.RecurrenceRuleSe\
t'>>                                                                   

rdates

Recurrence Dates -- Sequence(DateTime)
Value:
<Role rdates of <class 'osaf.pim.calendar.Recurrence.RecurrenceRuleSet\
'>>                                                                    

rrules

Recurrence rules -- Sequence(RecurrenceRule)
Value:
<Role rrules of <class 'osaf.pim.calendar.Recurrence.RecurrenceRuleSet\
'>>                                                                    

Class Variable Details

__kind_clouds__

Type:
dict
Value:
{'copying': <application.schema.Cloud instance at 0xb796776c>,
 'sharing': <application.schema.Cloud instance at 0xb796746c>}         

RULENAMES

Type:
tuple
Value:
('rrules', 'exrules', 'rdates', 'exdates')                             

Generated by Epydoc 2.1 on Mon Dec 19 13:33:27 2005 http://epydoc.sf.net