aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cosNotification/doc/src/CosNotifyFilter_MappingFilter.xml
blob: c0db8c1ae0a61521f11bd21611ce7ad7bf594109 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>
  <header>
    <copyright>
      <year>2000</year><year>2016</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
 
          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
    
    </legalnotice>

    <title>CosNotifyFilter_MappingFilter</title>
    <prepared></prepared>
    <docno></docno>
    <checked></checked>
    <date>2000-02-01</date>
    <rev>1.0</rev>
  </header>
  <module>CosNotifyFilter_MappingFilter</module>
  <modulesummary>This module implements the OMG CosNotifyFilter::MappingFilter interface.</modulesummary>
  <description>
    <p>The main purpose of this module is to match events against associated
      constraints and return the value for the first constraint that returns
      true for the given event. If all constraints return false the default value
      will be returned.</p>
    <p>To get access to the record definitions for the structures use:      <br></br>
<c>-include_lib("cosNotification/include/*.hrl").</c></p>
  </description>
  <funcs>
    <func>
      <name>_get_constraint_grammar(MappingFilter) -> Grammar</name>
      <fsummary>Return which type of Grammar the MappingFilter uses</fsummary>
      <type>
        <v>MappingFilter = #objref</v>
        <v>Grammar = string()</v>
      </type>
      <desc>
        <p>This operation returns which type of Grammar the MappingFilter uses. 
          Currently, only <c>"EXTENDED_TCL"</c> is supported.</p>
      </desc>
    </func>
    <func>
      <name>_get_value_type(MappingFilter) -> CORBA::TypeCode</name>
      <fsummary>Return the <c>CORBA::TypeCode</c>of the default value associated  with the target object</fsummary>
      <type>
        <v>MappingFilter = #objref</v>
      </type>
      <desc>
        <p>This readonly attribute maintains the <c>CORBA::TypeCode</c> of the default value
          associated with the target object.</p>
      </desc>
    </func>
    <func>
      <name>_get_default_value(MappingFilter) -> #any</name>
      <fsummary>Return the <c>#any{}</c> default value associated with  the target object</fsummary>
      <type>
        <v>MappingFilter = #objref</v>
      </type>
      <desc>
        <p>This readonly attribute maintains the <c>#any{}</c> default value associated with 
          the target object.</p>
      </desc>
    </func>
    <func>
      <name>add_mapping_constraints(MappingFilter, MappingConstraintPairSeq) -> Reply</name>
      <fsummary>Add new mapping constraints</fsummary>
      <type>
        <v>MappingFilter = #objref</v>
        <v>MappingConstraintPairSeq = [MappingConstraintPair]</v>
        <v>MappingConstraintPair = #'CosNotifyFilter_MappingConstraintPair'{constraint_expression, result_to_set}</v>
        <v>constraint_expression = #'CosNotifyFilter_ConstraintExp'{event_types, constraint_expr}</v>
        <v>event_types = #'CosNotification_EventTypeSeq'{}</v>
        <v>constraint_expr = string()</v>
        <v>result_to_set = #any</v>
        <v>Reply = MappingConstraintInfoSeq | {'EXCEPTION', #'CosNotifyFilter_InvalidConstraint'{constr}} | {'EXCEPTION', #'CosNotifyFilter_InvalidValue'{constr, value}}</v>
        <v>constr = ConstraintExp</v>
        <v>ConstraintExp = #'CosNotifyFilter_ConstraintExp'{event_types, constraint_expr}</v>
        <v>event_types = #'CosNotification_EventTypeSeq'{}</v>
        <v>constraint_expr = string()</v>
        <v>MappingConstraintInfoSeq = [MappingConstraintInfo]</v>
        <v>MappingConstraintInfo = #'CosNotifyFilter_MappingConstraintInfo'{constraint_expression, constraint_id, value}</v>
        <v>constraint_expression = ConstraintExp</v>
        <v>constraint_id = long()</v>
        <v>value = #any</v>
      </type>
      <desc>
        <p>This operation add new mapping constraints, which will be used when trying to override
          Quality of Service settings defined in the given event. If a constraint return true the
          associated value will be returned, otherwise the default value.</p>
      </desc>
    </func>
    <func>
      <name>modify_constraints(MappingFilter, ConstraintIDSeq, MappingConstraintInfoSeq) -> Reply</name>
      <fsummary>Modify the constraints associated with the target object</fsummary>
      <type>
        <v>MappingFilter = #objref</v>
        <v>ConstraintIDSeq = [ConstraintID]</v>
        <v>ConstraintID = long()</v>
        <v>MappingConstraintInfoSeq = [MappingConstraintInfo]</v>
        <v>MappingConstraintInfo = #'CosNotifyFilter_MappingConstraintInfo'{constraint_expression, constraint_id, value}</v>
        <v>constraint_expression = ConstraintExp</v>
        <v>constraint_id = long()</v>
        <v>value = #any</v>
        <v>ConstraintInfoSeq = [ConstraintInfo]</v>
        <v>ConstraintInfo = #'CosNotifyFilter_ConstraintInfo'{constraint_expression, constraint_id}</v>
        <v>constraint_expression = ConstraintExp</v>
        <v>constraint_id = long()</v>
        <v>Reply = ok | {'EXCEPTION', #'CosNotifyFilter_InvalidConstraint'{constr}} | {'EXCEPTION', #'CosNotifyFilter_ConstraintNotFound'{id}} | {'EXCEPTION', #'CosNotifyFilter_InvalidValue'{constr, value}}</v>
        <v>constr = ConstraintExp</v>
        <v>id = long()</v>
        <v>value = #any</v>
        <v>ConstraintExp = #'CosNotifyFilter_ConstraintExp'{event_types, constraint_expr}</v>
        <v>event_types = #'CosNotification_EventTypeSeq'{}</v>
        <v>constraint_expr = string()</v>
      </type>
      <desc>
        <p>The <c>ConstraintIDSeq</c> supplied should relate to constraints the caller wishes to
          remove. If any of the supplied Id's are not found an exception will be raised. This 
          operation also accepts a sequence of <c>MappingConstraintInfo</c> which will be added.
          If the target object cannot modify the constraints as requested an exception is raised
          describing which constraint, and why, could not be updated.</p>
      </desc>
    </func>
    <func>
      <name>get_mapping_constraints(MappingFilter, ConstraintIDSeq) -> Reply</name>
      <fsummary>Return the target object's associated constraints with given ID:s</fsummary>
      <type>
        <v>MappingFilter = #objref</v>
        <v>ConstraintIDSeq = [ConstraintID]</v>
        <v>ConstraintID = long()</v>
        <v>Reply = MappingConstraintInfoSeq | {'EXCEPTION', #'CosNotifyFilter_ConstraintNotFound'{id}}</v>
        <v>MappingConstraintInfoSeq = [MappingConstraintInfo]</v>
        <v>MappingConstraintInfo = #'CosNotifyFilter_MappingConstraintInfo'{constraint_expression, constraint_id, value}</v>
        <v>constraint_expression = ConstraintExp</v>
        <v>ConstraintExp = #'CosNotifyFilter_ConstraintExp'{event_types, constraint_expr}</v>
        <v>event_types = #'CosNotification_EventTypeSeq'{}</v>
        <v>constraint_expr = string()</v>
        <v>constraint_id = id = long()</v>
        <v>value = #any</v>
      </type>
      <desc>
        <p>When adding a new constraint a unique Id is returned, which is accepted as input for this
          operation. The associated constraint is returned, but if no such Id exists an exception is raised.          </p>
      </desc>
    </func>
    <func>
      <name>get_all_mapping_constraints(MappingFilter) -> MappingConstraintInfoSeq</name>
      <fsummary>Return the target object's all associated constraints</fsummary>
      <type>
        <v>MappingFilter = #objref</v>
        <v>MappingConstraintInfoSeq = [MappingConstraintInfo]</v>
        <v>MappingConstraintInfo = #'CosNotifyFilter_MappingConstraintInfo'{constraint_expression, constraint_id, value}</v>
        <v>constraint_expression = ConstraintExp</v>
        <v>ConstraintExp = #'CosNotifyFilter_ConstraintExp'{event_types, constraint_expr}</v>
        <v>event_types = #'CosNotification_EventTypeSeq'{}</v>
        <v>constraint_expr = string()</v>
        <v>constraint_id = long()</v>
        <v>value = #any</v>
      </type>
      <desc>
        <p>This operation returns a sequence of all unique Id's associated with the target object.
          If no constraint have been added the sequence will be empty.</p>
      </desc>
    </func>
    <func>
      <name>remove_all_mapping_constraints(MappingFilter) -> ok</name>
      <fsummary>Remove all constraints associated with the target object</fsummary>
      <type>
        <v>MappingFilter = #objref</v>
      </type>
      <desc>
        <p>This operation removes all constraints associated with the target object.</p>
      </desc>
    </func>
    <func>
      <name>destroy(MappingFilter) -> ok</name>
      <fsummary>Terminate the target object</fsummary>
      <type>
        <v>MappingFilter = #objref</v>
      </type>
      <desc>
        <p>This operation terminates the target object. Remember to remove
          this Filter from the objects it have been associated with.</p>
      </desc>
    </func>
    <func>
      <name>match(MappingFilter, Event) -> Reply</name>
      <fsummary>Evaluate the given Any event with the Filter's constraints</fsummary>
      <type>
        <v>MappingFilter = #objref</v>
        <v>Event = #any</v>
        <v>Reply = {boolean(), #any} | {'EXCEPTION', #'CosNotifyFilter_UnsupportedFilterableData'{}}</v>
      </type>
      <desc>
        <p>This operation evaluates <c>Any</c> events with the Filter's constraints, 
          and returns the value to use. The value is the default value if all constraints
          returns false and the value associated with the first constraint returning true.</p>
      </desc>
    </func>
    <func>
      <name>match_structured(MappingFilter, Event) -> Reply</name>
      <fsummary>Evaluate the given structured event with the Filter's constraints</fsummary>
      <type>
        <v>MappingFilter = #objref</v>
        <v>Event = #'CosNotification_StructuredEvent'{}</v>
        <v>Reply = {boolean(), #any} | {'EXCEPTION', #'CosNotifyFilter_UnsupportedFilterableData'{}}</v>
      </type>
      <desc>
        <p>Similar to <c>match/2</c> but accepts a structured event as input.</p>
      </desc>
    </func>
  </funcs>
  
</erlref>