summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-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
-rw-r--r--examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelFactory.java4
-rw-r--r--examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelSaver.java8
-rw-r--r--examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAnomalyDetectionDBWrite.java10
-rw-r--r--examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAnomalyDetectionModel.java14
-rw-r--r--examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAutoLearnDBWrite.java10
-rw-r--r--examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAutoLearnModel.java14
-rw-r--r--examples/examples-adaptive/src/test/resources/META-INF/persistence.xml4
-rw-r--r--examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelSaver.java8
-rw-r--r--examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPModel.java12
-rw-r--r--examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPUseCase.java8
-rw-r--r--examples/examples-myfirstpolicy/src/test/resources/META-INF/persistence.xml4
-rw-r--r--examples/examples-onap-vcpe/pom.xml15
-rw-r--r--examples/examples-onap-vcpe/src/test/java/org/onap/policy/apex/domains/onap/vcpe/AAIAndGuardSim.java2
-rw-r--r--examples/examples-pcvs/src/main/java/org/onap/policy/apex/examples/pcvs/model/PCVSDomainModelSaver.java4
20 files changed, 84 insertions, 69 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>
diff --git a/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelFactory.java b/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelFactory.java
index 6242b1618..6b71468d9 100644
--- a/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelFactory.java
+++ b/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelFactory.java
@@ -288,7 +288,7 @@ public class AdaptiveDomainModelFactory {
final AxValidationResult result = anomalyDetectionPolicyModel.validate(new AxValidationResult());
if (!result.getValidationResult().equals(AxValidationResult.ValidationResult.VALID)) {
- throw new ApexRuntimeException("model " + anomalyDetectionPolicyModel.getID() + " is not valid" + result);
+ throw new ApexRuntimeException("model " + anomalyDetectionPolicyModel.getId() + " is not valid" + result);
}
return anomalyDetectionPolicyModel;
}
@@ -550,7 +550,7 @@ public class AdaptiveDomainModelFactory {
final AxValidationResult result = autoLearnPolicyModel.validate(new AxValidationResult());
if (!result.getValidationResult().equals(AxValidationResult.ValidationResult.VALID)) {
- throw new ApexRuntimeException("model " + autoLearnPolicyModel.getID() + " is not valid" + result);
+ throw new ApexRuntimeException("model " + autoLearnPolicyModel.getId() + " is not valid" + result);
}
return autoLearnPolicyModel;
}
diff --git a/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelSaver.java b/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelSaver.java
index 0cc9bd3a2..9c860e3c8 100644
--- a/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelSaver.java
+++ b/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelSaver.java
@@ -51,14 +51,14 @@ public final class AdaptiveDomainModelSaver {
final AxPolicyModel adPolicyModel = new AdaptiveDomainModelFactory().getAnomalyDetectionPolicyModel();
final ApexModelSaver<AxPolicyModel> adModelSaver =
new ApexModelSaver<>(AxPolicyModel.class, adPolicyModel, args[0]);
- adModelSaver.apexModelWriteJSON();
- adModelSaver.apexModelWriteXML();
+ adModelSaver.apexModelWriteJson();
+ adModelSaver.apexModelWriteXml();
// Save Auto Learn model
final AxPolicyModel alPolicyModel = new AdaptiveDomainModelFactory().getAutoLearnPolicyModel();
final ApexModelSaver<AxPolicyModel> alModelSaver =
new ApexModelSaver<>(AxPolicyModel.class, alPolicyModel, args[0]);
- alModelSaver.apexModelWriteJSON();
- alModelSaver.apexModelWriteXML();
+ alModelSaver.apexModelWriteJson();
+ alModelSaver.apexModelWriteXml();
}
}
diff --git a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAnomalyDetectionDBWrite.java b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAnomalyDetectionDBWrite.java
index 898531c32..9affa7876 100644
--- a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAnomalyDetectionDBWrite.java
+++ b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAnomalyDetectionDBWrite.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 TestAnomalyDetectionDBWrite {
@Test
public void testModelWriteReadJPA() throws Exception {
- final DAOParameters daoParameters = new DAOParameters();
- daoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
- daoParameters.setPersistenceUnit("AdaptiveModelsTest");
+ final DaoParameters DaoParameters = new DaoParameters();
+ DaoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
+ DaoParameters.setPersistenceUnit("AdaptiveModelsTest");
- testApexModel.testApexModelWriteReadJPA(daoParameters);
+ testApexModel.testApexModelWriteReadJpa(DaoParameters);
}
}
diff --git a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAnomalyDetectionModel.java b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAnomalyDetectionModel.java
index 7e2fb0eb7..3782f2d88 100644
--- a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAnomalyDetectionModel.java
+++ b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAnomalyDetectionModel.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 TestAnomalyDetectionModel {
@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("AdaptiveModelsTest");
+ final DaoParameters DaoParameters = new DaoParameters();
+ DaoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
+ DaoParameters.setPersistenceUnit("AdaptiveModelsTest");
- testApexModel.testApexModelWriteReadJPA(daoParameters);
+ testApexModel.testApexModelWriteReadJpa(DaoParameters);
}
private static final String VALID_MODEL_STRING = "***validation of model successful***";
diff --git a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAutoLearnDBWrite.java b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAutoLearnDBWrite.java
index 64efa6c35..e096105d9 100644
--- a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAutoLearnDBWrite.java
+++ b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAutoLearnDBWrite.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 TestAutoLearnDBWrite {
@Test
public void testModelWriteReadJPA() throws Exception {
- final DAOParameters daoParameters = new DAOParameters();
- daoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
- daoParameters.setPersistenceUnit("AdaptiveModelsTest");
+ final DaoParameters DaoParameters = new DaoParameters();
+ DaoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
+ DaoParameters.setPersistenceUnit("AdaptiveModelsTest");
- testApexModel.testApexModelWriteReadJPA(daoParameters);
+ testApexModel.testApexModelWriteReadJpa(DaoParameters);
}
}
diff --git a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAutoLearnModel.java b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAutoLearnModel.java
index aa7f621c9..beb7a9c80 100644
--- a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAutoLearnModel.java
+++ b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAutoLearnModel.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 TestAutoLearnModel {
@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("AdaptiveModelsTest");
+ final DaoParameters DaoParameters = new DaoParameters();
+ DaoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
+ DaoParameters.setPersistenceUnit("AdaptiveModelsTest");
- testApexModel.testApexModelWriteReadJPA(daoParameters);
+ testApexModel.testApexModelWriteReadJpa(DaoParameters);
}
private static final String VALID_MODEL_STRING = "***validation of model successful***";
diff --git a/examples/examples-adaptive/src/test/resources/META-INF/persistence.xml b/examples/examples-adaptive/src/test/resources/META-INF/persistence.xml
index 7282bb562..4dcd879b6 100644
--- a/examples/examples-adaptive/src/test/resources/META-INF/persistence.xml
+++ b/examples/examples-adaptive/src/test/resources/META-INF/persistence.xml
@@ -23,8 +23,8 @@
<persistence-unit name="AdaptiveModelsTest" 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>
diff --git a/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelSaver.java b/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelSaver.java
index 7343f747d..fb47f6cf9 100644
--- a/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelSaver.java
+++ b/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelSaver.java
@@ -50,13 +50,13 @@ public final class MFPDomainModelSaver {
AxPolicyModel mfpPolicyModel = new MFPDomainModelFactory().getMFP1PolicyModel();
ApexModelSaver<AxPolicyModel> mfpModelSaver =
new ApexModelSaver<>(AxPolicyModel.class, mfpPolicyModel, args[0] + "/1/");
- mfpModelSaver.apexModelWriteJSON();
- mfpModelSaver.apexModelWriteXML();
+ mfpModelSaver.apexModelWriteJson();
+ mfpModelSaver.apexModelWriteXml();
mfpPolicyModel = new MFPDomainModelFactory().getMFP2PolicyModel();
mfpModelSaver = new ApexModelSaver<>(AxPolicyModel.class, mfpPolicyModel, args[0] + "/2/");
- mfpModelSaver.apexModelWriteJSON();
- mfpModelSaver.apexModelWriteXML();
+ mfpModelSaver.apexModelWriteJson();
+ mfpModelSaver.apexModelWriteXml();
}
}
diff --git a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPModel.java b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPModel.java
index a8be6c4e4..64ff5b1ab 100644
--- a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPModel.java
+++ b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPModel.java
@@ -76,10 +76,10 @@ public class TestMFPModel {
@Test
public void testModelValid() throws Exception {
AxValidationResult result = testApexModel1.testApexModelValid();
- assertTrue("Model did not validate cleanly", result.isOK());
+ assertTrue("Model did not validate cleanly", result.isOk());
result = testApexModel2.testApexModelValid();
- assertTrue("Model did not validate cleanly", result.isOK());
+ assertTrue("Model did not validate cleanly", result.isOk());
}
/**
@@ -89,8 +89,8 @@ public class TestMFPModel {
*/
@Test
public void testModelWriteReadXML() throws Exception {
- testApexModel1.testApexModelWriteReadXML();
- testApexModel2.testApexModelWriteReadXML();
+ testApexModel1.testApexModelWriteReadXml();
+ testApexModel2.testApexModelWriteReadXml();
}
/**
@@ -100,7 +100,7 @@ public class TestMFPModel {
*/
@Test
public void testModelWriteReadJSON() throws Exception {
- testApexModel1.testApexModelWriteReadJSON();
- testApexModel2.testApexModelWriteReadJSON();
+ testApexModel1.testApexModelWriteReadJson();
+ testApexModel2.testApexModelWriteReadJson();
}
}
diff --git a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPUseCase.java b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPUseCase.java
index 22f985f80..1068a5398 100644
--- a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPUseCase.java
+++ b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPUseCase.java
@@ -262,7 +262,7 @@ public class TestMFPUseCase {
continue;
}
assertTrue("Event file " + inputFile + " has a field " + e.getKey() + " but this is not defined for "
- + event.getID(), (event.getParameterMap().containsKey(e.getKey())));
+ + event.getId(), (event.getParameterMap().containsKey(e.getKey())));
if (jsonObject.get(e.getKey()).isJsonNull()) {
ret.put(e.getKey(), null);
}
@@ -270,7 +270,7 @@ public class TestMFPUseCase {
for (final AxField field : event.getFields()) {
if (!field.getOptional()) {
assertTrue("Event file " + inputFile + " is missing a mandatory field " + field.getKey().getLocalName()
- + " for " + event.getID(), jsonObject.has(field.getKey().getLocalName()));
+ + " for " + event.getId(), jsonObject.has(field.getKey().getLocalName()));
} else {
ret.put(field.getKey().getLocalName(), null);
}
@@ -329,7 +329,7 @@ public class TestMFPUseCase {
continue;
}
assertTrue("Event file " + inputFile + " has a field " + e.getKey() + " but this is not defined for "
- + event.getID(), (event.getParameterMap().containsKey(e.getKey())));
+ + event.getId(), (event.getParameterMap().containsKey(e.getKey())));
if (jsonObject.get(e.getKey()).isJsonNull()) {
ret.put(e.getKey(), null);
}
@@ -337,7 +337,7 @@ public class TestMFPUseCase {
for (final AxField field : event.getFields()) {
if (!field.getOptional()) {
assertTrue("Event file " + inputFile + " is missing a mandatory field " + field.getKey().getLocalName()
- + " for " + event.getID(), jsonObject.has(field.getKey().getLocalName()));
+ + " for " + event.getId(), jsonObject.has(field.getKey().getLocalName()));
} else {
ret.put(field.getKey().getLocalName(), null);
}
diff --git a/examples/examples-myfirstpolicy/src/test/resources/META-INF/persistence.xml b/examples/examples-myfirstpolicy/src/test/resources/META-INF/persistence.xml
index 4dcba14b7..7acc7a0e9 100644
--- a/examples/examples-myfirstpolicy/src/test/resources/META-INF/persistence.xml
+++ b/examples/examples-myfirstpolicy/src/test/resources/META-INF/persistence.xml
@@ -23,8 +23,8 @@
<persistence-unit name="MFPModelTest" 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>
diff --git a/examples/examples-onap-vcpe/pom.xml b/examples/examples-onap-vcpe/pom.xml
index 353c7a26d..3080416b2 100644
--- a/examples/examples-onap-vcpe/pom.xml
+++ b/examples/examples-onap-vcpe/pom.xml
@@ -52,6 +52,21 @@
<version>${version.jersey}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-schema</groupId>
+ <artifactId>plugins-context-schema-avro</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
+ <artifactId>plugins-executor-javascript</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
+ <artifactId>plugins-event-carrier-restrequestor</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
<build>
diff --git a/examples/examples-onap-vcpe/src/test/java/org/onap/policy/apex/domains/onap/vcpe/AAIAndGuardSim.java b/examples/examples-onap-vcpe/src/test/java/org/onap/policy/apex/domains/onap/vcpe/AAIAndGuardSim.java
index a821462f6..f6ae332a8 100644
--- a/examples/examples-onap-vcpe/src/test/java/org/onap/policy/apex/domains/onap/vcpe/AAIAndGuardSim.java
+++ b/examples/examples-onap-vcpe/src/test/java/org/onap/policy/apex/domains/onap/vcpe/AAIAndGuardSim.java
@@ -28,7 +28,7 @@ import org.glassfish.jersey.server.ResourceConfig;
import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities;
public class AAIAndGuardSim {
- private static final String BASE_URI = "http://192.168.144.235:54321/AAIAndGuardSim";
+ private static final String BASE_URI = "http://localhost:54321/AAIAndGuardSim";
private HttpServer server;
public AAIAndGuardSim() {
diff --git a/examples/examples-pcvs/src/main/java/org/onap/policy/apex/examples/pcvs/model/PCVSDomainModelSaver.java b/examples/examples-pcvs/src/main/java/org/onap/policy/apex/examples/pcvs/model/PCVSDomainModelSaver.java
index ee6277a8e..65e84a4ea 100644
--- a/examples/examples-pcvs/src/main/java/org/onap/policy/apex/examples/pcvs/model/PCVSDomainModelSaver.java
+++ b/examples/examples-pcvs/src/main/java/org/onap/policy/apex/examples/pcvs/model/PCVSDomainModelSaver.java
@@ -50,8 +50,8 @@ public final class PCVSDomainModelSaver {
final AxPolicyModel pcvsPolicyModel = new PCVSDomainModelFactory().getPCVVpnSlaSPolicyModel(args[0]);
final ApexModelSaver<AxPolicyModel> pcvsModelSaver =
new ApexModelSaver<>(AxPolicyModel.class, pcvsPolicyModel, args[1] + "vpnsla/");
- pcvsModelSaver.apexModelWriteJSON();
- pcvsModelSaver.apexModelWriteXML();
+ pcvsModelSaver.apexModelWriteJson();
+ pcvsModelSaver.apexModelWriteXml();
}
}