summaryrefslogtreecommitdiffstats
path: root/examples/examples-adaptive/src
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-04 17:24:15 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-04 17:25:22 +0100
commit87be30582d1db37bee7c6b456c0c5c3ca9584963 (patch)
tree28806c5866fc5d07c89a06014d7c7d2705772b4f /examples/examples-adaptive/src
parentf32508381ce0b555fc14978cbaa458aa4e2d91c5 (diff)
Fix checkstyle issues in apex model basic
CHeckstyle issues in apex model basic and knock on changes in other apex modules. Issue-ID: POLICY-1034 Change-Id: I65823f5e2e344526abc74b0812877113acb056ec Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'examples/examples-adaptive/src')
-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
7 files changed, 32 insertions, 32 deletions
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>