2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.policy.pap.xacml.rest.components;
24 import java.net.URISyntaxException;
25 import java.nio.file.Path;
26 import java.nio.file.Paths;
27 import java.util.HashMap;
28 import java.util.LinkedList;
29 import java.util.List;
32 import javax.persistence.EntityManager;
33 import javax.persistence.Query;
35 import oasis.names.tc.xacml._3_0.core.schema.wd_17.AdviceExpressionType;
36 import oasis.names.tc.xacml._3_0.core.schema.wd_17.AdviceExpressionsType;
37 import oasis.names.tc.xacml._3_0.core.schema.wd_17.AllOfType;
38 import oasis.names.tc.xacml._3_0.core.schema.wd_17.AnyOfType;
39 import oasis.names.tc.xacml._3_0.core.schema.wd_17.ApplyType;
40 import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeAssignmentExpressionType;
41 import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType;
42 import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeValueType;
43 import oasis.names.tc.xacml._3_0.core.schema.wd_17.ConditionType;
44 import oasis.names.tc.xacml._3_0.core.schema.wd_17.EffectType;
45 import oasis.names.tc.xacml._3_0.core.schema.wd_17.MatchType;
46 import oasis.names.tc.xacml._3_0.core.schema.wd_17.ObjectFactory;
47 import oasis.names.tc.xacml._3_0.core.schema.wd_17.PolicyType;
48 import oasis.names.tc.xacml._3_0.core.schema.wd_17.RuleType;
49 import oasis.names.tc.xacml._3_0.core.schema.wd_17.TargetType;
50 import oasis.names.tc.xacml._3_0.core.schema.wd_17.VariableDefinitionType;
51 import oasis.names.tc.xacml._3_0.core.schema.wd_17.VariableReferenceType;
53 import org.openecomp.policy.common.logging.eelf.MessageCodes;
54 import org.openecomp.policy.common.logging.eelf.PolicyLogger;
55 import org.openecomp.policy.pap.xacml.rest.XACMLPapServlet;
56 import org.openecomp.policy.pap.xacml.rest.util.JPAUtils;
57 import org.openecomp.policy.rest.adapter.PolicyRestAdapter;
58 import org.openecomp.policy.rest.jpa.Datatype;
59 import org.openecomp.policy.rest.jpa.DecisionSettings;
60 import org.openecomp.policy.rest.jpa.FunctionDefinition;
61 import org.openecomp.policy.xacml.std.pip.engines.aaf.AAFEngine;
63 import com.att.research.xacml.std.IdentifierImpl;
65 public class DecisionPolicy extends Policy {
67 public static final String FUNCTION_NOT = "urn:oasis:names:tc:xacml:1.0:function:not";
68 private static final String AAFProvider = "AAF";
70 List<String> dynamicLabelRuleAlgorithms = new LinkedList<String>();
71 List<String> dynamicFieldComboRuleAlgorithms = new LinkedList<String>();
72 List<String> dynamicFieldOneRuleAlgorithms = new LinkedList<String>();
73 List<String> dynamicFieldTwoRuleAlgorithms = new LinkedList<String>();
74 List<String> dataTypeList = new LinkedList<String>();
76 protected Map<String, String> dropDownMap = new HashMap<String, String>();
79 public DecisionPolicy() {
83 public DecisionPolicy(PolicyRestAdapter policyAdapter){
84 this.policyAdapter = policyAdapter;
88 public Map<String, String> savePolicies() throws Exception {
90 Map<String, String> successMap = new HashMap<String,String>();
92 successMap.put("EXISTS", "This Policy already exist on the PAP");
96 if(!isPreparedToSave()){
97 //Prep and configure the policy for saving
101 // Until here we prepared the data and here calling the method to create xml.
102 Path newPolicyPath = null;
103 newPolicyPath = Paths.get(policyAdapter.getNewFileName());
105 successMap = createPolicy(newPolicyPath,getCorrectPolicyDataObject());
109 //This is the method for preparing the policy for saving. We have broken it out
110 //separately because the fully configured policy is used for multiple things
112 public boolean prepareToSave() throws Exception{
114 if(isPreparedToSave()){
115 //we have already done this
120 String policyID = policyAdapter.getPolicyID();
121 version = policyAdapter.getHighestVersion();
123 // Create the Instance for pojo, PolicyType object is used in marshalling.
124 if (policyAdapter.getPolicyType().equals("Decision")) {
125 PolicyType policyConfig = new PolicyType();
127 policyConfig.setVersion(Integer.toString(version));
128 policyConfig.setPolicyId(policyID);
129 policyConfig.setTarget(new TargetType());
130 policyAdapter.setData(policyConfig);
132 policyName = policyAdapter.getNewFileName();
134 if (policyAdapter.getData() != null) {
135 PolicyType decisionPolicy = (PolicyType) policyAdapter.getData();
137 decisionPolicy.setDescription(policyAdapter.getPolicyDescription());
139 decisionPolicy.setRuleCombiningAlgId(policyAdapter.getRuleCombiningAlgId());
140 AllOfType allOfOne = new AllOfType();
141 String fileName = policyAdapter.getNewFileName();
142 String name = fileName.substring(fileName.lastIndexOf("\\") + 1, fileName.length());
143 if ((name == null) || (name.equals(""))) {
144 name = fileName.substring(fileName.lastIndexOf("/") + 1, fileName.length());
146 allOfOne.getMatch().add(createMatch("PolicyName", name));
148 AllOfType allOf = new AllOfType();
151 allOf.getMatch().add(createMatch("ECOMPName", (policyAdapter.getEcompName())));
153 Map<String, String> dynamicFieldComponentAttributes = policyAdapter.getDynamicFieldConfigAttributes();
154 if(policyAdapter.getRuleProvider()!=null && policyAdapter.getRuleProvider().equals(AAFProvider)){
155 dynamicFieldComponentAttributes = new HashMap<String,String>();
158 // If there is any dynamic field attributes create the matches here
159 for (String keyField : dynamicFieldComponentAttributes.keySet()) {
160 String key = keyField;
161 String value = dynamicFieldComponentAttributes.get(key);
162 MatchType dynamicMatch = createDynamicMatch(key, value);
163 allOf.getMatch().add(dynamicMatch);
166 AnyOfType anyOf = new AnyOfType();
167 anyOf.getAllOf().add(allOfOne);
168 anyOf.getAllOf().add(allOf);
170 TargetType target = new TargetType();
171 target.getAnyOf().add(anyOf);
172 decisionPolicy.setTarget(target);
174 Map<String, String> dynamicFieldDecisionSettings = policyAdapter.getDynamicSettingsMap();
176 //dynamicVariableList = policyAdapter.getDynamicVariableList();
177 if(policyAdapter.getProviderComboBox()!=null && policyAdapter.getProviderComboBox().equals(AAFProvider)){
178 dynamicFieldDecisionSettings = new HashMap<String,String>();
181 // settings are dynamic so check how many rows are added and add all
182 for (String keyField : dynamicFieldDecisionSettings.keySet()) {
183 String key = keyField;
184 String value = dynamicFieldDecisionSettings.get(key);
185 //String dataType = (String) dynamicVariableList.get(counter);
186 String dataType = getDataType(key);
187 VariableDefinitionType dynamicVariable = createDynamicVariable(key, value, dataType);
188 decisionPolicy.getCombinerParametersOrRuleCombinerParametersOrVariableDefinition().add(dynamicVariable);
191 createRule(decisionPolicy, true);
192 createRule(decisionPolicy, false);
195 setPreparedToSave(true);
199 private DecisionSettings findDecisionSettingsBySettingId(String settingId) {
200 DecisionSettings decisionSetting = null;
202 EntityManager em = XACMLPapServlet.getEmf().createEntityManager();
203 Query getDecisionSettings = em.createNamedQuery("DecisionSettings.findAll");
204 List<?> decisionSettingsList = getDecisionSettings.getResultList();
206 for (Object id : decisionSettingsList) {
207 decisionSetting = (DecisionSettings) id;
208 if (decisionSetting.getXacmlId().equals(settingId)) {
212 return decisionSetting;
215 private void createRule(PolicyType decisionPolicy, boolean permitRule) {
216 RuleType rule = new RuleType();
218 rule.setRuleId(policyAdapter.getRuleID());
221 rule.setEffect(EffectType.PERMIT);
223 rule.setEffect(EffectType.DENY);
225 rule.setTarget(new TargetType());
227 // Create Target in Rule
228 AllOfType allOfInRule = new AllOfType();
230 // Creating match for ACCESS in rule target
231 MatchType accessMatch = new MatchType();
232 AttributeValueType accessAttributeValue = new AttributeValueType();
233 accessAttributeValue.setDataType(STRING_DATATYPE);
234 accessAttributeValue.getContent().add("DECIDE");
235 accessMatch.setAttributeValue(accessAttributeValue);
236 AttributeDesignatorType accessAttributeDesignator = new AttributeDesignatorType();
237 URI accessURI = null;
239 accessURI = new URI(ACTION_ID);
240 } catch (URISyntaxException e) {
241 PolicyLogger.error(MessageCodes.ERROR_DATA_ISSUE, e, "DecisionPolicy", "Exception creating ACCESS URI");
243 accessAttributeDesignator.setCategory(CATEGORY_ACTION);
244 accessAttributeDesignator.setDataType(STRING_DATATYPE);
245 accessAttributeDesignator.setAttributeId(new IdentifierImpl(accessURI).stringValue());
246 accessMatch.setAttributeDesignator(accessAttributeDesignator);
247 accessMatch.setMatchId(FUNCTION_STRING_EQUAL_IGNORE);
249 dynamicLabelRuleAlgorithms = policyAdapter.getDynamicRuleAlgorithmLabels();
250 dynamicFieldComboRuleAlgorithms = policyAdapter.getDynamicRuleAlgorithmCombo();
251 dynamicFieldOneRuleAlgorithms = policyAdapter.getDynamicRuleAlgorithmField1();
252 dynamicFieldTwoRuleAlgorithms = policyAdapter.getDynamicRuleAlgorithmField2();
253 dropDownMap = createDropDownMap();
255 if(policyAdapter.getRuleProvider()!=null && policyAdapter.getRuleProvider().equals(AAFProvider)){
256 // Values for AAF Provider are here for XML Creation.
257 ConditionType condition = new ConditionType();
258 ApplyType decisionApply = new ApplyType();
259 String selectedFunction = "boolean-equal";
261 AttributeValueType value1 = new AttributeValueType();
262 value1.setDataType(BOOLEAN_DATATYPE);
263 value1.getContent().add("true");
265 AttributeDesignatorType value2 = new AttributeDesignatorType();
266 value2.setAttributeId(AAFEngine.AAF_RESULT);
267 value2.setCategory(CATEGORY_RESOURCE);
268 value2.setDataType(BOOLEAN_DATATYPE);
269 value2.setMustBePresent(false);
271 ApplyType innerDecisionApply = new ApplyType();
272 innerDecisionApply.setFunctionId(FUNCTION_BOOLEAN_ONE_AND_ONLY);
273 innerDecisionApply.getExpression().add(new ObjectFactory().createAttributeDesignator(value2));
275 decisionApply.setFunctionId(dropDownMap.get(selectedFunction));
276 decisionApply.getExpression().add(new ObjectFactory().createAttributeValue(value1));
277 decisionApply.getExpression().add(new ObjectFactory().createApply(innerDecisionApply));
278 condition.setExpression(new ObjectFactory().createApply(decisionApply));
280 ApplyType notOuterApply = new ApplyType();
281 notOuterApply.setFunctionId(FUNCTION_NOT);
282 notOuterApply.getExpression().add(condition.getExpression());
283 condition.setExpression(new ObjectFactory().createApply(notOuterApply));
285 rule.setCondition(condition);
286 allOfInRule.getMatch().add(accessMatch);
288 AnyOfType anyOfInRule = new AnyOfType();
289 anyOfInRule.getAllOf().add(allOfInRule);
291 TargetType targetInRule = new TargetType();
292 targetInRule.getAnyOf().add(anyOfInRule);
294 rule.setTarget(targetInRule);
296 AdviceExpressionsType adviceExpressions = new AdviceExpressionsType();
297 AdviceExpressionType adviceExpression = new AdviceExpressionType();
298 adviceExpression.setAdviceId(AAFProvider);
299 adviceExpression.setAppliesTo(EffectType.DENY);
300 AttributeAssignmentExpressionType assignment = new AttributeAssignmentExpressionType();
301 assignment.setAttributeId("aaf.response");
302 assignment.setCategory(CATEGORY_RESOURCE);
303 AttributeDesignatorType value = new AttributeDesignatorType();
304 value.setAttributeId(AAFEngine.AAF_RESPONSE);
305 value.setCategory(CATEGORY_RESOURCE);
306 value.setDataType(STRING_DATATYPE);
307 value.setMustBePresent(false);
308 assignment.setExpression(new ObjectFactory().createAttributeDesignator(value));
309 adviceExpression.getAttributeAssignmentExpression().add(assignment);
310 adviceExpressions.getAdviceExpression().add(adviceExpression);
311 rule.setAdviceExpressions(adviceExpressions);
313 decisionPolicy.getCombinerParametersOrRuleCombinerParametersOrVariableDefinition().add(rule);
314 policyAdapter.setPolicyData(decisionPolicy);
316 }else if (dynamicLabelRuleAlgorithms != null && dynamicLabelRuleAlgorithms.size() > 0) {
317 boolean isCompound = false;
318 ConditionType condition = new ConditionType();
319 int index = dynamicFieldOneRuleAlgorithms.size() - 1;
321 for (String labelAttr : dynamicLabelRuleAlgorithms) {
322 // if the rule algorithm as a label means it is a compound
323 if (dynamicFieldOneRuleAlgorithms.get(index).toString().equals(labelAttr)) {
324 ApplyType decisionApply = new ApplyType();
326 String selectedFunction = (String) dynamicFieldComboRuleAlgorithms.get(index).toString();
327 String value1 = (String) dynamicFieldOneRuleAlgorithms.get(index).toString();
328 String value2 = dynamicFieldTwoRuleAlgorithms.get(index).toString();
329 decisionApply.setFunctionId(dropDownMap.get(selectedFunction));
330 decisionApply.getExpression().add(new ObjectFactory().createApply(getInnerDecisionApply(value1)));
331 decisionApply.getExpression().add(new ObjectFactory().createApply(getInnerDecisionApply(value2)));
332 condition.setExpression(new ObjectFactory().createApply(decisionApply));
336 // if rule algorithm not a compound
338 condition.setExpression(new ObjectFactory().createApply(getInnerDecisionApply(dynamicLabelRuleAlgorithms.get(index).toString())));
342 ApplyType notOuterApply = new ApplyType();
343 notOuterApply.setFunctionId(FUNCTION_NOT);
344 notOuterApply.getExpression().add(condition.getExpression());
345 condition.setExpression(new ObjectFactory().createApply(notOuterApply));
347 rule.setCondition(condition);
348 allOfInRule.getMatch().add(accessMatch);
350 AnyOfType anyOfInRule = new AnyOfType();
351 anyOfInRule.getAllOf().add(allOfInRule);
353 TargetType targetInRule = new TargetType();
354 targetInRule.getAnyOf().add(anyOfInRule);
356 rule.setTarget(targetInRule);
358 decisionPolicy.getCombinerParametersOrRuleCombinerParametersOrVariableDefinition().add(rule);
359 policyAdapter.setPolicyData(decisionPolicy);
362 PolicyLogger.error(MessageCodes.ERROR_DATA_ISSUE + "Unsupported data object."+ policyAdapter.getData().getClass().getCanonicalName());
367 // if compound setting the inner apply here
368 protected ApplyType getInnerDecisionApply(String value1Label) {
369 ApplyType decisionApply = new ApplyType();
371 // check the index for the label.
372 for (String labelAttr : dynamicLabelRuleAlgorithms) {
373 if (labelAttr.equals(value1Label)) {
374 String value1 = (String) dynamicFieldOneRuleAlgorithms.get(index).toString();
375 populateDataTypeList(value1);
377 // check if the row contains label again
378 for (String labelValue : dynamicLabelRuleAlgorithms) {
379 if (labelValue.equals(value1)) {
380 return getCompoundDecisionApply(index);
384 // Getting the values from the form.
385 String functionKey = (String) dynamicFieldComboRuleAlgorithms.get(index).toString();
386 String value2 = dynamicFieldTwoRuleAlgorithms.get(index).toString();
387 decisionApply.setFunctionId(dropDownMap.get(functionKey));
388 // if two text field are rule attributes.
389 if ((value1.contains(RULE_VARIABLE)) && (value2.contains(RULE_VARIABLE))) {
390 ApplyType innerDecisionApply1 = new ApplyType();
391 ApplyType innerDecisionApply2 = new ApplyType();
392 AttributeDesignatorType attributeDesignator1 = new AttributeDesignatorType();
393 AttributeDesignatorType attributeDesignator2 = new AttributeDesignatorType();
394 //If selected function is Integer function set integer functionID
395 if(functionKey.toLowerCase().contains("integer")){
396 innerDecisionApply1.setFunctionId(FUNTION_INTEGER_ONE_AND_ONLY );
397 innerDecisionApply2.setFunctionId(FUNTION_INTEGER_ONE_AND_ONLY);
398 attributeDesignator1.setDataType(INTEGER_DATATYPE);
399 attributeDesignator2.setDataType(INTEGER_DATATYPE);
401 //If selected function is not a Integer function set String functionID
402 innerDecisionApply1.setFunctionId(FUNCTION_STRING_ONE_AND_ONLY);
403 innerDecisionApply2.setFunctionId(FUNCTION_STRING_ONE_AND_ONLY);
404 attributeDesignator1.setDataType(STRING_DATATYPE);
405 attributeDesignator2.setDataType(STRING_DATATYPE);
407 attributeDesignator1.setCategory(CATEGORY_RESOURCE);
408 attributeDesignator2.setCategory(CATEGORY_RESOURCE);
409 //Here set actual field values
410 attributeDesignator1.setAttributeId(value1. contains("resource:")?value1.substring( 9):value1.substring(8));
411 attributeDesignator2.setAttributeId(value1. contains("resource:")?value1.substring( 9):value1.substring(8));
412 innerDecisionApply1.getExpression().add(new ObjectFactory().createAttributeDesignator( attributeDesignator1));
413 innerDecisionApply2.getExpression().add(new ObjectFactory().createAttributeDesignator( attributeDesignator2));
414 decisionApply.getExpression().add(new ObjectFactory().createApply(innerDecisionApply1));
415 decisionApply.getExpression().add(new ObjectFactory().createApply(innerDecisionApply2));
417 // if either of one text field is rule attribute.
418 if (!value1.startsWith("S_")) {
419 ApplyType innerDecisionApply = new ApplyType();
420 AttributeDesignatorType attributeDesignator = new AttributeDesignatorType();
421 AttributeValueType decisionConditionAttributeValue = new AttributeValueType();
423 if (functionKey.toLowerCase().contains("integer")) {
424 innerDecisionApply.setFunctionId(FUNTION_INTEGER_ONE_AND_ONLY);
425 decisionConditionAttributeValue.setDataType(INTEGER_DATATYPE);
426 attributeDesignator.setDataType(INTEGER_DATATYPE);
428 innerDecisionApply.setFunctionId(FUNCTION_STRING_ONE_AND_ONLY);
429 decisionConditionAttributeValue.setDataType(STRING_DATATYPE);
430 attributeDesignator.setDataType(STRING_DATATYPE);
433 String attributeId = null;
434 String attributeValue = null;
436 // Find which textField has rule attribute and set it as
437 // attributeId and the other as attributeValue.
438 attributeId = value1;
439 attributeValue = value2;
441 if (attributeId != null) {
442 attributeDesignator.setCategory(CATEGORY_RESOURCE);
443 attributeDesignator.setAttributeId(attributeId);
445 decisionConditionAttributeValue.getContent().add(attributeValue);
446 innerDecisionApply.getExpression().add(new ObjectFactory().createAttributeDesignator(attributeDesignator));
447 decisionApply.getExpression().add(new ObjectFactory().createAttributeValue(decisionConditionAttributeValue));
448 decisionApply.getExpression().add(new ObjectFactory().createApply(innerDecisionApply));
450 value1 = value1.substring(2, value1.length());
451 VariableReferenceType variableReferenceType = new VariableReferenceType();
452 variableReferenceType.setVariableId(value1);
454 String dataType = dataTypeList.get(index);
456 AttributeValueType decisionConditionAttributeValue = new AttributeValueType();
457 decisionConditionAttributeValue.setDataType(dataType);
458 decisionConditionAttributeValue.getContent().add(value2);
459 decisionApply.getExpression().add(new ObjectFactory().createVariableReference(variableReferenceType));
460 decisionApply.getExpression().add(new ObjectFactory().createAttributeValue(decisionConditionAttributeValue));
466 return decisionApply;
469 // if the rule algorithm is multiple compound one setting the apply
470 protected ApplyType getCompoundDecisionApply(int index) {
471 ApplyType decisionApply = new ApplyType();
472 String selectedFunction = dynamicFieldComboRuleAlgorithms.get(index).toString();
473 String value1 = dynamicFieldOneRuleAlgorithms.get(index).toString();
474 String value2 = dynamicFieldTwoRuleAlgorithms.get(index).toString();
475 decisionApply.setFunctionId(dropDownMap.get(selectedFunction));
476 decisionApply.getExpression().add(new ObjectFactory().createApply(getInnerDecisionApply(value1)));
477 decisionApply.getExpression().add(new ObjectFactory().createApply(getInnerDecisionApply(value2)));
478 return decisionApply;
481 private VariableDefinitionType createDynamicVariable(String key, String value, String dataType) {
482 VariableDefinitionType dynamicVariable = new VariableDefinitionType();
483 AttributeValueType dynamicAttributeValue = new AttributeValueType();
485 dynamicAttributeValue.setDataType(dataType);
486 dynamicAttributeValue.getContent().add(value);
488 dynamicVariable.setVariableId(key);
489 dynamicVariable.setExpression(new ObjectFactory().createAttributeValue(dynamicAttributeValue));
491 return dynamicVariable;
495 private void populateDataTypeList(String value1) {
497 ///String value1 = dynamicFieldDecisionOneRuleAlgorithms.get(index).getValue().toString();
498 String dataType = null;
500 if(value1.contains("S_")) {
501 value1 = value1.substring(2, value1.length());
502 DecisionSettings decisionSettings = findDecisionSettingsBySettingId(value1);
503 if (decisionSettings != null && decisionSettings.getDatatypeBean().getShortName().equals("string")) {
504 dataType = STRING_DATATYPE;
505 } else if (decisionSettings != null && decisionSettings.getDatatypeBean().getShortName().equals("boolean")) {
506 dataType = BOOLEAN_DATATYPE;
508 dataType = INTEGER_DATATYPE;
514 dataTypeList.add(dataType);
517 private Map<String,String> createDropDownMap(){
518 JPAUtils jpaUtils = null;
520 jpaUtils = JPAUtils.getJPAUtilsInstance(XACMLPapServlet.getEmf());
521 } catch (Exception e) {
524 Map<Datatype, List<FunctionDefinition>> functionMap = jpaUtils.getFunctionDatatypeMap();
525 Map<String, String> dropDownMap = new HashMap<String, String>();
526 for (Datatype id : functionMap.keySet()) {
527 List<FunctionDefinition> functionDefinitions = (List<FunctionDefinition>) functionMap
529 for (FunctionDefinition functionDef : functionDefinitions) {
530 dropDownMap.put(functionDef.getShortname(),functionDef.getXacmlid());
537 private String getDataType(String key) {
539 DecisionSettings decisionSettings = findDecisionSettingsBySettingId(key);
540 String dataType = null;
542 if (decisionSettings != null && decisionSettings.getDatatypeBean().getShortName().equals("string")) {
543 dataType = STRING_DATATYPE;
544 } else if (decisionSettings != null && decisionSettings.getDatatypeBean().getShortName().equals("boolean")) {
545 dataType = BOOLEAN_DATATYPE;
547 dataType = INTEGER_DATATYPE;
554 public Object getCorrectPolicyDataObject() {
555 return policyAdapter.getData();