From caf540fbee1d7501d83ea72a3ceb74a29ce0cf13 Mon Sep 17 00:00:00 2001 From: helge Date: Wed, 16 Jun 2004 23:47:23 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/trunk@45 d1b88da0-ebda-0310-925b-ed51d893ca5b --- dbd/DHostView.wox | 4 ++-- dbd/DSoDatabaseManager.h | 4 ++++ dbd/DSoDatabaseManager.m | 17 +++++++++++++---- dbd/GNUmakefile | 12 +++++++----- dbd/README | 9 +++++++++ dbd/product.plist | 4 ++++ 6 files changed, 39 insertions(+), 11 deletions(-) diff --git a/dbd/DHostView.wox b/dbd/DHostView.wox index 474210d1..984fef03 100644 --- a/dbd/DHostView.wox +++ b/dbd/DHostView.wox @@ -8,12 +8,12 @@ Host:
Port:
-

Databases

+

Databases

  • -

    Users

    +

    Users

  • diff --git a/dbd/DSoDatabaseManager.h b/dbd/DSoDatabaseManager.h index 188a95fb..3aadcdd3 100644 --- a/dbd/DSoDatabaseManager.h +++ b/dbd/DSoDatabaseManager.h @@ -34,6 +34,10 @@ - (id)initWithContainer:(DSoHost *)_container; +/* accessors */ + +- (DSoHost *)host; + @end #endif /* __dbd_DSoDatabaseManager_H__ */ diff --git a/dbd/DSoDatabaseManager.m b/dbd/DSoDatabaseManager.m index abd51d90..ca789558 100644 --- a/dbd/DSoDatabaseManager.m +++ b/dbd/DSoDatabaseManager.m @@ -21,6 +21,7 @@ // $Id$ #include "DSoDatabaseManager.h" +#include "DSoDatabase.h" #include "DSoHost.h" #include "common.h" @@ -41,17 +42,25 @@ [super dealloc]; } +/* accessors */ + +- (DSoHost *)host { + return self->host; +} + /* name lookup */ - (id)lookupName:(NSString *)_key inContext:(id)_ctx acquire:(BOOL)_flag { id obj; - if ((obj = [super lookupName:_key inContext:_ctx acquire:_flag])) + if ((obj = [super lookupName:_key inContext:_ctx acquire:NO])) return obj; - - // TODO: create DSoDatabase object - return nil; + // TODO: create DSoDatabase object + obj = [[DSoDatabase alloc] initWithHostName:[self->host hostName] + port:[self->host port] + databaseName:_key]; + return [obj autorelease]; } @end /* DSoDatabaseManager */ diff --git a/dbd/GNUmakefile b/dbd/GNUmakefile index 3be382c5..a47d4d8a 100644 --- a/dbd/GNUmakefile +++ b/dbd/GNUmakefile @@ -21,15 +21,17 @@ dbd_OBJC_FILES += \ DSoField.m \ \ DHostView.m \ + DDatabaseManager.m \ dbd_RESOURCE_FILES += \ - Version \ - product.plist \ + Version \ + product.plist \ \ - Frame.wox \ - MainPage.wox \ + Frame.wox \ + MainPage.wox \ \ - DHostView.wox \ + DHostView.wox \ + DDatabaseManager.wox \ dbd_WEBSERVER_RESOURCE_FILES += diff --git a/dbd/README b/dbd/README index 6bca429c..4e85a139 100644 --- a/dbd/README +++ b/dbd/README @@ -72,3 +72,12 @@ Tricks used - in theory SOPE should make a redirect to the default method, not sure why this isn't happening - ZideStore always makes such a redirect? + +- acquisition + - if you override -lookupName:inContext:acquire:, you should probably + disable acquire in super calls! - otherwise all name processing code + coming after the [super lookup..] is overridden by objects in the + acquisition mechanism + - note that acquisition is also done on the traversal path! if the lookup + returns nil on an URL path being traversed, URL acquisition will occure + (except on non-acquisition protocols like WebDAV) diff --git a/dbd/product.plist b/dbd/product.plist index 4539405b..3ff18ae9 100644 --- a/dbd/product.plist +++ b/dbd/product.plist @@ -62,6 +62,10 @@ DSoDatabaseManager = { superclass = "DSoObject"; methods = { + "index" = { + protectedBy = "View"; + pageName = "DDatabaseManager"; + }; }; }; DSoUser = { -- 2.39.5