summaryrefslogtreecommitdiffstats
path: root/examples/examples-myfirstpolicy/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'examples/examples-myfirstpolicy/src/main/java/org')
-rw-r--r--examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MfpDomainModelFactory.java (renamed from examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelFactory.java)20
-rw-r--r--examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MfpDomainModelSaver.java (renamed from examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelSaver.java)10
2 files changed, 15 insertions, 15 deletions
diff --git a/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelFactory.java b/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MfpDomainModelFactory.java
index 5e5bb913d..f81a22ee9 100644
--- a/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelFactory.java
+++ b/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MfpDomainModelFactory.java
@@ -30,7 +30,7 @@ import org.onap.policy.common.utils.resources.ResourceUtils;
*
* @author John Keeney (john.keeney@ericsson.com)
*/
-public class MFPDomainModelFactory {
+public class MfpDomainModelFactory {
private static final String MFP1PATH = "examples/models/MyFirstPolicy/1/MyFirstPolicyModel_0.0.1.json";
private static final String MFP1_ALT_PATH = "examples/models/MyFirstPolicy/1/MyFirstPolicyModel_0.0.1.alt.json";
@@ -41,13 +41,13 @@ public class MFPDomainModelFactory {
*
* @return the MyFirstPolicy#1 policy model
*/
- public AxPolicyModel getMFP1PolicyModel() {
+ public AxPolicyModel getMfp1PolicyModel() {
java.util.TimeZone.getTimeZone("gmt");
try {
final ApexModelReader<AxPolicyModel> reader = new ApexModelReader<>(AxPolicyModel.class);
- return reader.read(ResourceUtils.getResourceAsString(MFPDomainModelFactory.MFP1PATH));
+ return reader.read(ResourceUtils.getResourceAsString(MfpDomainModelFactory.MFP1PATH));
} catch (final Exception e) {
- throw new ApexRuntimeException("Failed to build MyFirstPolicy from path: " + MFPDomainModelFactory.MFP1PATH,
+ throw new ApexRuntimeException("Failed to build MyFirstPolicy from path: " + MfpDomainModelFactory.MFP1PATH,
e);
}
}
@@ -57,14 +57,14 @@ public class MFPDomainModelFactory {
*
* @return the MyFirstPolicy#1 policy model
*/
- public AxPolicyModel getMFP1AltPolicyModel() {
+ public AxPolicyModel getMfp1AltPolicyModel() {
java.util.TimeZone.getTimeZone("gmt");
try {
final ApexModelReader<AxPolicyModel> reader = new ApexModelReader<>(AxPolicyModel.class);
- return reader.read(ResourceUtils.getResourceAsString(MFPDomainModelFactory.MFP1_ALT_PATH));
+ return reader.read(ResourceUtils.getResourceAsString(MfpDomainModelFactory.MFP1_ALT_PATH));
} catch (final Exception e) {
throw new ApexRuntimeException(
- "Failed to build MyFirstPolicy_ALT from path: " + MFPDomainModelFactory.MFP1_ALT_PATH, e);
+ "Failed to build MyFirstPolicy_ALT from path: " + MfpDomainModelFactory.MFP1_ALT_PATH, e);
}
}
@@ -73,12 +73,12 @@ public class MFPDomainModelFactory {
*
* @return the MyFirstPolicy#1 policy model
*/
- public AxPolicyModel getMFP2PolicyModel() {
+ public AxPolicyModel getMfp2PolicyModel() {
try {
final ApexModelReader<AxPolicyModel> reader = new ApexModelReader<>(AxPolicyModel.class);
- return reader.read(ResourceUtils.getResourceAsString(MFPDomainModelFactory.MFP2PATH));
+ return reader.read(ResourceUtils.getResourceAsString(MfpDomainModelFactory.MFP2PATH));
} catch (final Exception e) {
- throw new ApexRuntimeException("Failed to build MyFirstPolicy from path: " + MFPDomainModelFactory.MFP2PATH,
+ throw new ApexRuntimeException("Failed to build MyFirstPolicy from path: " + MfpDomainModelFactory.MFP2PATH,
e);
}
}
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 fb47f6cf9..5122390a8 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
@@ -29,10 +29,10 @@ import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
*
* @author John Keeney (john.keeney@ericsson.com)
*/
-public final class MFPDomainModelSaver {
+public final class MfpDomainModelSaver {
/** Private constructor to prevent instantiation. */
- private MFPDomainModelSaver() {}
+ private MfpDomainModelSaver() {}
/**
* Write the MyFirstPolicy model to args[0].
@@ -42,18 +42,18 @@ public final class MFPDomainModelSaver {
*/
public static void main(final String[] args) throws ApexException {
if (args.length != 1) {
- System.err.println("usage: " + MFPDomainModelSaver.class.getCanonicalName() + " modelDirectory");
+ System.err.println("usage: " + MfpDomainModelSaver.class.getCanonicalName() + " modelDirectory");
return;
}
// Save Java model
- AxPolicyModel mfpPolicyModel = new MFPDomainModelFactory().getMFP1PolicyModel();
+ AxPolicyModel mfpPolicyModel = new MfpDomainModelFactory().getMfp1PolicyModel();
ApexModelSaver<AxPolicyModel> mfpModelSaver =
new ApexModelSaver<>(AxPolicyModel.class, mfpPolicyModel, args[0] + "/1/");
mfpModelSaver.apexModelWriteJson();
mfpModelSaver.apexModelWriteXml();
- mfpPolicyModel = new MFPDomainModelFactory().getMFP2PolicyModel();
+ mfpPolicyModel = new MfpDomainModelFactory().getMfp2PolicyModel();
mfpModelSaver = new ApexModelSaver<>(AxPolicyModel.class, mfpPolicyModel, args[0] + "/2/");
mfpModelSaver.apexModelWriteJson();
mfpModelSaver.apexModelWriteXml();