4 * The CalDAV scheduling outbox
6 * The outbox is mainly used as an endpoint in the tree for a client to do
7 * free-busy requests. This functionality is completely handled by the
8 * Scheduling addon, so this object is actually mostly static.
12 * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
13 * @author Evert Pot (http://www.rooftopsolutions.nl/)
14 * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
16 class Sabre_CalDAV_Schedule_Outbox extends Sabre_DAV_Collection implements Sabre_CalDAV_Schedule_IOutbox {
23 protected $principalUri;
28 * @param string $principalUri
30 public function __construct($principalUri) {
32 $this->principalUri = $principalUri;
37 * Returns the name of the node.
39 * This is used to generate the url.
43 public function getName() {
50 * Returns an array with all the child nodes
52 * @return Sabre_DAV_INode[]
54 public function getChildren() {
61 * Returns the owner principal
63 * This must be a url to a principal, or null if there's no owner
67 public function getOwner() {
69 return $this->principalUri;
74 * Returns a group principal
76 * This must be a url to a principal, or null if there's no owner
80 public function getGroup() {
87 * Returns a list of ACE's for this node.
89 * Each ACE has the following properties:
90 * * 'privilege', a string such as {DAV:}read or {DAV:}write. These are
91 * currently the only supported privileges
92 * * 'principal', a url to the principal who owns the node
93 * * 'protected' (optional), indicating that this ACE is not allowed to
98 public function getACL() {
102 'privilege' => '{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}schedule-query-freebusy',
103 'principal' => $this->getOwner(),
107 'privilege' => '{DAV:}read',
108 'principal' => $this->getOwner(),
118 * This method will receive a list of new ACE's.
123 public function setACL(array $acl) {
125 throw new Sabre_DAV_Exception_MethodNotAllowed('You\'re not allowed to update the ACL');
130 * Returns the list of supported privileges for this node.
132 * The returned data structure is a list of nested privileges.
133 * See Sabre_DAVACL_Plugin::getDefaultSupportedPrivilegeSet for a simple
134 * standard structure.
136 * If null is returned from this method, the default privilege set is used,
137 * which is fine for most common usecases.
141 public function getSupportedPrivilegeSet() {
143 $default = Sabre_DAVACL_Plugin::getDefaultSupportedPrivilegeSet();
144 $default['aggregates'][] = array(
145 'privilege' => '{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}schedule-query-freebusy',