Commit 8198cde4 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Added notification API. Added request for better doc.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13321 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 24d28bd1
...@@ -197,6 +197,9 @@ class Person(XMLObject): ...@@ -197,6 +197,9 @@ class Person(XMLObject):
def getAvailableTime(self, *args, **kw): def getAvailableTime(self, *args, **kw):
""" """
Calculate available time for a person Calculate available time for a person
XXX What are the parameters - documentation needed
What is the result ?
""" """
assignment_list = self.contentValues(portal_type='Assignment') assignment_list = self.contentValues(portal_type='Assignment')
calendar_uid_list = [] calendar_uid_list = []
...@@ -212,6 +215,9 @@ class Person(XMLObject): ...@@ -212,6 +215,9 @@ class Person(XMLObject):
def getAvailableTimeSequence(self, *args, **kw): def getAvailableTimeSequence(self, *args, **kw):
""" """
Calculate available time for a person in a sequence Calculate available time for a person in a sequence
XXX What are the parameters - documentation needed
What is the result ?
""" """
assignment_list = self.contentValues(portal_type='Assignment') assignment_list = self.contentValues(portal_type='Assignment')
calendar_uid_list = [] calendar_uid_list = []
...@@ -222,3 +228,20 @@ class Person(XMLObject): ...@@ -222,3 +228,20 @@ class Person(XMLObject):
# Call getSequence # Call getSequence
portal_simulation = getToolByName(self, 'portal_simulation') portal_simulation = getToolByName(self, 'portal_simulation')
return portal_simulation.getAvailableTimeSequence(*args, **kw) return portal_simulation.getAvailableTimeSequence(*args, **kw)
# Notifiation API
security.declareProtected(Permissions.AccessContentsInformation,
'notifyMessage')
def notifyMessage(self, message):
"""
This method can only be called with proxy roles.
A per user preference allows for deciding how to be notified.
- by email
- by SMS (if meaningful)
- daily
- weekly
- instantly
notification is handled as an activity
"""
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment