summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-08-02 15:56:00 -0400
committerJim Hahn <jrh3@att.com>2021-08-06 12:24:38 -0400
commitd7d3b5bd8f1c69fdaddffb3c200468feee424564 (patch)
tree15965889f98cfe11b0ef631517fb3446592a16dc /tools
parent338cc2611738783285f9edebd259f7e6bff3973d (diff)
Use lombok in apex-pdp #4
Updated model, testsuites, and tools. Issue-ID: POLICY-3391 Change-Id: I187d84380661f5d4222967c1c5f004c318d65982 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/KeyInfoGetter.java13
-rw-r--r--tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/SchemaUtils.java11
2 files changed, 7 insertions, 17 deletions
diff --git a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/KeyInfoGetter.java b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/KeyInfoGetter.java
index 2376769e8..cb68db300 100644
--- a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/KeyInfoGetter.java
+++ b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/KeyInfoGetter.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,6 +21,7 @@
package org.onap.policy.apex.tools.model.generator;
+import lombok.AllArgsConstructor;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo;
import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
@@ -30,22 +32,13 @@ import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
*
* @author John Keeney (john.keeney@ericsson.com)
*/
-
+@AllArgsConstructor
public class KeyInfoGetter {
/** The policy model for the getters. */
private final AxPolicyModel model;
/**
- * Creates a new key getter.
- *
- * @param model the policy model to use
- */
- public KeyInfoGetter(final AxPolicyModel model) {
- this.model = model;
- }
-
- /**
* Returns the key name as string.
*
* @param key the key to transform
diff --git a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/SchemaUtils.java b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/SchemaUtils.java
index 9d0e83c3e..484eaa6c3 100644
--- a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/SchemaUtils.java
+++ b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/SchemaUtils.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,6 +26,8 @@ import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
import org.apache.avro.AvroRuntimeException;
import org.apache.avro.Schema;
import org.apache.avro.Schema.Field;
@@ -41,16 +44,10 @@ import org.onap.policy.apex.service.engine.event.ApexEventException;
*
* @author John Keeney (john.keeney@ericsson.com)
*/
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class SchemaUtils {
/**
- * Private constructor to avoid instantiation.
- */
- private SchemaUtils() {
- // Private constructor to block subclassing
- }
-
- /**
* Returns the schema for an event.
*
* @param event the event to process