aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/policy-yaml/src
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2018-08-14 14:22:34 -0400
committerPamela Dragosh <pdragosh@research.att.com>2018-08-14 14:22:41 -0400
commitdbe1d23be5420a5efa4d3977fee974c452bbfd29 (patch)
treecf5ab051e698d9278e6fd28022acbd5c1a9a91a2 /controlloop/common/policy-yaml/src
parent6f9976df27dccb2dcaedeb9106166f62a435b050 (diff)
Fix checkstyle issues
Spacing, missing javadoc Issue-ID: POLICY-883 Change-Id: Ice65c6c1baf0bb7c6273411f078bacfe3496b89b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'controlloop/common/policy-yaml/src')
-rw-r--r--controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java
index b088af78a..27c9bf8cd 100644
--- a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java
+++ b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java
@@ -52,6 +52,9 @@ public class ControlLoopCompiler implements Serializable {
private static final long serialVersionUID = 1L;
private static final Logger LOGGER = LoggerFactory.getLogger(ControlLoopCompiler.class.getName());
+ /**
+ * Compiles the policy from an object.
+ */
public static ControlLoopPolicy compile(ControlLoopPolicy policy,
ControlLoopCompilerCallback callback) throws CompilerException {
//
@@ -66,6 +69,15 @@ public class ControlLoopCompiler implements Serializable {
return policy;
}
+ /**
+ * Compiles the policy from an input stream.
+ *
+ * @param yamlSpecification the yaml input stream
+ * @param callback method to callback during compilation
+ * @return
+ *
+ * @throws CompilerException throws any compile exception found
+ */
public static ControlLoopPolicy compile(InputStream yamlSpecification,
ControlLoopCompilerCallback callback) throws CompilerException {
Yaml yaml = new Yaml(new Constructor(ControlLoopPolicy.class));
@@ -84,7 +96,7 @@ public class ControlLoopCompiler implements Serializable {
if (controlLoop == null && callback != null) {
callback.onError("controlLoop cannot be null");
}
- if (controlLoop!=null){
+ if (controlLoop != null) {
if ((controlLoop.getControlLoopName() == null || controlLoop.getControlLoopName().length() < 1)
&& callback != null) {
callback.onError("Missing controlLoopName");