Host: <var:string value="clientObject.hostName"/><br />
Port: <var:string value="clientObject.port"/><br />
-<h4>Databases</h4>
+<h4><a href="Databases/">Databases</a></h4>
<var:foreach list="databaseNames" item="item">
<li><a var:href="dbLink"><var:string value="item" /></a></li>
</var:foreach>
-<h4>Users</h4>
+<h4><a href="Users/">Users</a></h4>
<var:foreach list="userNames" item="item">
<li><a var:href="userLink"><var:string value="item" /></a></li>
</var:foreach>
- (id)initWithContainer:(DSoHost *)_container;
+/* accessors */
+
+- (DSoHost *)host;
+
@end
#endif /* __dbd_DSoDatabaseManager_H__ */
// $Id$
#include "DSoDatabaseManager.h"
+#include "DSoDatabase.h"
#include "DSoHost.h"
#include "common.h"
[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 */
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 +=
- 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)
DSoDatabaseManager = {
superclass = "DSoObject";
methods = {
+ "index" = {
+ protectedBy = "View";
+ pageName = "DDatabaseManager";
+ };
};
};
DSoUser = {