From 671992802bb9a9369b0a3750639a086e6cc4276f Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 1 Jun 2007 20:45:16 +0000 Subject: [PATCH] Monotone-Parent: 0c4734653a7d9bf2c83bb1be51525aee8006bf7a Monotone-Revision: ebf9e259f35f824bac1d65aaaeb22d27c2e81357 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-06-01T20:45:16 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 9 +++++++ SoObjects/Contacts/SOGoContactLDAPFolder.h | 1 - SoObjects/Contacts/SOGoContactLDAPFolder.m | 31 +++++++++++----------- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac085bcf9..d6407a6dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2007-06-01 Wolfgang Sourdeau + * SoObjects/Contacts/SOGoContactLDAPFolder.m + ([SOGoContactLDAPFolder -init]): no longer handle the + nameInContainer no the container ivars. They were removed because + this class is a descendant of SOGoObject which already has them. + ([SOGoContactLDAPFolder -davDisplayName]): new overriden method + returning "displayName". + ([SOGoContactLDAPFolder -isFolderish]): new overriden method + returning "YES". + * SoObjects/Appointments/SOGoCalendarComponent.m ([SOGoCalendarComponent -isOrganizerOrOwner:user]): commented out. ([SOGoCalendarComponent -findParticipant:user]): new name for diff --git a/SoObjects/Contacts/SOGoContactLDAPFolder.h b/SoObjects/Contacts/SOGoContactLDAPFolder.h index dd2f9bfc7..da09d3821 100644 --- a/SoObjects/Contacts/SOGoContactLDAPFolder.h +++ b/SoObjects/Contacts/SOGoContactLDAPFolder.h @@ -31,7 +31,6 @@ @interface SOGoContactLDAPFolder : SOGoObject { - NSString *name; NSString *displayName; LDAPSource *ldapSource; NSMutableDictionary *entries; diff --git a/SoObjects/Contacts/SOGoContactLDAPFolder.m b/SoObjects/Contacts/SOGoContactLDAPFolder.m index 8d7a1d5b9..391336392 100644 --- a/SoObjects/Contacts/SOGoContactLDAPFolder.m +++ b/SoObjects/Contacts/SOGoContactLDAPFolder.m @@ -70,9 +70,7 @@ { if ((self = [super init])) { - name = nil; displayName = nil; - container = nil; entries = nil; ldapSource = nil; } @@ -84,20 +82,18 @@ andDisplayName: (NSString *) newDisplayName inContainer: (SOGoObject *) newContainer { - self = [self init]; - - ASSIGN (name, newName); - ASSIGN (displayName, newDisplayName); - ASSIGN (container, newContainer); + if ((self = [self initWithName: newName + inContainer: newContainer])) + { + ASSIGN (displayName, newDisplayName); + } return self; } - (void) dealloc { - [name release]; [displayName release]; - [container release]; [entries release]; [ldapSource release]; [super dealloc]; @@ -113,11 +109,6 @@ return displayName; } -- (NSString *) nameInContainer -{ - return name; -} - - (id) lookupName: (NSString *) objectName inContext: (WOContext *) lookupContext acquire: (BOOL) acquire @@ -133,7 +124,7 @@ { ldifEntry = [ldapSource lookupContactEntry: objectName]; obj = ((ldifEntry) - ? [SOGoContactLDIFEntry contactEntryWithName: name + ? [SOGoContactLDIFEntry contactEntryWithName: objectName withLDIFEntry: ldifEntry inContainer: self] : [NSException exceptionWithHTTPStatus: 404]); @@ -194,6 +185,16 @@ return YES; } +- (NSString *) davDisplayName +{ + return displayName; +} + +- (BOOL) isFolderish +{ + return YES; +} + /* acls */ /* TODO: this might change one day when we support LDAP acls */ - (NSArray *) aclsForUser: (NSString *) uid