Refactor AAA.checkUser()
[nemo.git] / nemo-impl / src / main / java / org / opendaylight / nemo / user / advancedquery / AdvancedQuery.java
1 /*\r
2  * Copyright (c) 2015 Huawei, Inc. and others. All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 package org.opendaylight.nemo.user.advancedquery;\r
9 \r
10 import java.util.List;\r
11 \r
12 import org.opendaylight.controller.md.sal.binding.api.DataBroker;\r
13 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;\r
14 import org.opendaylight.nemo.user.tenantmanager.AAA;\r
15 import org.opendaylight.nemo.user.tenantmanager.TenantManage;\r
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.common.rev151010.UserId;\r
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.intent.rev151010.AdvancedNemoQueryInput;\r
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.intent.rev151010.Users;\r
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.intent.rev151010.advanced.nemo.query.input.QueryCondition;\r
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.intent.rev151010.user.intent.Objects;\r
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.intent.rev151010.user.intent.Operations;\r
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.intent.rev151010.user.intent.Results;\r
23 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.intent.rev151010.user.intent.objects.Connection;\r
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.intent.rev151010.user.intent.objects.Flow;\r
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.intent.rev151010.user.intent.objects.Node;\r
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.intent.rev151010.user.intent.operations.Operation;\r
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.intent.rev151010.users.User;\r
28 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.intent.rev151010.users.UserKey;\r
29 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.object.rev151010.flow.instance.MatchItem;\r
30 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.object.rev151010.flow.instance.Property;\r
31 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.object.rev151010.property.instance.property.values.IntValue;\r
32 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;\r
33 import org.slf4j.Logger;\r
34 import org.slf4j.LoggerFactory;\r
35 \r
36 import com.google.common.base.Optional;\r
37 import com.google.common.util.concurrent.FutureCallback;\r
38 import com.google.common.util.concurrent.Futures;\r
39 import com.google.common.util.concurrent.ListenableFuture;\r
40 \r
41 /**\r
42  * Created by z00293636 on 2015/8/29.\r
43  */\r
44 public class AdvancedQuery\r
45 {\r
46     private DataBroker dataBroker;\r
47     private TenantManage tenantManage;\r
48     private QueryDefinitionCheck queryDefinitionCheck;\r
49     private Objects objects;\r
50     private Operations operations;\r
51     private List<Results> resultsList;\r
52     private static final Logger LOG = LoggerFactory.getLogger(QueryDefinitionCheck.class);\r
53 \r
54     public AdvancedQuery(DataBroker dataBroker, TenantManage tenantManage)\r
55     {\r
56         this.dataBroker = dataBroker;\r
57         this.tenantManage = tenantManage;\r
58         queryDefinitionCheck = new QueryDefinitionCheck(dataBroker);\r
59         objects = null;\r
60         operations = null;\r
61         resultsList = null;\r
62     }\r
63 \r
64     public String advancedQuery(AAA aaa, AdvancedNemoQueryInput input)\r
65     {\r
66         String errorInfo = null;\r
67         List<QueryCondition> queryConditionList = null;\r
68 \r
69         errorInfo = aaa.checkUser(input);\r
70 \r
71         if (errorInfo != null)\r
72         {\r
73             return errorInfo;\r
74         }\r
75         else\r
76         {\r
77             if (input.getQueryCondition() != null)\r
78             {\r
79                 queryConditionList = input.getQueryCondition();\r
80                 for (QueryCondition queryCondition : queryConditionList)\r
81                 {\r
82                     errorInfo = queryDefinitionCheck.CheckQueryDefinition(queryCondition);\r
83                     if (errorInfo != null)\r
84                     {\r
85                         break;\r
86                     }\r
87                 }\r
88             }\r
89         }\r
90         return errorInfo;\r
91     }\r
92 \r
93     public String getAdvancedQueryReuslt(AdvancedNemoQueryInput advancedNemoQueryInput)\r
94     {\r
95         UserId userId = advancedNemoQueryInput.getUserId();\r
96         List<QueryCondition> queryConditionList = advancedNemoQueryInput.getQueryCondition();\r
97         String queryResult = null;\r
98 \r
99         for (QueryCondition queryCondition : queryConditionList)\r
100         {\r
101             if (queryCondition.getQueryIntentType() != null)\r
102             {\r
103                 if (queryCondition.getQueryIntentType().getIntValue() == 0)\r
104                 {\r
105                     queryResult += nodeInstanceQuery(userId, queryCondition);\r
106                 }\r
107                 if (queryCondition.getQueryIntentType().getIntValue() == 1)\r
108                 {\r
109                     queryResult += connectionInstanceQuery(userId,queryCondition);\r
110                 }\r
111                 if (queryCondition.getQueryIntentType().getIntValue() == 2)\r
112                 {\r
113                     queryResult += flowInstanceQuery(userId,queryCondition);\r
114                 }\r
115                 if (queryCondition.getQueryIntentType().getIntValue() == 3)\r
116                 {\r
117                     queryResult += operationsInstanceQuery(userId,queryCondition);\r
118                 }\r
119             }\r
120         }\r
121 \r
122         return queryResult;\r
123     }\r
124 \r
125     private String nodeInstanceQuery(UserId userId, QueryCondition queryCondition)\r
126     {\r
127         String queryResult = null;\r
128 \r
129         fetchObjectsInstance(userId);\r
130 \r
131         if (objects != null)\r
132         {\r
133             if (objects.getNode() != null)\r
134             {\r
135                 List<Node> nodeList = objects.getNode();\r
136 \r
137                 for (Node node : nodeList)\r
138                 {\r
139                     if (node.getProperty() != null)\r
140                     {\r
141                         for(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.object.rev151010.node.instance.Property property : node.getProperty())\r
142                         {\r
143                             if (property.getPropertyName().equals(queryCondition.getQueryConditionName()))\r
144                             {\r
145                                 int operator = queryCondition.getQueryConditionMatchPattern().getIntValue();\r
146                                 List<IntValue> values =property.getPropertyValues().getIntValue();\r
147                                 if (operator == 0 && (property.getPropertyValues().getIntValue() != null))\r
148                                 {\r
149                                     for(IntValue value:values)\r
150                                     {\r
151                                         if (value.getValue()<queryCondition.getQueryConditionTargetValue().getIntValue())\r
152                                         {\r
153                                             queryResult += node.getNodeId().toString()+node.getNodeName().toString()+node.getNodeType().toString()+node.getSubNode().toString()+node.getProperty().toString();\r
154                                         }\r
155                                     }\r
156                                 }\r
157                                 if (operator == 1 && (property.getPropertyValues().getIntValue() != null))\r
158                                 {\r
159                                     for(IntValue value:values)\r
160                                     {\r
161                                         if (value.getValue()<=queryCondition.getQueryConditionTargetValue().getIntValue())\r
162                                         {\r
163                                             queryResult += node.getNodeId().toString()+node.getNodeName().toString()+node.getNodeType().toString()+node.getSubNode().toString()+node.getProperty().toString();\r
164                                         }\r
165                                     }\r
166                                 }\r
167                                 if (operator == 2 && (property.getPropertyValues().getIntValue() != null))\r
168                                 {\r
169                                     for(IntValue value:values)\r
170                                     {\r
171                                         if (value.getValue()==queryCondition.getQueryConditionTargetValue().getIntValue())\r
172                                         {\r
173                                             queryResult += node.getNodeId().toString()+node.getNodeName().toString()+node.getNodeType().toString()+node.getSubNode().toString()+node.getProperty().toString();\r
174                                         }\r
175                                     }\r
176                                 }\r
177                                 if (operator == 3 && (property.getPropertyValues().getIntValue() != null))\r
178                                 {\r
179                                     for(IntValue value:values)\r
180                                     {\r
181                                         if (value.getValue()!=queryCondition.getQueryConditionTargetValue().getIntValue())\r
182                                         {\r
183                                             queryResult += node.getNodeId().toString()+node.getNodeName().toString()+node.getNodeType().toString()+node.getSubNode().toString()+node.getProperty().toString();\r
184                                         }\r
185                                     }\r
186                                 }\r
187                                 if (operator == 4 && (property.getPropertyValues().getIntValue() != null))\r
188                                 {\r
189                                     for(IntValue value:values)\r
190                                     {\r
191                                         if (value.getValue()>queryCondition.getQueryConditionTargetValue().getIntValue())\r
192                                         {\r
193                                             queryResult += node.getNodeId().toString()+node.getNodeName().toString()+node.getNodeType().toString()+node.getSubNode().toString()+node.getProperty().toString();\r
194                                         }\r
195                                     }\r
196                                 }\r
197                                 if (operator == 5 && (property.getPropertyValues().getIntValue() != null))\r
198                                 {\r
199                                     for(IntValue value:values)\r
200                                     {\r
201                                         if (value.getValue()>=queryCondition.getQueryConditionTargetValue().getIntValue())\r
202                                         {\r
203                                             queryResult += node.getNodeId().toString()+node.getNodeName().toString()+node.getNodeType().toString()+node.getSubNode().toString()+node.getProperty().toString();\r
204                                         }\r
205                                     }\r
206                                 }\r
207                                 if (operator == 6 && (property.getPropertyValues().getIntValue() != null))\r
208                                 {\r
209                                     //between todo\r
210                                 }\r
211                             }\r
212                         }\r
213                     }\r
214 \r
215             }\r
216         }\r
217 \r
218         }\r
219 \r
220         return queryResult;\r
221     }\r
222 \r
223     private String connectionInstanceQuery(UserId userId, QueryCondition queryCondition)\r
224     {\r
225         String queryResult = null;\r
226 \r
227         fetchObjectsInstance(userId);\r
228         if (objects != null)\r
229         {\r
230             if (objects.getConnection() != null)\r
231             {\r
232                 List<Connection> connectionList = objects.getConnection();\r
233 \r
234                 for (Connection connection : connectionList)\r
235                 {\r
236                     if (connection.getProperty() != null)\r
237                     {\r
238                         for (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nemo.object.rev151010.connection.instance.Property property : connection.getProperty())\r
239                         {\r
240                             if (property.getPropertyName().equals(queryCondition.getQueryConditionName()))\r
241                             {\r
242                                 int operator = queryCondition.getQueryConditionMatchPattern().getIntValue();\r
243                                 List<IntValue> values =property.getPropertyValues().getIntValue();\r
244                                 if (operator == 0 && (property.getPropertyValues().getIntValue() != null))\r
245                                 {\r
246                                     for(IntValue value:values)\r
247                                     {\r
248                                         if (value.getValue()<queryCondition.getQueryConditionTargetValue().getIntValue())\r
249                                         {\r
250                                             queryResult += connection.getConnectionId().toString()+ connection.getConnectionName().toString()+connection.getConnectionType().toString()+connection.getEndNode().toString()+connection.getProperty().toString();\r
251                                         }\r
252                                     }\r
253                                 }\r
254                                 if (operator == 1 && (property.getPropertyValues().getIntValue() != null))\r
255                                 {\r
256                                     for(IntValue value:values)\r
257                                     {\r
258                                         if (value.getValue()<=queryCondition.getQueryConditionTargetValue().getIntValue())\r
259                                         {\r
260                                             queryResult += connection.getConnectionId().toString()+ connection.getConnectionName().toString()+connection.getConnectionType().toString()+connection.getEndNode().toString()+connection.getProperty().toString();\r
261                                         }\r
262                                     }\r
263                                 }\r
264                                 if (operator == 2 && (property.getPropertyValues().getIntValue() != null))\r
265                                 {\r
266                                     for(IntValue value:values)\r
267                                     {\r
268                                         if (value.getValue()==queryCondition.getQueryConditionTargetValue().getIntValue())\r
269                                         {\r
270                                             queryResult += connection.getConnectionId().toString()+ connection.getConnectionName().toString()+connection.getConnectionType().toString()+connection.getEndNode().toString()+connection.getProperty().toString();\r
271                                         }\r
272                                     }\r
273                                 }\r
274                                 if (operator == 3 && (property.getPropertyValues().getIntValue() != null))\r
275                                 {\r
276                                     for(IntValue value:values)\r
277                                     {\r
278                                         if (value.getValue()!=queryCondition.getQueryConditionTargetValue().getIntValue())\r
279                                         {\r
280                                             queryResult += connection.getConnectionId().toString()+ connection.getConnectionName().toString()+connection.getConnectionType().toString()+connection.getEndNode().toString()+connection.getProperty().toString();\r
281                                         }\r
282                                     }\r
283                                 }\r
284                                 if (operator == 4 && (property.getPropertyValues().getIntValue() != null))\r
285                                 {\r
286                                     for(IntValue value:values)\r
287                                     {\r
288                                         if (value.getValue()>queryCondition.getQueryConditionTargetValue().getIntValue())\r
289                                         {\r
290                                             queryResult += connection.getConnectionId().toString()+ connection.getConnectionName().toString()+connection.getConnectionType().toString()+connection.getEndNode().toString()+connection.getProperty().toString();\r
291                                         }\r
292                                     }\r
293                                 }\r
294                                 if (operator == 5 && (property.getPropertyValues().getIntValue() != null))\r
295                                 {\r
296                                     for(IntValue value:values)\r
297                                     {\r
298                                         if (value.getValue()>=queryCondition.getQueryConditionTargetValue().getIntValue())\r
299                                         {\r
300                                             queryResult += connection.getConnectionId().toString()+ connection.getConnectionName().toString()+connection.getConnectionType().toString()+connection.getEndNode().toString()+connection.getProperty().toString();\r
301                                         }\r
302                                     }\r
303                                 }\r
304                                 if (operator == 6 && (property.getPropertyValues().getIntValue() != null))\r
305                                 {\r
306                                     //between todo\r
307                                 }\r
308                             }\r
309                         }\r
310                     }\r
311 \r
312                 }\r
313             }\r
314         }\r
315 \r
316         return queryResult;\r
317     }\r
318 \r
319     private String flowInstanceQuery(UserId userId, QueryCondition queryCondition)\r
320     {\r
321         String queryResult = null;\r
322 \r
323         fetchObjectsInstance(userId);\r
324         if (objects != null)\r
325         {\r
326             if (objects.getFlow() != null)\r
327             {\r
328                 List<Flow> flowList = objects.getFlow();\r
329 \r
330                 for (Flow flow: flowList)\r
331                 {\r
332                     if (flow.getProperty() != null)\r
333                     {\r
334                         for (Property property : flow.getProperty())\r
335                         {\r
336                             if (property.getPropertyName().equals(queryCondition.getQueryConditionName()))\r
337                             {\r
338                                 int operator = queryCondition.getQueryConditionMatchPattern().getIntValue();\r
339                                 List<IntValue> values = property.getPropertyValues().getIntValue();\r
340                                 if (operator == 0 && (property.getPropertyValues().getIntValue() != null))\r
341                                 {\r
342                                     for(IntValue value:values)\r
343                                     {\r
344                                         if (value.getValue()<queryCondition.getQueryConditionTargetValue().getIntValue())\r
345                                         {\r
346                                             queryResult += flow.getFlowId().toString() + flow.getFlowName().toString() + flow.getMatchItem().toString() + flow.getProperty().toString();\r
347                                         }\r
348                                     }\r
349                                 }\r
350                                 if (operator == 1 && (property.getPropertyValues().getIntValue() != null))\r
351                                 {\r
352                                     for(IntValue value:values)\r
353                                     {\r
354                                         if (value.getValue()<=queryCondition.getQueryConditionTargetValue().getIntValue())\r
355                                         {\r
356                                             queryResult += flow.getFlowId().toString() + flow.getFlowName().toString() + flow.getMatchItem().toString() + flow.getProperty().toString();\r
357                                         }\r
358                                     }\r
359                                 }\r
360                                 if (operator == 2 && (property.getPropertyValues().getIntValue() != null))\r
361                                 {\r
362                                     for(IntValue value:values)\r
363                                     {\r
364                                         if (value.getValue()==queryCondition.getQueryConditionTargetValue().getIntValue())\r
365                                         {\r
366                                             queryResult += flow.getFlowId().toString() + flow.getFlowName().toString() + flow.getMatchItem().toString() + flow.getProperty().toString();\r
367                                         }\r
368                                     }\r
369                                 }\r
370                                 if (operator == 3 && (property.getPropertyValues().getIntValue() != null))\r
371                                 {\r
372                                     for(IntValue value:values)\r
373                                     {\r
374                                         if (value.getValue()!=queryCondition.getQueryConditionTargetValue().getIntValue())\r
375                                         {\r
376                                             queryResult += flow.getFlowId().toString() + flow.getFlowName().toString() + flow.getMatchItem().toString() + flow.getProperty().toString();\r
377                                         }\r
378                                     }\r
379                                 }\r
380                                 if (operator == 4 && (property.getPropertyValues().getIntValue() != null))\r
381                                 {\r
382                                     for(IntValue value:values)\r
383                                     {\r
384                                         if (value.getValue()>queryCondition.getQueryConditionTargetValue().getIntValue())\r
385                                         {\r
386                                             queryResult += flow.getFlowId().toString() + flow.getFlowName().toString() + flow.getMatchItem().toString() + flow.getProperty().toString();\r
387                                         }\r
388                                     }\r
389                                 }\r
390                                 if (operator == 5 && (property.getPropertyValues().getIntValue() != null))\r
391                                 {\r
392                                     for(IntValue value:values)\r
393                                     {\r
394                                         if (value.getValue()>=queryCondition.getQueryConditionTargetValue().getIntValue())\r
395                                         {\r
396                                             queryResult += flow.getFlowId().toString() + flow.getFlowName().toString() + flow.getMatchItem().toString() + flow.getProperty().toString();\r
397                                         }\r
398                                     }\r
399                                 }\r
400                                 if (operator == 6 && (property.getPropertyValues().getIntValue() != null))\r
401                                 {\r
402                                     //between todo\r
403                                 }\r
404                             }\r
405                         }\r
406                     }\r
407                     if (flow.getMatchItem() != null)\r
408                     {\r
409                         for(MatchItem matchItem: flow.getMatchItem())\r
410                         {\r
411                             if (matchItem.getMatchItemName().equals(queryCondition.getQueryConditionName()))\r
412                             {\r
413                                 int operator = queryCondition.getQueryConditionMatchPattern().getIntValue();\r
414                                 if (operator == 0 && matchItem.getMatchItemValue().getIntValue()<queryCondition.getQueryConditionTargetValue().getIntValue())\r
415                                 {\r
416                                     queryResult += flow.getFlowId().toString() + flow.getFlowName().toString() + flow.getMatchItem().toString() + flow.getProperty().toString();\r
417                                 }\r
418                                 if (operator == 1 && matchItem.getMatchItemValue().getIntValue()<=queryCondition.getQueryConditionTargetValue().getIntValue())\r
419                                 {\r
420                                     queryResult += flow.getFlowId().toString() + flow.getFlowName().toString() + flow.getMatchItem().toString() + flow.getProperty().toString();\r
421                                 }\r
422                                 if (operator == 2 && matchItem.getMatchItemValue().getIntValue()==queryCondition.getQueryConditionTargetValue().getIntValue())\r
423                                 {\r
424                                     queryResult += flow.getFlowId().toString() + flow.getFlowName().toString() + flow.getMatchItem().toString() + flow.getProperty().toString();\r
425                                 }\r
426                                 if (operator == 3 && matchItem.getMatchItemValue().getIntValue()!=queryCondition.getQueryConditionTargetValue().getIntValue())\r
427                                 {\r
428                                     queryResult += flow.getFlowId().toString() + flow.getFlowName().toString() + flow.getMatchItem().toString() + flow.getProperty().toString();\r
429                                 }\r
430                                 if (operator == 4 && matchItem.getMatchItemValue().getIntValue()>queryCondition.getQueryConditionTargetValue().getIntValue())\r
431                                 {\r
432                                     queryResult += flow.getFlowId().toString() + flow.getFlowName().toString() + flow.getMatchItem().toString() + flow.getProperty().toString();\r
433                                 }\r
434                                 if (operator == 5 && matchItem.getMatchItemValue().getIntValue()>=queryCondition.getQueryConditionTargetValue().getIntValue())\r
435                                 {\r
436                                     queryResult += flow.getFlowId().toString() + flow.getFlowName().toString() + flow.getMatchItem().toString() + flow.getProperty().toString();\r
437                                 }\r
438                                 if (operator == 6 )\r
439                                 {\r
440                                     //todo\r
441                                 }\r
442                             }\r
443                         }\r
444                     }\r
445                 }\r
446             }\r
447         }\r
448 \r
449         return queryResult;\r
450     }\r
451 \r
452     private String operationsInstanceQuery(UserId userId, QueryCondition queryCondition)\r
453     {\r
454         String queryResult = null;\r
455         fetchOperationsInstance(userId);\r
456         List<Operation> operationList = operations.getOperation();\r
457 \r
458         //todo\r
459 \r
460       return queryResult;\r
461     }\r
462 \r
463 \r
464     private void fetchObjectsInstance(UserId userId)\r
465     {\r
466         UserKey userKey = new UserKey(userId);\r
467         InstanceIdentifier<Objects> objectsId = InstanceIdentifier.builder(Users.class).child(User.class, userKey).child(Objects.class).build();\r
468         ListenableFuture<Optional<Objects>> objectsFuture = dataBroker.newReadOnlyTransaction().read(LogicalDatastoreType.CONFIGURATION, objectsId);\r
469         Futures.addCallback(objectsFuture, new FutureCallback<Optional<Objects>>() {\r
470             @Override\r
471             public void onSuccess(Optional<Objects> result)\r
472             {\r
473                 setObjects(result.get());\r
474                 return;\r
475             }\r
476 \r
477             @Override\r
478             public void onFailure(Throwable t)\r
479             {\r
480                 LOG.error("Can not read objects instances.", t);\r
481 \r
482                 return;\r
483             }\r
484         });\r
485     }\r
486 \r
487     private void fetchOperationsInstance(UserId userId)\r
488     {\r
489         UserKey userKey = new UserKey(userId);\r
490         InstanceIdentifier<Operations> operationsId = InstanceIdentifier.builder(Users.class).child(User.class, userKey).child(Operations.class).build();\r
491         ListenableFuture<Optional<Operations>> operationsFuture = dataBroker.newReadOnlyTransaction().read(LogicalDatastoreType.CONFIGURATION, operationsId);\r
492         Futures.addCallback(operationsFuture, new FutureCallback<Optional<Operations>>() {\r
493             @Override\r
494             public void onSuccess(Optional<Operations> result)\r
495             {\r
496                 setOperations(result.get());\r
497                 return;\r
498             }\r
499 \r
500             @Override\r
501             public void onFailure(Throwable t)\r
502             {\r
503                 LOG.error("Can not read operations instances.", t);\r
504 \r
505                 return;\r
506             }\r
507         });\r
508     }\r
509 \r
510     private void setObjects(Objects objects)\r
511     {\r
512         this.objects = objects;\r
513     }\r
514     private void setOperations(Operations operations)\r
515     {\r
516         this.operations = operations;\r
517     }\r
518 \r
519 }\r