/* name lookup */
+- (id)groupCalendar:(NSString *)_key inContext:(id)_ctx {
+ static Class calClass = Nil;
+ id calendar;
+
+ if (calClass == Nil)
+ calClass = NSClassFromString(@"SOGoGroupAppointmentFolder");
+ if (calClass == Nil) {
+ [self logWithFormat:@"ERROR: missing SOGoGroupAppointmentFolder class!"];
+ return nil;
+ }
+
+ calendar = [[calClass alloc] initWithName:_key inContainer:self];
+
+ // TODO: should we pass over the uids in questions or should the
+ // appointment folder query its container for that info?
+
+ return [calendar autorelease];
+}
+
+- (id)lookupName:(NSString *)_key inContext:(id)_ctx acquire:(BOOL)_flag {
+ id obj;
+
+ /* first check attributes directly bound to the application */
+ if ((obj = [super lookupName:_key inContext:_ctx acquire:NO]))
+ return obj;
+
+ if ([_key isEqualToString:@"Calendar"])
+ return [self groupCalendar:_key inContext:_ctx];
+
+ /* return 404 to stop acquisition */
+ return [NSException exceptionWithHTTPStatus:404 /* Not Found */];
+}
+
@end /* SOGoGroupFolder */