summaryrefslogtreecommitdiffstats
path: root/model/policy-model
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2018-09-04 20:13:38 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-04 20:13:38 +0000
commitf7689b84472ab4698d9d96f1de08402208d99ca8 (patch)
treef003c5aef834f2158726ab678eb9a76e1ae37dac /model/policy-model
parent25ac320ced13ae5da0e55db5404f62237bdaa491 (diff)
parent87be30582d1db37bee7c6b456c0c5c3ca9584963 (diff)
Merge "Fix checkstyle issues in apex model basic"
Diffstat (limited to 'model/policy-model')
-rw-r--r--model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxLogic.java10
-rw-r--r--model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicy.java4
-rw-r--r--model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicyModel.java32
-rw-r--r--model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxState.java6
-rw-r--r--model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateTaskReference.java2
-rw-r--r--model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateTree.java2
-rw-r--r--model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java2
-rw-r--r--model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalysisResult.java4
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/DummyLogicReader.java3
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestLogic.java4
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicies.java8
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicyModel.java2
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestState.java4
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateOutput.java4
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateTaskReference.java4
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTaskParameter.java4
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTasks.java10
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/TestApexPolicyModel.java14
-rw-r--r--model/policy-model/src/test/resources/META-INF/persistence.xml4
19 files changed, 60 insertions, 63 deletions
diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxLogic.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxLogic.java
index a537d90b9..2fc4467dc 100644
--- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxLogic.java
+++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxLogic.java
@@ -42,7 +42,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationMessage;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
-import org.onap.policy.apex.model.basicmodel.dao.converters.CDATAConditioner;
+import org.onap.policy.apex.model.basicmodel.dao.converters.CDataConditioner;
import org.onap.policy.apex.model.basicmodel.xml.AxReferenceKeyAdapter;
import org.onap.policy.apex.model.utilities.Assertions;
@@ -99,8 +99,8 @@ public class AxLogic extends AxConcept {
private String logicFlavour;
@Column(name = "logic", length = MAX_LOGIC_SIZE)
- @Convert(converter = CDATAConditioner.class)
- @XmlJavaTypeAdapter(value = CDATAConditioner.class)
+ @Convert(converter = CDataConditioner.class)
+ @XmlJavaTypeAdapter(value = CDataConditioner.class)
@XmlElement(required = true)
private String logic;
@@ -385,8 +385,8 @@ public class AxLogic extends AxConcept {
if (!logicFlavour.equals(other.logicFlavour)) {
return false;
}
- final String thislogic = CDATAConditioner.clean(logic).replaceAll("\n", "");
- final String otherlogic = CDATAConditioner.clean(other.logic).replaceAll("\n", "");
+ final String thislogic = CDataConditioner.clean(logic).replaceAll("\n", "");
+ final String otherlogic = CDataConditioner.clean(other.logic).replaceAll("\n", "");
return thislogic.equals(otherlogic);
}
diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicy.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicy.java
index ff7e4a23f..8b87c41ce 100644
--- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicy.java
+++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicy.java
@@ -303,7 +303,7 @@ public class AxPolicy extends AxConcept {
// Validation continues from this point only if all validation checks this far have been
// passed
- if (!result.isOK()) {
+ if (!result.isOk()) {
return result;
}
@@ -361,7 +361,7 @@ public class AxPolicy extends AxConcept {
&& !stateMap.containsKey(stateOutput.getNextState().getLocalName())) {
result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
" nextState of state " + stateEntry.getKey() + " not found in StateMap: "
- + stateOutput.getNextState().getID()));
+ + stateOutput.getNextState().getId()));
}
}
diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicyModel.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicyModel.java
index f6000b1f3..ad465a48e 100644
--- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicyModel.java
+++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicyModel.java
@@ -382,7 +382,7 @@ public class AxPolicyModel extends AxModel {
if (getSchemas().get(field.getSchema()) == null) {
result.addValidationMessage(
new AxValidationMessage(event.getKey(), this.getClass(), ValidationResult.INVALID,
- "event field data type " + field.getSchema().getID() + DOES_NOT_EXIST));
+ "event field data type " + field.getSchema().getId() + DOES_NOT_EXIST));
}
}
}
@@ -400,7 +400,7 @@ public class AxPolicyModel extends AxModel {
if (getSchemas().get(contextAlbum.getItemSchema()) == null) {
result.addValidationMessage(
new AxValidationMessage(contextAlbum.getKey(), this.getClass(), ValidationResult.INVALID,
- "context album schema " + contextAlbum.getItemSchema().getID() + DOES_NOT_EXIST));
+ "context album schema " + contextAlbum.getItemSchema().getId() + DOES_NOT_EXIST));
}
}
return result;
@@ -431,20 +431,20 @@ public class AxPolicyModel extends AxModel {
if (getSchemas().get(field.getSchema()) == null) {
result.addValidationMessage(
new AxValidationMessage(task.getKey(), this.getClass(), ValidationResult.INVALID,
- "task input field schema " + field.getSchema().getID() + DOES_NOT_EXIST));
+ "task input field schema " + field.getSchema().getId() + DOES_NOT_EXIST));
}
}
for (final AxField field : task.getOutputFieldSet()) {
if (getSchemas().get(field.getSchema()) == null) {
result.addValidationMessage(
new AxValidationMessage(task.getKey(), this.getClass(), ValidationResult.INVALID,
- "task output field schema " + field.getSchema().getID() + DOES_NOT_EXIST));
+ "task output field schema " + field.getSchema().getId() + DOES_NOT_EXIST));
}
}
for (final AxArtifactKey contextAlbumKey : task.getContextAlbumReferences()) {
if (albums.get(contextAlbumKey) == null) {
result.addValidationMessage(new AxValidationMessage(task.getKey(), this.getClass(),
- ValidationResult.INVALID, "task context album " + contextAlbumKey.getID() + DOES_NOT_EXIST));
+ ValidationResult.INVALID, "task context album " + contextAlbumKey.getId() + DOES_NOT_EXIST));
}
}
return result;
@@ -476,20 +476,20 @@ public class AxPolicyModel extends AxModel {
for (final AxArtifactKey contextAlbumKey : state.getContextAlbumReferences()) {
if (albums.get(contextAlbumKey) == null) {
result.addValidationMessage(new AxValidationMessage(state.getKey(), this.getClass(),
- ValidationResult.INVALID, "state context album " + contextAlbumKey.getID() + DOES_NOT_EXIST));
+ ValidationResult.INVALID, "state context album " + contextAlbumKey.getId() + DOES_NOT_EXIST));
}
}
final AxEvent triggerEvent = events.getEventMap().get(state.getTrigger());
if (triggerEvent == null) {
result.addValidationMessage(new AxValidationMessage(state.getKey(), this.getClass(),
- ValidationResult.INVALID, "state trigger event " + state.getTrigger().getID() + DOES_NOT_EXIST));
+ ValidationResult.INVALID, "state trigger event " + state.getTrigger().getId() + DOES_NOT_EXIST));
}
final AxTask defaultTask = tasks.getTaskMap().get(state.getDefaultTask());
if (defaultTask == null) {
result.addValidationMessage(new AxValidationMessage(state.getKey(), this.getClass(),
- ValidationResult.INVALID, "state default task " + state.getDefaultTask().getID() + DOES_NOT_EXIST));
+ ValidationResult.INVALID, "state default task " + state.getDefaultTask().getId() + DOES_NOT_EXIST));
}
// Check task input fields and event fields are compatible for default tasks with no task
@@ -501,15 +501,15 @@ public class AxPolicyModel extends AxModel {
for (final AxField unhandledTaskInputField : unhandledTaskInputFields) {
result.addValidationMessage(new AxValidationMessage(state.getKey(), this.getClass(),
ValidationResult.INVALID, "task input field " + unhandledTaskInputField + " for task "
- + defaultTask.getID() + " not in trigger event " + triggerEvent.getID()));
+ + defaultTask.getId() + " not in trigger event " + triggerEvent.getId()));
}
}
for (final AxStateOutput stateOutput : state.getStateOutputs().values()) {
if (events.getEventMap().get(stateOutput.getOutgingEvent()) == null) {
result.addValidationMessage(new AxValidationMessage(stateOutput.getKey(), this.getClass(),
- ValidationResult.INVALID, "output event " + stateOutput.getOutgingEvent().getID()
- + " for state output " + stateOutput.getID() + DOES_NOT_EXIST));
+ ValidationResult.INVALID, "output event " + stateOutput.getOutgingEvent().getId()
+ + " for state output " + stateOutput.getId() + DOES_NOT_EXIST));
}
}
@@ -534,7 +534,7 @@ public class AxPolicyModel extends AxModel {
final AxTask usedTask = tasks.getTaskMap().get(taskRefEntry.getKey());
if (usedTask == null) {
result.addValidationMessage(new AxValidationMessage(state.getKey(), this.getClass(),
- ValidationResult.INVALID, "state task " + taskRefEntry.getKey().getID() + DOES_NOT_EXIST));
+ ValidationResult.INVALID, "state task " + taskRefEntry.getKey().getId() + DOES_NOT_EXIST));
} else {
AxStateOutput stateOutput =
state.getStateOutputs().get(taskRefEntry.getValue().getOutput().getKey().getLocalName());
@@ -556,14 +556,14 @@ public class AxPolicyModel extends AxModel {
final AxStateOutput stateOutput, AxValidationResult result) {
if (stateOutput == null) {
result.addValidationMessage(new AxValidationMessage(state.getKey(), this.getClass(),
- ValidationResult.INVALID, "state output on task reference for task " + task.getID() + " is null"));
+ ValidationResult.INVALID, "state output on task reference for task " + task.getId() + " is null"));
} else {
final AxEvent usedEvent = events.getEventMap().get(stateOutput.getOutgingEvent());
if (usedEvent == null) {
result.addValidationMessage(new AxValidationMessage(stateOutput.getKey(), this.getClass(),
- ValidationResult.INVALID, "output event " + stateOutput.getOutgingEvent().getID()
- + " for state output " + stateOutput.getID() + DOES_NOT_EXIST));
+ ValidationResult.INVALID, "output event " + stateOutput.getOutgingEvent().getId()
+ + " for state output " + stateOutput.getId() + DOES_NOT_EXIST));
}
if (task != null && usedEvent != null) {
@@ -572,7 +572,7 @@ public class AxPolicyModel extends AxModel {
for (final AxField unhandledTaskOutputField : unhandledTaskOutputFields) {
result.addValidationMessage(new AxValidationMessage(state.getKey(), this.getClass(),
ValidationResult.INVALID, "task output field " + unhandledTaskOutputField + " for task "
- + task.getID() + " not in output event " + usedEvent.getID()));
+ + task.getId() + " not in output event " + usedEvent.getId()));
}
}
}
diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxState.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxState.java
index 895232e1c..6851e4859 100644
--- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxState.java
+++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxState.java
@@ -685,7 +685,7 @@ public class AxState extends AxConcept {
if (!taskSelectionLogic.getKey().equals(AxReferenceKey.getNullKey())) {
if (!taskSelectionLogic.getKey().getParentReferenceKey().equals(key)) {
result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
- "taskSelectionLogic key " + taskSelectionLogic.getKey().getID() + DOES_NOT_EQUAL_STATE_KEY));
+ "taskSelectionLogic key " + taskSelectionLogic.getKey().getId() + DOES_NOT_EQUAL_STATE_KEY));
}
result = taskSelectionLogic.validate(result);
}
@@ -707,7 +707,7 @@ public class AxState extends AxConcept {
} else {
if (!stateFinalizerLogicEntry.getValue().getKey().getParentReferenceKey().equals(key)) {
result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
- "stateFinalizerLogic parent key " + stateFinalizerLogicEntry.getValue().getKey().getID()
+ "stateFinalizerLogic parent key " + stateFinalizerLogicEntry.getValue().getKey().getId()
+ DOES_NOT_EQUAL_STATE_KEY));
}
@@ -778,7 +778,7 @@ public class AxState extends AxConcept {
Set<String> stateFinalizerLogicNameSet, AxValidationResult result) {
if (!taskReference.getKey().getParentReferenceKey().equals(key)) {
result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
- "stateTaskReference parent key " + taskReference.getKey().getID() + DOES_NOT_EQUAL_STATE_KEY));
+ "stateTaskReference parent key " + taskReference.getKey().getId() + DOES_NOT_EQUAL_STATE_KEY));
}
if (taskReference.getStateTaskOutputType().equals(AxStateTaskOutputType.DIRECT)) {
diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateTaskReference.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateTaskReference.java
index 011af6cbb..8a43e371d 100644
--- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateTaskReference.java
+++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateTaskReference.java
@@ -269,7 +269,7 @@ public class AxStateTaskReference extends AxConcept {
if (output.equals(AxReferenceKey.getNullKey())) {
result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
- "output key " + output.getID() + " is a null key"));
+ "output key " + output.getId() + " is a null key"));
}
result = output.validate(result);
diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateTree.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateTree.java
index 30076ca0b..478608ca4 100644
--- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateTree.java
+++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateTree.java
@@ -73,7 +73,7 @@ public class AxStateTree implements Comparable<AxStateTree> {
// Check for state tree loops
if (referencedStateNameSet.contains(nextState.getKey())) {
- throw new PolicyRuntimeException("loop detected in state tree for policy " + policy.getID() + " state "
+ throw new PolicyRuntimeException("loop detected in state tree for policy " + policy.getId() + " state "
+ thisState.getKey().getLocalName() + ", next state " + nextState.getKey().getLocalName()
+ " referenced more than once");
}
diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java
index b1f26f6c0..f26331671 100644
--- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java
+++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java
@@ -483,7 +483,7 @@ public class AxTask extends AxConcept {
if (!taskLogic.getKey().getParentArtifactKey().equals(key)) {
result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
- "taskLogic parent key " + taskLogic.getKey().getID() + DOES_NOT_EQUAL_TASK_KEY));
+ "taskLogic parent key " + taskLogic.getKey().getId() + DOES_NOT_EQUAL_TASK_KEY));
}
return taskLogic.validate(result);
diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalysisResult.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalysisResult.java
index d59af7cba..2f5cd43d8 100644
--- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalysisResult.java
+++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalysisResult.java
@@ -212,7 +212,7 @@ public class PolicyAnalysisResult {
builder.append('\n');
for (final Entry<? extends AxKey, Set<AxKey>> usageEntry : usageMap.entrySet()) {
builder.append(" ");
- builder.append(usageEntry.getKey().getID());
+ builder.append(usageEntry.getKey().getId());
if (usageEntry.getValue().isEmpty()) {
builder.append(" (unused)\n");
continue;
@@ -221,7 +221,7 @@ public class PolicyAnalysisResult {
builder.append('\n');
for (final AxKey usageKey : usageEntry.getValue()) {
builder.append(" ");
- builder.append(usageKey.getID());
+ builder.append(usageKey.getId());
builder.append("\n");
}
}
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/DummyLogicReader.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/DummyLogicReader.java
index 28f70f48b..093ed483e 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/DummyLogicReader.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/DummyLogicReader.java
@@ -23,9 +23,6 @@ package org.onap.policy.apex.model.policymodel.concepts;
import org.onap.policy.apex.model.policymodel.concepts.AxLogic;
import org.onap.policy.apex.model.policymodel.concepts.AxLogicReader;
-/**
- * @author Liam Fallon (liam.fallon@ericsson.com)
- */
public class DummyLogicReader implements AxLogicReader {
/*
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestLogic.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestLogic.java
index a415a1c69..3b1fc6b8f 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestLogic.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestLogic.java
@@ -83,8 +83,8 @@ public class TestLogic {
final AxReferenceKey logicKey = new AxReferenceKey("LogicParentName", "0.0.1", "PLN", "LN");
logic.setKey(logicKey);
- assertEquals("LogicParentName:0.0.1:PLN:LN", logic.getKey().getID());
- assertEquals("LogicParentName:0.0.1:PLN:LN", logic.getKeys().get(0).getID());
+ assertEquals("LogicParentName:0.0.1:PLN:LN", logic.getKey().getId());
+ assertEquals("LogicParentName:0.0.1:PLN:LN", logic.getKeys().get(0).getId());
logic.setLogicFlavour("LogicFlavour");
assertEquals("LogicFlavour", logic.getLogicFlavour());
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicies.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicies.java
index 9da944b60..b2a3911bf 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicies.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicies.java
@@ -76,8 +76,8 @@ public class TestPolicies {
}
policy.setKey(policyKey);
- assertEquals("PolicyName:0.0.1", policy.getKey().getID());
- assertEquals("PolicyName:0.0.1", policy.getKeys().get(0).getID());
+ assertEquals("PolicyName:0.0.1", policy.getKey().getId());
+ assertEquals("PolicyName:0.0.1", policy.getKeys().get(0).getId());
try {
policy.setTemplate(null);
@@ -109,7 +109,7 @@ public class TestPolicies {
policy.setFirstState("FirstState");
assertEquals("FirstState", policy.getFirstState());
- assertEquals("PolicyName:0.0.1", policy.getKeys().get(0).getID());
+ assertEquals("PolicyName:0.0.1", policy.getKeys().get(0).getId());
policy = new TestApexPolicyModelCreator().getModel().getPolicies().get("policy");
@@ -269,7 +269,7 @@ public class TestPolicies {
// Invalid, no events in event map
policies.setKey(new AxArtifactKey("PoliciesKey", "0.0.1"));
- assertEquals("PoliciesKey:0.0.1", policies.getKey().getID());
+ assertEquals("PoliciesKey:0.0.1", policies.getKey().getId());
result = new AxValidationResult();
result = policies.validate(result);
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicyModel.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicyModel.java
index db1d1ee62..5df831cc7 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicyModel.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicyModel.java
@@ -75,7 +75,7 @@ public class TestPolicyModel {
model.register();
assertNotNull(model.getContextModel());
- assertEquals("ModelKey:0.0.1", model.getKeys().get(0).getID());
+ assertEquals("ModelKey:0.0.1", model.getKeys().get(0).getId());
model.clean();
assertNotNull(model);
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestState.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestState.java
index 1d62ae63a..c53fff1ca 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestState.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestState.java
@@ -86,8 +86,8 @@ public class TestState {
}
state.setKey(stateKey);
- assertEquals("PolicyName:0.0.1:NULL:StateName", state.getKey().getID());
- assertEquals("PolicyName:0.0.1:NULL:StateName", state.getKeys().get(0).getID());
+ assertEquals("PolicyName:0.0.1:NULL:StateName", state.getKey().getId());
+ assertEquals("PolicyName:0.0.1:NULL:StateName", state.getKeys().get(0).getId());
final AxStateOutput so0 = new AxStateOutput(new AxReferenceKey(stateKey, "SO0"), triggerKey, new AxReferenceKey());
final AxStateOutput soU = new AxStateOutput(new AxReferenceKey(stateKey, "SOU"), triggerKey, stateKeyNext);
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateOutput.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateOutput.java
index 5911d41be..5306b7642 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateOutput.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateOutput.java
@@ -60,8 +60,8 @@ public class TestStateOutput {
}
so.setKey(soKey);
- assertEquals("SOStateParent:0.0.1:SOState:SOName", so.getKey().getID());
- assertEquals("SOStateParent:0.0.1:SOState:SOName", so.getKeys().get(0).getID());
+ assertEquals("SOStateParent:0.0.1:SOState:SOName", so.getKey().getId());
+ assertEquals("SOStateParent:0.0.1:SOState:SOName", so.getKeys().get(0).getId());
try {
so.setNextState(null);
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateTaskReference.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateTaskReference.java
index c85fda4be..eeaf19e07 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateTaskReference.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateTaskReference.java
@@ -62,8 +62,8 @@ public class TestStateTaskReference {
}
stRef.setKey(stRefKey);
- assertEquals("StateParent:0.0.1:SOState:SOName", stRef.getKey().getID());
- assertEquals("StateParent:0.0.1:SOState:SOName", stRef.getKeys().get(0).getID());
+ assertEquals("StateParent:0.0.1:SOState:SOName", stRef.getKey().getId());
+ assertEquals("StateParent:0.0.1:SOState:SOName", stRef.getKeys().get(0).getId());
try {
stRef.setStateTaskOutputType(null);
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTaskParameter.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTaskParameter.java
index 63906add2..ff6ab42b8 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTaskParameter.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTaskParameter.java
@@ -49,8 +49,8 @@ public class TestTaskParameter {
final AxReferenceKey parKey = new AxReferenceKey("ParParentName", "0.0.1", "PLN", "LN");
par.setKey(parKey);
- assertEquals("ParParentName:0.0.1:PLN:LN", par.getKey().getID());
- assertEquals("ParParentName:0.0.1:PLN:LN", par.getKeys().get(0).getID());
+ assertEquals("ParParentName:0.0.1:PLN:LN", par.getKey().getId());
+ assertEquals("ParParentName:0.0.1:PLN:LN", par.getKeys().get(0).getId());
par.setDefaultValue("DefaultValue");
assertEquals("DefaultValue", par.getTaskParameterValue());
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTasks.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTasks.java
index 967e4e0aa..78691accb 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTasks.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTasks.java
@@ -67,8 +67,8 @@ public class TestTasks {
final AxArtifactKey taskKey = new AxArtifactKey("TaskName", "0.0.1");
task.setKey(taskKey);
- assertEquals("TaskName:0.0.1", task.getKey().getID());
- assertEquals("TaskName:0.0.1", task.getKeys().get(0).getID());
+ assertEquals("TaskName:0.0.1", task.getKey().getId());
+ assertEquals("TaskName:0.0.1", task.getKeys().get(0).getId());
final AxArtifactKey f0SchemaKey = new AxArtifactKey("FS0", "0.0.1");
@@ -114,8 +114,8 @@ public class TestTasks {
assertEquals(tl, task.getTaskLogic());
task.setKey(taskKey);
- assertEquals("TaskName:0.0.1", task.getKey().getID());
- assertEquals("TaskName:0.0.1", task.getKeys().get(0).getID());
+ assertEquals("TaskName:0.0.1", task.getKey().getId());
+ assertEquals("TaskName:0.0.1", task.getKeys().get(0).getId());
task.afterUnmarshal(null, null);
assertEquals(1, task.getTaskParameters().size());
@@ -256,7 +256,7 @@ public class TestTasks {
// Invalid, no tasks in task map
tasks.setKey(new AxArtifactKey("TasksKey", "0.0.1"));
- assertEquals("TasksKey:0.0.1", tasks.getKey().getID());
+ assertEquals("TasksKey:0.0.1", tasks.getKey().getId());
result = new AxValidationResult();
result = tasks.validate(result);
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/TestApexPolicyModel.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/TestApexPolicyModel.java
index b3fd4a1b0..5dfeede0a 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/TestApexPolicyModel.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/TestApexPolicyModel.java
@@ -31,7 +31,7 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
-import org.onap.policy.apex.model.basicmodel.dao.DAOParameters;
+import org.onap.policy.apex.model.basicmodel.dao.DaoParameters;
import org.onap.policy.apex.model.basicmodel.test.TestApexModel;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
@@ -86,21 +86,21 @@ public class TestApexPolicyModel {
@Test
public void testModelWriteReadXML() throws Exception {
- testApexModel.testApexModelWriteReadXML();
+ testApexModel.testApexModelWriteReadXml();
}
@Test
public void testModelWriteReadJSON() throws Exception {
- testApexModel.testApexModelWriteReadJSON();
+ testApexModel.testApexModelWriteReadJson();
}
@Test
public void testModelWriteReadJPA() throws Exception {
- final DAOParameters daoParameters = new DAOParameters();
- daoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
- daoParameters.setPersistenceUnit("DAOTest");
+ final DaoParameters DaoParameters = new DaoParameters();
+ DaoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
+ DaoParameters.setPersistenceUnit("DAOTest");
- testApexModel.testApexModelWriteReadJPA(daoParameters);
+ testApexModel.testApexModelWriteReadJpa(DaoParameters);
}
private static final String VALID_MODEL_STRING = "***validation of model successful***";
diff --git a/model/policy-model/src/test/resources/META-INF/persistence.xml b/model/policy-model/src/test/resources/META-INF/persistence.xml
index 6131c82d1..cd9a420d0 100644
--- a/model/policy-model/src/test/resources/META-INF/persistence.xml
+++ b/model/policy-model/src/test/resources/META-INF/persistence.xml
@@ -23,8 +23,8 @@
<persistence-unit name="DAOTest" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
- <class>org.onap.policy.apex.model.basicmodel.dao.converters.CDATAConditioner</class>
- <class>org.onap.policy.apex.model.basicmodel.dao.converters.UUID2String</class>
+ <class>org.onap.policy.apex.model.basicmodel.dao.converters.CDataConditioner</class>
+ <class>org.onap.policy.apex.model.basicmodel.dao.converters.Uuid2String</class>
<class>org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey</class>
<class>org.onap.policy.apex.model.basicmodel.concepts.AxConcept</class>
<class>org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo</class>