diff --git a/ChangeLog b/ChangeLog index f41a82719..804a66cb8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-02-12 Wolfgang Sourdeau + + * SoObjects/SOGo/SOGoFolder.m ([SOGoFolder + -fetchContentObjectNames]): new model method for all subclasses. + This will be removed in the future since toOneRelationshipKeys + must be sufficient. + + * SoObjects/SOGo/SOGoGCSFolder.m ([SOGoGCSFolder + -defaultFilenameExtension]): removed useless method. + ([-toOneRelationshipKeys]): moved method into SOGoFolder.m. + 2008-02-08 Wolfgang Sourdeau * UI/MailPartViewers/UIxMailPartICalViewer.m diff --git a/SoObjects/SOGo/SOGoFolder.h b/SoObjects/SOGo/SOGoFolder.h index 2e02a9f3f..fcc61bf48 100644 --- a/SoObjects/SOGo/SOGoFolder.h +++ b/SoObjects/SOGo/SOGoFolder.h @@ -34,6 +34,7 @@ - (NSString *) displayName; - (NSString *) folderType; +- (NSArray *) fetchContentObjectNames; /* sorting */ - (NSComparisonResult) compare: (id) otherFolder; diff --git a/SoObjects/SOGo/SOGoFolder.m b/SoObjects/SOGo/SOGoFolder.m index 1460deb10..61986119d 100644 --- a/SoObjects/SOGo/SOGoFolder.m +++ b/SoObjects/SOGo/SOGoFolder.m @@ -101,6 +101,17 @@ return obj; } +#warning we should remove this method +- (NSArray *) toOneRelationshipKeys +{ + return [self fetchContentObjectNames]; +} + +- (NSArray *) fetchContentObjectNames +{ + return [NSArray array]; +} + - (BOOL) isFolderish { return YES; diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index f8b4136a6..b7c81f96a 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -342,6 +342,7 @@ static BOOL sendFolderAdvisories = NO; } if ([records isKindOfClass: [NSException class]]) return records; + return [records objectsForKey: @"c_name"]; } @@ -383,6 +384,7 @@ static BOOL sendFolderAdvisories = NO; } } +#warning this method is dirty code - (NSDictionary *) fetchContentStringsAndNamesOfAllObjects { NSDictionary *files; @@ -398,48 +400,6 @@ static BOOL sendFolderAdvisories = NO; return files; } -/* reflection */ - -- (NSString *) defaultFilenameExtension -{ - /* - Override to add an extension to a filename - - Note: be careful with that, needs to be consistent with object lookup! - */ - return nil; -} - -- (NSArray *) toOneRelationshipKeys -{ - /* toOneRelationshipKeys are the 'files' contained in a folder */ - NSMutableArray *ma; - NSArray *names; - NSString *name, *ext; - unsigned i, count; - NSRange r; - - names = [self fetchContentObjectNames]; - count = [names count]; - ext = [self defaultFilenameExtension]; - if (count && [ext length] > 0) - { - ma = [NSMutableArray arrayWithCapacity: count]; - for (i = 0; i < count; i++) - { - name = [names objectAtIndex: i]; - r = [name rangeOfString: @"."]; - if (r.length == 0) - name = [NSMutableString stringWithFormat: @"%@.%@", name, ext]; - [ma addObject: name]; - } - - names = ma; - } - - return names; -} - #warning this code should be cleaned up #warning this code is a dup of UIxFolderActions,\ we should remove the methods there instead