2 Copyright (C) 2002-2005 SKYRIX Software AG
4 This file is part of SOPE.
6 SOPE 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 SOPE 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 SOPE; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #ifndef __OFS_OFSBaseObject_H__
23 #define __OFS_OFSBaseObject_H__
25 #import <Foundation/NSObject.h>
26 #include <NGExtensions/NGFileManager.h>
31 This is the base class for OFS objects. Every OFS object has at least
33 - a container (not retained !)
35 - a storage path (relative to the filemanager)
37 Note that filemanager and storage path should in no case be made available
38 to the web for security reasons !
40 The name is tracked in the child since it is required of URL construction
41 (to know the URI name the child was found with).
44 @class NSString, NSException, NSClassDescription;
48 @class OFSFactoryContext;
50 @interface OFSBaseObject : NSObject
52 id<NSObject,NGFileManager> fileManager;
53 NSString *storagePath;
61 - (id<NSObject,NGFileManager>)fileManager;
62 - (NSString *)storagePath;
63 - (EOGlobalID *)globalID;
72 - (NSString *)nameInContainer;
73 - (void)setContainer:(id)_container andName:(NSString *)_name;
74 - (NSException *)takeStorageInfoFromContext:(OFSFactoryContext *)_ctx;
78 - (void)detachFromContainer;
79 - (BOOL)isAttachedToContainer;
81 - (id)DELETEAction:(id)_ctx;
85 - (id)awakeFromFetchInContext:(OFSFactoryContext *)_ctx;
86 - (id)awakeFromInsertionInContext:(OFSFactoryContext *)_ctx;
90 - (NSString *)davDisplayName; // returns NSFileSubject or -name
94 - (NSException *)validateForDelete;
95 - (NSException *)validateForInsert;
96 - (NSException *)validateForUpdate;
97 - (NSException *)validateForSave;
101 - (NSString *)ownerInContext:(id)_ctx;
102 - (id)authenticatorInContext:(id)_ctx;
104 /* version control */
106 - (BOOL)isCvsControlled;
107 - (BOOL)isSvnControlled;
111 #endif /* __OFS_OFSBaseObject_H__ */