2 Copyright (C) 2000-2004 SKYRIX Software AG
4 This file is part of OpenGroupware.org.
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #include "SoControlPanel.h"
24 #include "SoClassSecurityInfo.h"
25 #include "SoProductRegistry.h"
27 #include <NGObjWeb/WOApplication.h>
28 #include <NGObjWeb/WOResponse.h>
31 @implementation SoControlPanel
37 - (id)handleQueryWithUnboundKey:(NSString *)_key {
38 return [self lookupName:_key
39 inContext:[[WOApplication application] context]
43 - (id)lookupName:(NSString *)_key inContext:(id)_ctx acquire:(BOOL)_ac {
44 if ([_key isEqualToString:@"Products"])
45 return [SoProductRegistry sharedProductRegistry];
47 return [super lookupName:_key inContext:_ctx acquire:_ac];
50 - (NSArray *)toOneRelationshipKeys {
53 if ((a = [super toOneRelationshipKeys])) {
54 return ([a containsObject:@"Products"])
55 ? a : [a arrayByAddingObject:@"Products"];
58 return [NSArray arrayWithObject:@"Products"];
61 - (NSArray *)manageMenuChildNames {
65 /* if accessed directly ... */
67 - (void)appendToResponse:(WOResponse *)_response inContext:(id)_ctx {
68 // should invoke GETAction in the SMI ...
69 [_response appendContentString:@"<h3>SOPE Control Panel</h3>"];
70 [_response appendContentString:
71 @"<li><a href=\"Products/\">Products</a></li>"];
74 @end /* SoControlPanel */