2006-06-15 21:34:10 +02:00
|
|
|
/*
|
|
|
|
Copyright (C) 2004-2005 SKYRIX Software AG
|
2011-04-04 15:01:20 +02:00
|
|
|
Copyright (C) 2006-2010 Inverse inc.
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2010-10-15 20:30:08 +02:00
|
|
|
This file is part of SOGo.
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2010-10-15 20:30:08 +02:00
|
|
|
SOGo is free software; you can redistribute it and/or modify it under
|
2006-06-15 21:34:10 +02:00
|
|
|
the terms of the GNU Lesser General Public License as published by the
|
|
|
|
Free Software Foundation; either version 2, or (at your option) any
|
|
|
|
later version.
|
|
|
|
|
2010-10-15 20:30:08 +02:00
|
|
|
SOGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
2006-06-15 21:34:10 +02:00
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
|
|
|
License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with OGo; see the file COPYING. If not, write to the
|
|
|
|
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2007-11-07 16:58:43 +01:00
|
|
|
#ifndef __SOGo_SOGoGCSFolder_H__
|
|
|
|
#define __SOGo_SOGoGCSFolder_H__
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-11-07 16:58:43 +01:00
|
|
|
#import "SOGoFolder.h"
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-05-09 21:23:45 +02:00
|
|
|
@class NSArray;
|
|
|
|
@class NSDictionary;
|
|
|
|
@class NSMutableDictionary;
|
|
|
|
@class NSString;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
@class GCSFolder;
|
2008-05-16 22:33:55 +02:00
|
|
|
@class WOContext;
|
|
|
|
@class WOResponse;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2011-04-05 15:50:09 +02:00
|
|
|
@class SOGoUser;
|
|
|
|
|
2012-10-22 16:09:13 +02:00
|
|
|
@protocol DOMElement;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
/*
|
2007-11-07 16:58:43 +01:00
|
|
|
SOGoGCSFolder
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
A common superclass for folders stored in GCS. Already deals with all GCS
|
|
|
|
folder specific things.
|
|
|
|
|
|
|
|
Important: folders should NOT retain the context! Otherwise you might get
|
|
|
|
cyclic references.
|
|
|
|
*/
|
|
|
|
|
2007-11-07 16:58:43 +01:00
|
|
|
@interface SOGoGCSFolder : SOGoFolder
|
2006-06-15 21:34:10 +02:00
|
|
|
{
|
2007-09-11 22:25:57 +02:00
|
|
|
NSString *ocsPath;
|
2006-06-15 21:34:10 +02:00
|
|
|
GCSFolder *ocsFolder;
|
2008-06-13 22:16:30 +02:00
|
|
|
NSMutableDictionary *childRecords;
|
2009-06-04 02:40:21 +02:00
|
|
|
BOOL userCanAccessAllObjects; /* i.e. user obtains 'Access Object' on
|
|
|
|
subobjects */
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
|
|
|
|
2007-09-15 00:01:02 +02:00
|
|
|
+ (id) folderWithSubscriptionReference: (NSString *) reference
|
|
|
|
inContainer: (id) aContainer;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/* accessors */
|
|
|
|
|
2007-03-28 20:37:10 +02:00
|
|
|
- (void) setOCSPath: (NSString *)_Path;
|
|
|
|
- (NSString *) ocsPath;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-03-28 20:37:10 +02:00
|
|
|
- (GCSFolder *) ocsFolderForPath: (NSString *)_path;
|
|
|
|
- (GCSFolder *) ocsFolder;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2008-04-22 01:03:48 +02:00
|
|
|
- (NSString *) folderReference;
|
2008-05-16 22:33:55 +02:00
|
|
|
- (NSArray *) pathArrayToFolder;
|
2008-04-22 01:03:48 +02:00
|
|
|
|
2010-03-10 22:53:26 +01:00
|
|
|
- (void) setFolderPropertyValue: (id) theValue
|
|
|
|
inCategory: (NSString *) theKey;
|
|
|
|
- (id) folderPropertyValueInCategory: (NSString *) theKey;
|
2011-04-05 15:50:09 +02:00
|
|
|
- (id) folderPropertyValueInCategory: (NSString *) theKey
|
|
|
|
forUser: (SOGoUser *) theUser;
|
2010-03-10 22:53:26 +01:00
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
/* lower level fetches */
|
2007-09-15 01:16:48 +02:00
|
|
|
- (void) deleteEntriesWithIds: (NSArray *) ids;
|
|
|
|
|
2008-06-13 22:16:30 +02:00
|
|
|
- (Class) objectClassForComponentName: (NSString *) componentName;
|
|
|
|
- (Class) objectClassForContent: (NSString *) content;
|
|
|
|
|
2011-03-07 19:58:14 +01:00
|
|
|
- (void) removeChildRecordWithName: (NSString *) childName;
|
|
|
|
|
2009-10-06 20:26:09 +02:00
|
|
|
- (id) createChildComponentWithRecord: (NSDictionary *) record;
|
|
|
|
- (id) createChildComponentWithName: (NSString *) newName
|
|
|
|
andContent: (NSString *) newContent;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
/* folder type */
|
|
|
|
|
2007-06-29 23:58:31 +02:00
|
|
|
- (BOOL) folderIsMandatory;
|
|
|
|
|
2007-02-09 22:22:01 +01:00
|
|
|
- (BOOL) create;
|
2007-03-21 15:27:04 +01:00
|
|
|
- (NSException *) delete;
|
2007-09-15 00:01:02 +02:00
|
|
|
- (void) renameTo: (NSString *) newName;
|
2007-07-22 22:40:34 +02:00
|
|
|
|
2010-10-08 21:53:04 +02:00
|
|
|
- (void) removeFolderSettings: (NSMutableDictionary *) moduleSettings
|
|
|
|
withReference: (NSString *) reference;
|
|
|
|
|
2012-04-18 19:39:11 +02:00
|
|
|
- (BOOL) subscribeUserOrGroup: (NSString *) theIdentifier
|
|
|
|
reallyDo: (BOOL) reallyDo;
|
2009-08-27 23:14:54 +02:00
|
|
|
- (BOOL) userIsSubscriber: (NSString *) subscribingUser;
|
2008-05-16 22:33:55 +02:00
|
|
|
|
2009-06-04 02:40:21 +02:00
|
|
|
- (void) initializeQuickTablesAclsInContext: (WOContext *) localContext;
|
|
|
|
|
2007-04-17 16:30:12 +02:00
|
|
|
/* acls as a container */
|
2007-05-19 02:49:05 +02:00
|
|
|
- (NSArray *) aclUsersForObjectAtPath: (NSArray *) objectPathArray;
|
2007-04-17 16:30:12 +02:00
|
|
|
- (NSArray *) aclsForUser: (NSString *) uid
|
|
|
|
forObjectAtPath: (NSArray *) objectPathArray;
|
2007-04-25 00:50:09 +02:00
|
|
|
- (void) setRoles: (NSArray *) roles
|
2007-04-17 16:30:12 +02:00
|
|
|
forUser: (NSString *) uid
|
|
|
|
forObjectAtPath: (NSArray *) objectPathArray;
|
|
|
|
- (void) removeAclsForUsers: (NSArray *) users
|
|
|
|
forObjectAtPath: (NSArray *) objectPathArray;
|
|
|
|
|
2009-06-18 22:58:46 +02:00
|
|
|
/* DAV */
|
2010-06-29 22:21:48 +02:00
|
|
|
- (NSURL *) publicDavURL;
|
2010-06-05 06:44:02 +02:00
|
|
|
- (NSURL *) realDavURL;
|
|
|
|
|
2009-06-18 22:58:46 +02:00
|
|
|
- (NSDictionary *) davSQLFieldsTable;
|
2012-10-22 16:09:13 +02:00
|
|
|
- (NSDictionary *) parseDAVRequestedProperties: (id <DOMElement>) propElement;
|
2009-06-18 22:58:46 +02:00
|
|
|
|
2010-06-04 22:49:30 +02:00
|
|
|
- (NSString *) davCollectionTag;
|
|
|
|
|
2010-08-12 16:02:21 +02:00
|
|
|
/* multiget helper */
|
|
|
|
- (WOResponse *) performMultigetInContext: (WOContext *) queryContext
|
|
|
|
inNamespace: (NSString *) namespace;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
@end
|
|
|
|
|
2007-11-07 16:58:43 +01:00
|
|
|
#endif /* __SOGo_SOGoGCSFolder_H__ */
|