aboutsummaryrefslogtreecommitdiffstats
path: root/examples/examples-aadm
diff options
context:
space:
mode:
authorDinh Danh Le <dinh.danh.le@ericsson.com>2018-08-29 17:21:52 +0100
committerDinh Danh Le <dinh.danh.le@ericsson.com>2018-09-05 12:48:49 +0100
commit825ae627d4378c5cc7ab4b7d5f4b4ffefcb7977e (patch)
treead4ca360252379ed8e07bc5c599cd4aa6e240199 /examples/examples-aadm
parentf7689b84472ab4698d9d96f1de08402208d99ca8 (diff)
Fix checkstyle warnings in examples
Change-Id: Iad533f3987792d8713426234f3277c1ef6b72284 Issue-ID: POLICY-1034 Signed-off-by: Dinh Danh Le <dinh.danh.le@ericsson.com>
Diffstat (limited to 'examples/examples-aadm')
-rw-r--r--examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/ENodeBStatus.java10
-rw-r--r--examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/IMSIStatus.java8
-rw-r--r--examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModel.java4
-rw-r--r--examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModelCreator.java1
-rw-r--r--examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMUseCase.java11
-rw-r--r--examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAadmDbWrite.java (renamed from examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMDBWrite.java)8
6 files changed, 28 insertions, 14 deletions
diff --git a/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/ENodeBStatus.java b/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/ENodeBStatus.java
index 13fbb1eca..1f3cf5185 100644
--- a/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/ENodeBStatus.java
+++ b/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/ENodeBStatus.java
@@ -28,7 +28,7 @@ import java.io.Serializable;
public class ENodeBStatus implements Serializable {
private static final long serialVersionUID = 2852523814242234172L;
- private final String eNodeB;
+ private final String enodeB;
private long dosCount = 0;
private boolean beingProbed = false;
@@ -36,10 +36,10 @@ public class ENodeBStatus implements Serializable {
/**
* The Constructor initiates the status of the eNodeB.
*
- * @param eNodeB the e node B
+ * @param enodeB the eNodeB
*/
- public ENodeBStatus(final String eNodeB) {
- this.eNodeB = eNodeB;
+ public ENodeBStatus(final String enodeB) {
+ this.enodeB = enodeB;
}
/**
@@ -48,7 +48,7 @@ public class ENodeBStatus implements Serializable {
* @return the eNodeB name
*/
public String getENodeB() {
- return eNodeB;
+ return enodeB;
}
/**
diff --git a/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/IMSIStatus.java b/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/IMSIStatus.java
index f59e982b0..8f89d4c15 100644
--- a/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/IMSIStatus.java
+++ b/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/IMSIStatus.java
@@ -34,7 +34,7 @@ public class IMSIStatus implements Serializable {
private boolean anomalous = false;
private long anomalousTime = TIME_NOT_SET;
- private String eNodeBID;
+ private String enodeBId;
private long blackListedTime = TIME_NOT_SET;
private long blockingCount = 0;
@@ -98,7 +98,7 @@ public class IMSIStatus implements Serializable {
* @return theeNodeB ID to which the IMSI is attached
*/
public String getENodeBID() {
- return eNodeBID;
+ return enodeBId;
}
/**
@@ -107,7 +107,7 @@ public class IMSIStatus implements Serializable {
* @param incomingENodeBID the eNodeB ID to which the IMSI is attached
*/
public void setENodeBID(final String incomingENodeBID) {
- this.eNodeBID = incomingENodeBID;
+ this.enodeBId = incomingENodeBID;
}
/**
@@ -116,7 +116,7 @@ public class IMSIStatus implements Serializable {
* @return true, if eNodeB ID to which the IMSI is attached is set
*/
public boolean checkSetENodeBID() {
- return (eNodeBID != null);
+ return (enodeBId != null);
}
/**
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 7a453ae24..ba992b522 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
@@ -38,6 +38,10 @@ public class TestAADMModel {
private Connection connection;
TestApexModel<AxPolicyModel> testApexModel;
+ /**
+ * Sets up embedded Derby database and the AADM model for the tests.
+ * @throws Exception exception to be thrown while setting up the database connection
+ */
@Before
public void setup() throws Exception {
Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
diff --git a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModelCreator.java b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModelCreator.java
index 9aa2095c7..421a45a15 100644
--- a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModelCreator.java
+++ b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModelCreator.java
@@ -25,6 +25,7 @@ import org.onap.policy.apex.model.basicmodel.test.TestApexModelCreator;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
/**
+ * This class implements Interface TestApexModelCreator to support AADM model.
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
public class TestAADMModelCreator implements TestApexModelCreator<AxPolicyModel> {
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 f7ce2fdf0..5ff70d1af 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
@@ -50,7 +50,9 @@ import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
/**
- * User: Sergey Sachkov Date: 13/10/15
+ * This class tests AADM use case.
+ * @author Sergey Sachkov (sergey.sachkov@ericsson.com)
+ *
*/
public class TestAADMUseCase {
private static final XLogger logger = XLoggerFactory.getXLogger(TestAADMUseCase.class);
@@ -59,15 +61,18 @@ public class TestAADMUseCase {
private ContextParameters contextParameters;
private EngineParameters engineParameters;
+ /**
+ * Test AADM use case setup.
+ */
@Before
public void beforeTest() {
schemaParameters = new SchemaParameters();
-
+
schemaParameters.setName(ContextParameterConstants.SCHEMA_GROUP_NAME);
schemaParameters.getSchemaHelperParameterMap().put("JAVA", new JavaSchemaHelperParameters());
ParameterService.register(schemaParameters);
-
+
contextParameters = new ContextParameters();
contextParameters.setName(ContextParameterConstants.MAIN_GROUP_NAME);
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 dd6a5eb77..b67bb6245 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
@@ -31,10 +31,14 @@ 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;
-public class TestAADMDBWrite {
+public class TestAadmDbWrite {
private Connection connection;
TestApexModel<AxPolicyModel> testApexModel;
+ /**
+ * Sets up embedded Derby database and the Apex AADM model for the tests.
+ * @throws Exception exception to be thrown while setting up the database connection
+ */
@Before
public void setup() throws Exception {
Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
@@ -50,7 +54,7 @@ public class TestAADMDBWrite {
}
@Test
- public void testModelWriteReadJPA() throws Exception {
+ public void testModelWriteReadJpa() throws Exception {
final DaoParameters DaoParameters = new DaoParameters();
DaoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
DaoParameters.setPersistenceUnit("AADMModelTest");