ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
CalDAV scheduling plugin. More...
Public Member Functions | |
getFeatures () | |
Returns a list of features for the DAV: HTTP header. More... | |
getPluginName () | |
Returns the name of the plugin. More... | |
initialize (Server $server) | |
Initializes the plugin. More... | |
getHTTPMethods ($uri) | |
Use this method to tell the server this plugin defines additional HTTP methods. More... | |
httpPost (RequestInterface $request, ResponseInterface $response) | |
This method handles POST request for the outbox. More... | |
propFind (PropFind $propFind, INode $node) | |
This method handler is invoked during fetching of properties. More... | |
propPatch ($path, PropPatch $propPatch) | |
This method is called during property updates. More... | |
calendarObjectChange (RequestInterface $request, ResponseInterface $response, VCalendar $vCal, $calendarPath, &$modified, $isNew) | |
This method is triggered whenever there was a calendar object gets created or updated. More... | |
deliver (ITip\Message $iTipMessage) | |
This method is responsible for delivering the ITip message. More... | |
beforeUnbind ($path) | |
This method is triggered before a file gets deleted. More... | |
scheduleLocalDelivery (ITip\Message $iTipMessage) | |
Event handler for the 'schedule' event. More... | |
getSupportedPrivilegeSet (INode $node, array &$supportedPrivilegeSet) | |
This method is triggered whenever a subsystem requests the privileges that are supported on a particular node. More... | |
outboxRequest (IOutbox $outboxNode, RequestInterface $request, ResponseInterface $response) | |
This method handles POST requests to the schedule-outbox. More... | |
getPluginInfo () | |
Returns a bunch of meta-data about the plugin. More... | |
Public Member Functions inherited from Sabre\DAV\ServerPlugin | |
initialize (Server $server) | |
This initializes the plugin. More... | |
getFeatures () | |
This method should return a list of server-features. More... | |
getHTTPMethods ($path) | |
Use this method to tell the server this plugin defines additional HTTP methods. More... | |
getPluginName () | |
Returns a plugin name. More... | |
getSupportedReportSet ($uri) | |
Returns a list of reports this plugin supports. More... | |
getPluginInfo () | |
Returns a bunch of meta-data about the plugin. More... | |
Data Fields | |
const | NS_CALDAV = 'urn:ietf:params:xml:ns:caldav' |
This is the official CalDAV namespace. More... | |
Protected Member Functions | |
processICalendarChange ($oldObject=null, VCalendar $newObject, array $addresses, array $ignore=[], &$modified=false) | |
This method looks at an old iCalendar object, a new iCalendar object and starts sending scheduling messages based on the changes. More... | |
getAddressesForPrincipal ($principal) | |
Returns a list of addresses that are associated with a principal. More... | |
handleFreeBusyRequest (IOutbox $outbox, VObject\Component $vObject, RequestInterface $request, ResponseInterface $response) | |
This method is responsible for parsing a free-busy query request and returning it's result. More... | |
getFreeBusyForEmail ($email, \DateTimeInterface $start, \DateTimeInterface $end, VObject\Component $request) | |
Returns free-busy information for a specific address. More... | |
Protected Attributes | |
$server | |
Private Member Functions | |
scheduleReply (RequestInterface $request) | |
This method checks the 'Schedule-Reply' header and returns false if it's 'F', otherwise true. More... | |
CalDAV scheduling plugin.
=========================
This plugin provides the functionality added by the "Scheduling Extensions to CalDAV" standard, as defined in RFC6638.
calendar-auto-schedule largely works by intercepting a users request to update their local calendar. If a user creates a new event with attendees, this plugin is supposed to grab the information from that event, and notify the attendees of this.
There's 3 possible transports for this:
iMip is simply, because we just need to add the iTip message as an email attachment. Local delivery is harder, because we both need to add this same message to a local DAV inbox, as well as live-update the relevant events.
iSchedule is something for later.
Definition at line 56 of file Plugin.php.
Sabre\CalDAV\Schedule\Plugin::beforeUnbind | ( | $path | ) |
This method is triggered before a file gets deleted.
We use this event to make sure that when this happens, attendees get cancellations, and organizers get 'DECLINED' statuses.
string | $path |
Definition at line 406 of file Plugin.php.
References $message, $messages, $path, Sabre\CalDAV\Schedule\Plugin\deliver(), Sabre\CalDAV\Schedule\Plugin\getAddressesForPrincipal(), and Sabre\CalDAV\Schedule\Plugin\scheduleReply().
Sabre\CalDAV\Schedule\Plugin::calendarObjectChange | ( | RequestInterface | $request, |
ResponseInterface | $response, | ||
VCalendar | $vCal, | ||
$calendarPath, | |||
& | $modified, | ||
$isNew | |||
) |
This method is triggered whenever there was a calendar object gets created or updated.
RequestInterface | $request | HTTP request |
ResponseInterface | $response | HTTP Response |
VCalendar | $vCal | Parsed iCalendar object |
mixed | $calendarPath | Path to calendar collection |
mixed | $modified | The iCalendar object has been touched. |
mixed | $isNew | Whether this was a new item or we're updating one |
Definition at line 348 of file Plugin.php.
References Sabre\CalDAV\Schedule\Plugin\getAddressesForPrincipal(), Sabre\HTTP\RequestInterface\getPath(), Sabre\CalDAV\Schedule\Plugin\processICalendarChange(), Sabre\VObject\Reader\read(), and Sabre\CalDAV\Schedule\Plugin\scheduleReply().
Sabre\CalDAV\Schedule\Plugin::deliver | ( | ITip\Message | $iTipMessage | ) |
This method is responsible for delivering the ITip message.
ITip\Message | $iTipMessage |
Definition at line 382 of file Plugin.php.
Referenced by Sabre\CalDAV\Schedule\Plugin\beforeUnbind(), and Sabre\CalDAV\Schedule\Plugin\processICalendarChange().
|
protected |
Returns a list of addresses that are associated with a principal.
string | $principal |
Definition at line 699 of file Plugin.php.
Referenced by Sabre\CalDAV\Schedule\Plugin\beforeUnbind(), and Sabre\CalDAV\Schedule\Plugin\calendarObjectChange().
Sabre\CalDAV\Schedule\Plugin::getFeatures | ( | ) |
Returns a list of features for the DAV: HTTP header.
Definition at line 75 of file Plugin.php.
|
protected |
Returns free-busy information for a specific address.
The returned data is an array containing the following properties:
calendar-data : A VFREEBUSY VObject request-status : an iTip status code. href: The principal's email address, as requested
The following request status codes may be returned:
string | address | |
\DateTimeInterface | $start | |
\DateTimeInterface | $end | |
VObject\Component | $request |
Definition at line 897 of file Plugin.php.
References $aclPlugin, $email, $result, $url, $urls, Sabre\VObject\Reader\read(), and Sabre\CalDAV\Xml\Property\ScheduleCalendarTransp\TRANSPARENT.
Referenced by Sabre\CalDAV\Schedule\Plugin\handleFreeBusyRequest().
Sabre\CalDAV\Schedule\Plugin::getHTTPMethods | ( | $uri | ) |
Use this method to tell the server this plugin defines additional HTTP methods.
This method is passed a uri. It should only return HTTP methods that are available for the specified uri.
string | $uri |
Definition at line 144 of file Plugin.php.
Sabre\CalDAV\Schedule\Plugin::getPluginInfo | ( | ) |
Returns a bunch of meta-data about the plugin.
Providing this information is optional, and is mainly displayed by the Browser plugin.
The description key in the returned array may contain html and will not be sanitized.
Definition at line 1057 of file Plugin.php.
References Sabre\CalDAV\Plugin\getPluginName().
Sabre\CalDAV\Schedule\Plugin::getPluginName | ( | ) |
Returns the name of the plugin.
Using this name other plugins will be able to access other plugins using Server::getPlugin
Definition at line 89 of file Plugin.php.
Sabre\CalDAV\Schedule\Plugin::getSupportedPrivilegeSet | ( | INode | $node, |
array & | $supportedPrivilegeSet | ||
) |
This method is triggered whenever a subsystem requests the privileges that are supported on a particular node.
We need to add a number of privileges for scheduling purposes.
INode | $node | |
array | $supportedPrivilegeSet |
Definition at line 584 of file Plugin.php.
|
protected |
This method is responsible for parsing a free-busy query request and returning it's result.
IOutbox | $outbox | |
VObject\Component | $vObject | |
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 798 of file Plugin.php.
References $namespace, $result, $results, Sabre\CalDAV\Schedule\Plugin\getFreeBusyForEmail(), Sabre\DAVACL\IACL\getOwner(), Sabre\HTTP\MessageInterface\setBody(), Sabre\HTTP\MessageInterface\setHeader(), and Sabre\HTTP\ResponseInterface\setStatus().
Referenced by Sabre\CalDAV\Schedule\Plugin\outboxRequest().
Sabre\CalDAV\Schedule\Plugin::httpPost | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
This method handles POST request for the outbox.
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 167 of file Plugin.php.
References $contentType, $path, Sabre\HTTP\MessageInterface\getHeader(), Sabre\HTTP\RequestInterface\getPath(), and Sabre\CalDAV\Schedule\Plugin\outboxRequest().
Sabre\CalDAV\Schedule\Plugin::initialize | ( | Server | $server | ) |
Initializes the plugin.
Server | $server |
This information ensures that the {DAV:}resourcetype property has the correct values.
Properties we protect are made read-only by the server.
Definition at line 101 of file Plugin.php.
References Sabre\CalDAV\Plugin\$server, and Sabre\Event\EventEmitterInterface\on().
Sabre\CalDAV\Schedule\Plugin::outboxRequest | ( | IOutbox | $outboxNode, |
RequestInterface | $request, | ||
ResponseInterface | $response | ||
) |
This method handles POST requests to the schedule-outbox.
Currently, two types of requests are supported:
The latter is from an expired early draft of the CalDAV scheduling extensions, but iCal depends on a feature from that spec, so we implement it.
IOutbox | $outboxNode | |
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 734 of file Plugin.php.
References Sabre\HTTP\MessageInterface\getBody(), Sabre\HTTP\RequestInterface\getPath(), Sabre\CalDAV\Schedule\Plugin\handleFreeBusyRequest(), and Sabre\VObject\Reader\read().
Referenced by Sabre\CalDAV\Schedule\Plugin\httpPost().
|
protected |
This method looks at an old iCalendar object, a new iCalendar object and starts sending scheduling messages based on the changes.
A list of addresses needs to be specified, so the system knows who made the update, because the behavior may be different based on if it's an attendee or an organizer.
This method may update $newObject to add any status changes.
VCalendar | string | $oldObject | |
VCalendar | $newObject | |
array | $addresses | |
array | $ignore | Any addresses to not send messages to. |
bool | $modified | A marker to indicate that the original object modified by this process. |
Definition at line 652 of file Plugin.php.
References $ignore, $message, $messages, and Sabre\CalDAV\Schedule\Plugin\deliver().
Referenced by Sabre\CalDAV\Schedule\Plugin\calendarObjectChange(), and Sabre\CalDAV\Schedule\Plugin\scheduleLocalDelivery().
This method handler is invoked during fetching of properties.
We use this event to add calendar-auto-schedule-specific properties.
PropFind | $propFind | |
INode | $node |
Definition at line 204 of file Plugin.php.
References $caldavPlugin, $result, Sabre\DAV\PropFind\getPath(), Sabre\DAV\PropFind\handle(), and Sabre\DAV\PropFind\set().
Sabre\CalDAV\Schedule\Plugin::propPatch | ( | $path, | |
PropPatch | $propPatch | ||
) |
This method is called during property updates.
string | $path | |
PropPatch | $propPatch |
Definition at line 320 of file Plugin.php.
References $path, and Sabre\DAV\PropPatch\handle().
Sabre\CalDAV\Schedule\Plugin::scheduleLocalDelivery | ( | ITip\Message | $iTipMessage | ) |
Event handler for the 'schedule' event.
This handler attempts to look at local accounts to deliver the scheduling object.
ITip\Message | $iTipMessage |
Definition at line 444 of file Plugin.php.
References $aclPlugin, $calendar, $result, Sabre\DAV\UUIDUtil\getUUID(), Sabre\CalDAV\Schedule\Plugin\processICalendarChange(), and Sabre\VObject\Reader\read().
|
private |
This method checks the 'Schedule-Reply' header and returns false if it's 'F', otherwise true.
RequestInterface | $request |
Definition at line 1039 of file Plugin.php.
References Sabre\HTTP\MessageInterface\getHeader().
Referenced by Sabre\CalDAV\Schedule\Plugin\beforeUnbind(), and Sabre\CalDAV\Schedule\Plugin\calendarObjectChange().
|
protected |
Definition at line 68 of file Plugin.php.
const Sabre\CalDAV\Schedule\Plugin::NS_CALDAV = 'urn:ietf:params:xml:ns:caldav' |
This is the official CalDAV namespace.
Definition at line 61 of file Plugin.php.