Monotone-Parent: e12096cc6ff6073a01d0cbde47b002dad0ed03eb

Monotone-Revision: 6de89dc14458ae60cd4838acc7d8fa5d2a91c345

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-09-14T23:16:48
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-09-14 23:16:48 +00:00
parent 83b1c30e43
commit 5e1a585643
5 changed files with 22 additions and 22 deletions

View File

@@ -1,5 +1,8 @@
2007-09-14 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Appointments/SOGoAppointmentFolder.m
([-deleteEntriesWithIds:ids]): moved method into SOGoFolder.
* UI/Scheduler/UIxCalMainView.m ([-batchDeleteAction]): moved
method into UIxFolderActions.

View File

@@ -84,8 +84,6 @@
- (NSArray *) fetchFreeBusyInfosFrom: (NSCalendarDate *) _startDate
to: (NSCalendarDate *) _endDate;
- (void) deleteEntriesWithIds: (NSArray *) ids;
/* URL generation */
- (NSString *) baseURLForAptWithUID: (NSString *) _uid

View File

@@ -933,26 +933,6 @@ static NSNumber *sharedYes = nil;
component: _component];
}
- (void) deleteEntriesWithIds: (NSArray *) ids
{
Class objectClass;
unsigned int count, max;
NSString *currentId;
id deleteObject;
max = [ids count];
for (count = 0; count < max; count++)
{
currentId = [ids objectAtIndex: count];
objectClass
= [self objectClassForResourceNamed: currentId];
deleteObject = [objectClass objectWithName: currentId
inContainer: self];
[deleteObject delete];
[deleteObject primaryDelete];
}
}
/* URL generation */
- (NSString *) baseURLForAptWithUID: (NSString *)_uid

View File

@@ -66,6 +66,8 @@
/* lower level fetches */
- (BOOL) nameExistsInFolder: (NSString *) objectName;
- (void) deleteEntriesWithIds: (NSArray *) ids;
- (NSArray *) fetchContentObjectNames;
- (NSDictionary *) fetchContentStringsAndNamesOfAllObjects;

View File

@@ -45,6 +45,7 @@
#import "NSArray+Utilities.h"
#import "NSString+Utilities.h"
#import "SOGoContentObject.h"
#import "SOGoPermissions.h"
#import "SOGoUser.h"
@@ -338,6 +339,22 @@ static NSString *defaultUserID = @"<default>";
&& [records count] > 0);
}
- (void) deleteEntriesWithIds: (NSArray *) ids
{
unsigned int count, max;
NSString *currentID;
SOGoContentObject *deleteObject;
max = [ids count];
for (count = 0; count < max; count++)
{
currentID = [ids objectAtIndex: count];
deleteObject = [self lookupName: currentID
inContext: context acquire: NO];
[deleteObject delete];
}
}
- (NSDictionary *) fetchContentStringsAndNamesOfAllObjects
{
NSDictionary *files;