]> err.no Git - scalable-opengroupware.org/blob - SoObjects/SOGo/SOGoFolder.h
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1173 d1b88da0-ebda-0310...
[scalable-opengroupware.org] / SoObjects / SOGo / SOGoFolder.h
1 /*
2   Copyright (C) 2004-2005 SKYRIX Software AG
3
4   This file is part of OpenGroupware.org.
5
6   OGo is free software; you can redistribute it and/or modify it under
7   the terms of the GNU Lesser General Public License as published by the
8   Free Software Foundation; either version 2, or (at your option) any
9   later version.
10
11   OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12   WARRANTY; without even the implied warranty of MERCHANTABILITY or
13   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
14   License for more details.
15
16   You should have received a copy of the GNU Lesser General Public
17   License along with OGo; see the file COPYING.  If not, write to the
18   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19   02111-1307, USA.
20 */
21
22 #ifndef __SOGo_SOGoFolder_H__
23 #define __SOGo_SOGoFolder_H__
24
25 #import "SOGoObject.h"
26
27 @class NSArray;
28 @class NSDictionary;
29 @class NSMutableDictionary;
30 @class NSString;
31
32 @class GCSFolder;
33
34 /*
35   SOGoFolder
36   
37   A common superclass for folders stored in GCS. Already deals with all GCS
38   folder specific things.
39   
40   Important: folders should NOT retain the context! Otherwise you might get
41              cyclic references.
42 */
43
44 @interface SOGoFolder : SOGoObject
45 {
46   NSMutableString *displayName;
47   NSString *ocsPath;
48   GCSFolder *ocsFolder;
49   NSMutableDictionary *aclCache;
50 }
51
52 + (id) folderWithSubscriptionReference: (NSString *) reference
53                            inContainer: (id) aContainer;
54
55 /* accessors */
56
57 - (void) setDisplayName: (NSString *) newDisplayName;
58 - (NSString *) displayName;
59
60 - (void) setOCSPath: (NSString *)_Path;
61 - (NSString *) ocsPath;
62
63 - (GCSFolder *) ocsFolderForPath: (NSString *)_path;
64 - (GCSFolder *) ocsFolder;
65
66 /* lower level fetches */
67 - (BOOL) nameExistsInFolder: (NSString *) objectName;
68
69 - (NSArray *) fetchContentObjectNames;
70 - (NSDictionary *) fetchContentStringsAndNamesOfAllObjects;
71
72 /* folder type */
73
74 - (NSString *) outlookFolderClass;
75
76 - (BOOL) folderIsMandatory;
77 - (NSString *) folderType;
78
79 - (BOOL) create;
80 - (NSException *) delete;
81 - (void) renameTo: (NSString *) newName;
82 /* dav */
83 - (NSArray *) davNamespaces;
84
85 /* acls as a container */
86 - (NSArray *) aclUsersForObjectAtPath: (NSArray *) objectPathArray;
87 - (NSArray *) aclsForUser: (NSString *) uid
88           forObjectAtPath: (NSArray *) objectPathArray;
89 - (void) setRoles: (NSArray *) roles
90           forUser: (NSString *) uid
91   forObjectAtPath: (NSArray *) objectPathArray;
92 - (void) removeAclsForUsers: (NSArray *) users
93             forObjectAtPath: (NSArray *) objectPathArray;
94
95 @end
96
97 @interface SOGoFolder (GroupDAVExtensions)
98
99 - (NSString *) groupDavResourceType;
100
101 @end
102
103 #endif /* __SOGo_SOGoFolder_H__ */