From d7d3b5bd8f1c69fdaddffb3c200468feee424564 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 2 Aug 2021 15:56:00 -0400 Subject: Use lombok in apex-pdp #4 Updated model, testsuites, and tools. Issue-ID: POLICY-3391 Change-Id: I187d84380661f5d4222967c1c5f004c318d65982 Signed-off-by: Jim Hahn --- .../policy/apex/tools/model/generator/KeyInfoGetter.java | 13 +++---------- .../onap/policy/apex/tools/model/generator/SchemaUtils.java | 11 ++++------- 2 files changed, 7 insertions(+), 17 deletions(-) (limited to 'tools') 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,21 +32,12 @@ 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. * 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,15 +44,9 @@ 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. * -- cgit 1.2.3-korg