]> err.no Git - sope/blob - sope-appserver/NGObjWeb/SoObjects/SoPageInvocation.h
fixed OGo bug #888
[sope] / sope-appserver / NGObjWeb / SoObjects / SoPageInvocation.h
1 /*
2   Copyright (C) 2002-2004 SKYRIX Software AG
3
4   This file is part of OpenGroupware.org.
5
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
9   later version.
10
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.
15
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
19   02111-1307, USA.
20 */
21 // $Id$
22
23 #ifndef __SoObjects_SoPageInvocation_H__
24 #define __SoObjects_SoPageInvocation_H__
25
26 #import <Foundation/NSObject.h>
27
28 /*
29   An invocation object for WOComponent based SoClass methods.
30   
31   If the invocation is bound, the component is instantiated and initialized,
32   if it is called, the "actionName" is called and the result is returned or
33   if no "actionName" is set, the component itself is returned.
34 */
35
36 @class NSString, NSDictionary;
37 @class WOComponent;
38 @class SoProduct;
39
40 @interface SoPageInvocation : NSObject
41 {
42   NSString     *pageName;
43   NSString     *actionName;
44   SoProduct    *product; /* non-retained ! */
45   
46   /* for bound invocations */
47   WOComponent  *page;
48   id           object;
49   
50   NSDictionary *argumentSpecifications;
51 }
52
53 - (id)initWithPageName:(NSString *)_pageName;
54 - (id)initWithPageName:(NSString *)_pageName actionName:(NSString *)_action;
55 - (id)initWithPageName:(NSString *)_pageName actionName:(NSString *)_action
56   product:(SoProduct *)_product;
57
58 /* accessors */
59
60 - (NSString *)pageName;
61 - (NSString *)actionName;
62
63 - (void)setArgumentSpecifications:(NSDictionary *)_specs;
64 - (NSDictionary *)argumentSpecifications;
65
66 /* bindings */
67
68 - (BOOL)isBound;
69 - (id)bindToObject:(id)_object inContext:(id)_ctx;
70
71 @end
72
73 #endif /* __SoObjects_SoPageInvocation_H__ */