2006-06-15 21:34:10 +02:00
|
|
|
/*
|
|
|
|
Copyright (C) 2004-2005 SKYRIX Software AG
|
|
|
|
|
|
|
|
This file is part of OpenGroupware.org.
|
|
|
|
|
|
|
|
OGo is free software; you can redistribute it and/or modify it under
|
|
|
|
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.
|
|
|
|
|
|
|
|
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
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
|
|
|
|
|
|
|
/*
|
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;
|
2007-04-27 21:45:12 +02:00
|
|
|
NSMutableDictionary *aclCache;
|
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
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
/* lower level fetches */
|
2007-02-21 22:11:40 +01:00
|
|
|
- (BOOL) nameExistsInFolder: (NSString *) objectName;
|
|
|
|
|
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;
|
|
|
|
|
2007-03-28 20:37:10 +02:00
|
|
|
- (NSArray *) fetchContentObjectNames;
|
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
|
|
|
|
2008-05-16 22:33:55 +02:00
|
|
|
- (WOResponse *) subscribe: (BOOL) reallyDo
|
|
|
|
inTheNameOf: (NSString *) delegatedUser
|
|
|
|
fromMailInvitation: (BOOL) isMailInvitation
|
|
|
|
inContext: (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;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
@end
|
|
|
|
|
2007-11-07 16:58:43 +01:00
|
|
|
#endif /* __SOGo_SOGoGCSFolder_H__ */
|