]> err.no Git - sope/blob - sope-appserver/NGObjWeb/NGObjWeb/WOAssociation.h
improved SOPE security exceptions
[sope] / sope-appserver / NGObjWeb / NGObjWeb / WOAssociation.h
1 /*
2   Copyright (C) 2000-2003 SKYRIX Software AG
3
4   This file is part of OGo
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 __NGObjWeb_WOAssociation_H__
24 #define __NGObjWeb_WOAssociation_H__
25
26 #import <Foundation/NSObject.h>
27
28 @class WOComponent, WOContext;
29
30 @interface WOAssociation : NSObject /* abstract/cluster */
31 {
32 }
33
34 + (WOAssociation *)associationWithKeyPath:(NSString *)_keyPath;
35 + (WOAssociation *)associationWithValue:(id)_value;
36
37 /* value */
38
39 - (void)setValue:(id)_value inContext:(WOContext *)_ctx;
40 - (id)valueInContext:(WOContext *)_ctx;
41 - (void)setValue:(id)_value inComponent:(WOComponent *)_component;
42 - (id)valueInComponent:(WOComponent *)_component;
43
44 - (BOOL)isValueConstant;
45 - (BOOL)isValueSettable;
46
47 /* deprecated methods */
48
49 - (void)setValue:(id)_value; // deprecated in WO4
50 - (id)value;                 // deprecated in WO4
51
52 @end
53
54 @interface WOAssociation(SpecialsValues)
55
56 - (void)setUnsignedCharValue:(unsigned char)_v inComponent:(WOComponent *)_c;
57 - (void)setCharValue:(char)_value inComponent:(WOComponent *)_component;
58 - (void)setUnsignedIntValue:(unsigned int)_v inComponent:(WOComponent *)_comp;
59 - (void)setIntValue:(int)_value inComponent:(WOComponent *)_component;
60 - (void)setBoolValue:(BOOL)_value inComponent:(WOComponent *)_component;
61
62 - (unsigned char)unsignedCharValueInComponent:(WOComponent *)_component;
63 - (char)charValueInComponent:(WOComponent *)_component;
64 - (unsigned int)unsignedIntValueInComponent:(WOComponent *)_component;
65 - (int)intValueInComponent:(WOComponent *)_component;
66 - (BOOL)boolValueInComponent:(WOComponent *)_component;
67
68 - (void)setStringValue:(NSString *)_v inComponent:(WOComponent *)_component;
69 - (NSString *)stringValueInComponent:(WOComponent *)_component;
70
71 /* special context values */
72
73 - (void)setUnsignedCharValue:(unsigned char)_v inContext:(WOContext *)_c;
74 - (void)setCharValue:(char)_value              inContext:(WOContext *)_ctx;
75 - (void)setUnsignedIntValue:(unsigned int)_v   inContext:(WOContext *)_c;
76 - (void)setIntValue:(int)_value                inContext:(WOContext *)_ctx;
77 - (void)setBoolValue:(BOOL)_value              inContext:(WOContext *)_ctx;
78
79 - (unsigned char)unsignedCharValueInContext:(WOContext *)_ctx;
80 - (char)charValueInContext:(WOContext *)_ctx;
81 - (unsigned int)unsignedIntValueInContext:(WOContext *)_ctx;
82 - (int)intValueInContext:(WOContext *)_ctx;
83 - (BOOL)boolValueInContext:(WOContext *)_ctx;
84
85 - (void)setStringValue:(NSString *)_v inContext:(WOContext *)_ctx;
86 - (NSString *)stringValueInContext:(WOContext *)_ctx;
87
88 @end
89
90 #endif /* __NGObjWeb_WOAssociation_H__ */