2 Copyright (C) 2002-2004 SKYRIX Software AG
4 This file is part of OpenGroupware.org.
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
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.
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
23 #ifndef __OFS_OFSBaseObject_H__
24 #define __OFS_OFSBaseObject_H__
26 #import <Foundation/NSObject.h>
27 #include <NGExtensions/NGFileManager.h>
32 This is the base class for OFS objects. Every OFS object has at least
34 - a container (not retained !)
36 - a storage path (relative to the filemanager)
38 Note that filemanager and storage path should in no case be made available
39 to the web for security reasons !
41 The name is tracked in the child since it is required of URL construction
42 (to know the URI name the child was found with).
45 @class NSString, NSException, NSClassDescription;
49 @class OFSFactoryContext;
51 @interface OFSBaseObject : NSObject
53 id<NSObject,NGFileManager> fileManager;
54 NSString *storagePath;
62 - (id<NSObject,NGFileManager>)fileManager;
63 - (NSString *)storagePath;
64 - (EOGlobalID *)globalID;
73 - (NSString *)nameInContainer;
74 - (void)setContainer:(id)_container andName:(NSString *)_name;
75 - (NSException *)takeStorageInfoFromContext:(OFSFactoryContext *)_ctx;
79 - (void)detachFromContainer;
80 - (BOOL)isAttachedToContainer;
82 - (id)DELETEAction:(id)_ctx;
86 - (id)awakeFromFetchInContext:(OFSFactoryContext *)_ctx;
87 - (id)awakeFromInsertionInContext:(OFSFactoryContext *)_ctx;
91 - (NSString *)davDisplayName; // returns NSFileSubject or -name
95 - (NSException *)validateForDelete;
96 - (NSException *)validateForInsert;
97 - (NSException *)validateForUpdate;
98 - (NSException *)validateForSave;
102 - (NSString *)ownerInContext:(id)_ctx;
103 - (id)authenticatorInContext:(id)_ctx;
105 /* version control */
107 - (BOOL)isCvsControlled;
108 - (BOOL)isSvnControlled;
112 #endif /* __OFS_OFSBaseObject_H__ */