summaryrefslogtreecommitdiffstats
path: root/examples/examples-aadm/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/examples-aadm/src')
-rw-r--r--examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/model/AADMDomainModelFactory.java2
-rw-r--r--examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/model/AADMDomainModelSaver.java4
-rw-r--r--examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMDBWrite.java10
-rw-r--r--examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModel.java14
-rw-r--r--examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMUseCase.java2
-rw-r--r--examples/examples-aadm/src/test/resources/META-INF/persistence.xml4
6 files changed, 18 insertions, 18 deletions
diff --git a/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/model/AADMDomainModelFactory.java b/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/model/AADMDomainModelFactory.java
index b0cbf0c17..9a2d50626 100644
--- a/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/model/AADMDomainModelFactory.java
+++ b/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/model/AADMDomainModelFactory.java
@@ -696,7 +696,7 @@ public class AADMDomainModelFactory {
final AxValidationResult result = aadmPolicyModel.validate(new AxValidationResult());
if (!result.getValidationResult().equals(AxValidationResult.ValidationResult.VALID)) {
- throw new ApexRuntimeException("model " + aadmPolicyModel.getID() + " is not valid" + result);
+ throw new ApexRuntimeException("model " + aadmPolicyModel.getId() + " is not valid" + result);
}
return aadmPolicyModel;
}
diff --git a/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/model/AADMDomainModelSaver.java b/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/model/AADMDomainModelSaver.java
index 618a9535a..a25a0e983 100644
--- a/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/model/AADMDomainModelSaver.java
+++ b/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/model/AADMDomainModelSaver.java
@@ -51,7 +51,7 @@ public final class AADMDomainModelSaver {
final AxPolicyModel aadmPolicyModel = new AADMDomainModelFactory().getAADMPolicyModel();
final ApexModelSaver<AxPolicyModel> aadmModelSaver =
new ApexModelSaver<>(AxPolicyModel.class, aadmPolicyModel, args[0]);
- aadmModelSaver.apexModelWriteJSON();
- aadmModelSaver.apexModelWriteXML();
+ aadmModelSaver.apexModelWriteJson();
+ aadmModelSaver.apexModelWriteXml();
}
}
diff --git a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMDBWrite.java b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMDBWrite.java
index 02e6f9179..dd6a5eb77 100644
--- a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMDBWrite.java
+++ b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMDBWrite.java
@@ -27,7 +27,7 @@ import java.sql.DriverManager;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-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;
@@ -51,10 +51,10 @@ public class TestAADMDBWrite {
@Test
public void testModelWriteReadJPA() throws Exception {
- final DAOParameters daoParameters = new DAOParameters();
- daoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
- daoParameters.setPersistenceUnit("AADMModelTest");
+ final DaoParameters DaoParameters = new DaoParameters();
+ DaoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
+ DaoParameters.setPersistenceUnit("AADMModelTest");
- testApexModel.testApexModelWriteReadJPA(daoParameters);
+ testApexModel.testApexModelWriteReadJpa(DaoParameters);
}
}
diff --git a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModel.java b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModel.java
index 2c62c4994..7a453ae24 100644
--- a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModel.java
+++ b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModel.java
@@ -30,7 +30,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;
@@ -60,21 +60,21 @@ public class TestAADMModel {
@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("AADMModelTest");
+ final DaoParameters DaoParameters = new DaoParameters();
+ DaoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
+ DaoParameters.setPersistenceUnit("AADMModelTest");
- testApexModel.testApexModelWriteReadJPA(daoParameters);
+ testApexModel.testApexModelWriteReadJpa(DaoParameters);
}
private static final String VALID_MODEL_STRING = "***validation of model successful***";
diff --git a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMUseCase.java b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMUseCase.java
index 1f9b1087c..f7ce2fdf0 100644
--- a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMUseCase.java
+++ b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMUseCase.java
@@ -441,7 +441,7 @@ public class TestAADMUseCase {
*/
private AxEvent getTriggerEvent(final AxPolicyModel apexPolicyModel) {
for (final AxEvent axEvent : apexPolicyModel.getEvents().getEventMap().values()) {
- if (axEvent.getKey().getID().equals("AADMEvent:0.0.1")) {
+ if (axEvent.getKey().getId().equals("AADMEvent:0.0.1")) {
return axEvent;
}
}
diff --git a/examples/examples-aadm/src/test/resources/META-INF/persistence.xml b/examples/examples-aadm/src/test/resources/META-INF/persistence.xml
index eaef96a85..eb28ad809 100644
--- a/examples/examples-aadm/src/test/resources/META-INF/persistence.xml
+++ b/examples/examples-aadm/src/test/resources/META-INF/persistence.xml
@@ -23,8 +23,8 @@
<persistence-unit name="AADMModelTest" 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>