Fix checkstyle warnings in examples
Change-Id: Iad533f3987792d8713426234f3277c1ef6b72284
Issue-ID: POLICY-1034
Signed-off-by: Dinh Danh Le <dinh.danh.le@ericsson.com>
diff --git a/examples/examples-pcvs/pom.xml b/examples/examples-pcvs/pom.xml
index 074e894..2ac7702 100644
--- a/examples/examples-pcvs/pom.xml
+++ b/examples/examples-pcvs/pom.xml
@@ -97,7 +97,7 @@
<arguments>
<argument>-classpath</argument>
<classpath />
- <argument>org.onap.policy.apex.examples.pcvs.model.PCVSDomainModelSaver</argument>
+ <argument>org.onap.policy.apex.examples.pcvs.model.PcvsDomainModelSaver</argument>
<argument>${project.basedir}</argument>
<argument>${project.build.directory}/classes/examples/models/pcvs/</argument>
</arguments>
diff --git a/examples/examples-pcvs/src/main/java/org/onap/policy/apex/examples/pcvs/model/PCVSDomainModelFactory.java b/examples/examples-pcvs/src/main/java/org/onap/policy/apex/examples/pcvs/model/PcvsDomainModelFactory.java
similarity index 89%
rename from examples/examples-pcvs/src/main/java/org/onap/policy/apex/examples/pcvs/model/PCVSDomainModelFactory.java
rename to examples/examples-pcvs/src/main/java/org/onap/policy/apex/examples/pcvs/model/PcvsDomainModelFactory.java
index bc9eca8..0018863 100644
--- a/examples/examples-pcvs/src/main/java/org/onap/policy/apex/examples/pcvs/model/PCVSDomainModelFactory.java
+++ b/examples/examples-pcvs/src/main/java/org/onap/policy/apex/examples/pcvs/model/PcvsDomainModelFactory.java
@@ -33,7 +33,7 @@
*
* @author Sven van der Meer (sven.van.der.meer@ericsson.com)
*/
-public class PCVSDomainModelFactory {
+public class PcvsDomainModelFactory {
/**
* Generates the PCVS VPN-SLA policy model from CLI commands and creates an APEX model.
@@ -42,7 +42,7 @@
*
* @return the PCVS VPN-SLA policy model
*/
- public AxPolicyModel getPCVVpnSlaSPolicyModel(final String workingDirectory) {
+ public AxPolicyModel getPcvsVpnSlaSPolicyModel(final String workingDirectory) {
final String path = "target/model-gen/pcvs/vpnsla";
final String file = "policy.json";
final String full = path + "/" + file;
@@ -51,8 +51,8 @@
pathFile.mkdirs();
final String[] args =
- new String[] { "-c", "src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/vpnsla.apex", "-wd",
- workingDirectory, "-o", full };
+ new String[] {"-c", "src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/vpnsla.apex", "-wd",
+ workingDirectory, "-o", full};
final ApexCLIEditorMain cliEditor = new ApexCLIEditorMain(args);
if (cliEditor.getErrorCount() > 0) {
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
similarity index 87%
rename from examples/examples-pcvs/src/main/java/org/onap/policy/apex/examples/pcvs/model/PCVSDomainModelSaver.java
rename to examples/examples-pcvs/src/main/java/org/onap/policy/apex/examples/pcvs/model/PcvsDomainModelSaver.java
index 65e84a4..42d3d65 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
@@ -25,14 +25,14 @@
import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
/**
- * The Class PCVSDomainModelSaver.
+ * The Class PcvsDomainModelSaver.
*
* @author Sven van der Meer (sven.van.der.meer@ericsson.com)
*/
-public final class PCVSDomainModelSaver {
+public final class PcvsDomainModelSaver {
/** Private constructor to prevent instantiation. */
- private PCVSDomainModelSaver() {}
+ private PcvsDomainModelSaver() {}
/**
* Write all PCVS models to args[0].
@@ -43,11 +43,11 @@
public static void main(final String[] args) throws ApexException {
if (args.length != 2) {
System.err.println(
- "usage: " + PCVSDomainModelSaver.class.getCanonicalName() + " workingDirectory modelDirectory");
+ "usage: " + PcvsDomainModelSaver.class.getCanonicalName() + " workingDirectory modelDirectory");
return;
}
- final AxPolicyModel pcvsPolicyModel = new PCVSDomainModelFactory().getPCVVpnSlaSPolicyModel(args[0]);
+ final AxPolicyModel pcvsPolicyModel = new PcvsDomainModelFactory().getPcvsVpnSlaSPolicyModel(args[0]);
final ApexModelSaver<AxPolicyModel> pcvsModelSaver =
new ApexModelSaver<>(AxPolicyModel.class, pcvsPolicyModel, args[1] + "vpnsla/");
pcvsModelSaver.apexModelWriteJson();