1: <?php
2: /**
3: * The interface describing a Kolab folder.
4: *
5: * PHP version 5
6: *
7: * @category Kolab
8: * @package Kolab_Storage
9: * @author Stuart Binge <omicron@mighty.co.za>
10: * @author Gunnar Wrobel <wrobel@pardus.de>
11: * @author Thomas Jarosch <thomas.jarosch@intra2net.com>
12: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
13: * @link http://pear.horde.org/index.php?package=Kolab_Storage
14: */
15:
16: /**
17: * The interface describing a Kolab folder.
18: *
19: * Copyright 2004-2012 Horde LLC (http://www.horde.org/)
20: *
21: * See the enclosed file COPYING for license information (LGPL). If you
22: * did not receive this file, see http://www.horde.org/licenses/lgpl21.
23: *
24: * @category Kolab
25: * @package Kolab_Storage
26: * @author Stuart Binge <omicron@mighty.co.za>
27: * @author Gunnar Wrobel <wrobel@pardus.de>
28: * @author Thomas Jarosch <thomas.jarosch@intra2net.com>
29: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
30: * @link http://pear.horde.org/index.php?package=Kolab_Storage
31: */
32: interface Horde_Kolab_Storage_Folder
33: {
34: /**
35: * Return the storage path of the folder.
36: *
37: * @return string The storage path of the folder.
38: */
39: public function getPath();
40:
41: /**
42: * Returns a readable title for this folder.
43: *
44: * @return string The folder title.
45: */
46: public function getTitle();
47:
48: /**
49: * Return the namespace type of the folder.
50: *
51: * @return string The namespace type of the folder.
52: */
53: public function getNamespace();
54:
55: /**
56: * Return the namespace prefix of the folder.
57: *
58: * @since Horde_Kolab_Storage 1.1.0
59: *
60: * @return string The namespace prefix of the folder.
61: */
62: public function getPrefix();
63:
64: /**
65: * Returns the owner of the folder.
66: *
67: * @return string The owner of this folder.
68: */
69: public function getOwner();
70:
71: /**
72: * Returns the folder path without namespace components.
73: *
74: * @return string The subpath of this folder.
75: */
76: public function getSubpath();
77:
78: /**
79: * Returns the folder parent.
80: *
81: * @return string The parent of this folder.
82: */
83: public function getParent();
84:
85: /**
86: * Is this a default folder?
87: *
88: * @return boolean Boolean that indicates the default status.
89: */
90: public function isDefault();
91:
92:
93:
94:
95:
96:
97:
98:
99:
100: /**
101: * Saves the folder.
102: *
103: * @param array $attributes An array of folder attributes. You can
104: * set any attribute but there are a few
105: * special ones like 'type', 'default',
106: * 'owner' and 'desc'.
107: *
108: * @return NULL
109: */
110: public function save($attributes = null);
111:
112: /**
113: * Delete the specified message from this folder.
114: *
115: * @param string $id IMAP id of the message to be deleted.
116: * @param boolean $trigger Should the folder be triggered?
117: *
118: * @return NULL
119: */
120: public function deleteMessage($id, $trigger = true);
121:
122: /**
123: * Move the specified message to the specified folder.
124: *
125: * @param string $id IMAP id of the message to be moved.
126: * @param string $folder Name of the receiving folder.
127: *
128: * @return boolean True if successful.
129: */
130: public function moveMessage($id, $folder);
131:
132: /**
133: * Move the specified message to the specified share.
134: *
135: * @param string $id IMAP id of the message to be moved.
136: * @param string $share Name of the receiving share.
137: *
138: * @return NULL
139: */
140: public function moveMessageToShare($id, $share);
141:
142: /**
143: * Save an object in this folder.
144: *
145: * @param array $object The array that holds the data of the object.
146: * @param int $data_version The format handler version.
147: * @param string $object_type The type of the kolab object.
148: * @param string $id The IMAP id of the old object if it
149: * existed before
150: * @param array $old_object The array that holds the current data of the
151: * object.
152: *
153: * @return boolean True on success.
154: */
155: public function saveObject(&$object, $data_version, $object_type, $id = null,
156: &$old_object = null);
157:
158: }
159: