2006-06-15 21:34:10 +02:00
|
|
|
/*
|
|
|
|
Copyright (C) 2004 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __SOGo_SOGoContentObject_H__
|
|
|
|
#define __SOGo_SOGoContentObject_H__
|
|
|
|
|
2006-09-27 00:28:28 +02:00
|
|
|
#import <SOGo/SOGoObject.h>
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-04-17 16:32:47 +02:00
|
|
|
@class NSArray;
|
2008-06-13 21:59:22 +02:00
|
|
|
@class NSCalendarDate;
|
2007-04-17 16:32:47 +02:00
|
|
|
@class NSException;
|
|
|
|
@class NSString;
|
2008-06-13 21:59:22 +02:00
|
|
|
@class SOGoGCSFolder;
|
2010-01-22 17:33:35 +01:00
|
|
|
@class WOContext;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
@interface SOGoContentObject : SOGoObject
|
|
|
|
{
|
2007-06-01 22:59:47 +02:00
|
|
|
BOOL isNew;
|
2008-06-13 21:59:22 +02:00
|
|
|
NSString *content;
|
|
|
|
unsigned int version;
|
|
|
|
NSCalendarDate *creationDate;
|
|
|
|
NSCalendarDate *lastModified;
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
|
|
|
|
2008-07-05 00:25:27 +02:00
|
|
|
+ (id) objectWithRecord: (NSDictionary *) objectRecord
|
|
|
|
inContainer: (SOGoGCSFolder *) newContainer;
|
|
|
|
+ (id) objectWithName: (NSString *) newName
|
|
|
|
andContent: (NSString *) newContent
|
|
|
|
inContainer: (SOGoGCSFolder *) newContainer;
|
2008-06-13 21:59:22 +02:00
|
|
|
- (id) initWithRecord: (NSDictionary *) objectRecord
|
2008-07-09 17:42:22 +02:00
|
|
|
inContainer: (SOGoGCSFolder *) newContainer;
|
|
|
|
- (id) initWithName: (NSString *) newName
|
2008-07-05 00:25:27 +02:00
|
|
|
andContent: (NSString *) newContent
|
|
|
|
inContainer: (SOGoGCSFolder *) newContainer;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/* content */
|
|
|
|
|
2007-06-01 22:59:47 +02:00
|
|
|
- (BOOL) isNew;
|
2008-07-14 18:47:10 +02:00
|
|
|
- (void) setIsNew: (BOOL) newIsNew;
|
|
|
|
|
2011-05-30 23:23:03 +02:00
|
|
|
- (unsigned int) version;
|
|
|
|
|
|
|
|
- (NSCalendarDate *) creationDate;
|
|
|
|
- (NSCalendarDate *) lastModified;
|
|
|
|
|
2007-04-17 16:32:47 +02:00
|
|
|
- (NSString *) contentAsString;
|
|
|
|
- (NSException *) saveContentString: (NSString *) _str
|
|
|
|
baseVersion: (unsigned int) _baseVersion;
|
|
|
|
- (NSException *) saveContentString: (NSString *)_str;
|
2008-08-10 23:44:25 +02:00
|
|
|
|
2010-01-22 17:33:35 +01:00
|
|
|
- (id) PUTAction: (WOContext *) _ctx;
|
|
|
|
|
2008-08-10 23:44:25 +02:00
|
|
|
/* actions */
|
|
|
|
- (NSException *) copyToFolder: (SOGoGCSFolder *) newFolder;
|
|
|
|
- (NSException *) moveToFolder: (SOGoGCSFolder *) newFolder;
|
2007-04-17 16:32:47 +02:00
|
|
|
- (NSException *) delete;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2008-08-10 23:44:25 +02:00
|
|
|
/* DAV support */
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-04-17 16:32:47 +02:00
|
|
|
- (id) davEntityTag;
|
2008-06-13 21:59:22 +02:00
|
|
|
- (NSString *) davCreationDate;
|
|
|
|
- (NSString *) davLastModified;
|
|
|
|
- (NSString *) davContentLength;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2007-11-18 11:16:25 +01:00
|
|
|
@interface SOGoContentObject (OptionalMethods)
|
|
|
|
|
2010-01-22 17:33:35 +01:00
|
|
|
- (NSException *) prepareDelete;
|
2007-11-18 11:16:25 +01:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
#endif /* __SOGo_SOGoContentObject_H__ */
|