diff options
author | Jim Hahn <jrh3@att.com> | 2021-08-05 10:13:01 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2021-08-05 11:18:36 -0400 |
commit | 1744dac574fb771301027be74c9257eb070125f7 (patch) | |
tree | b35035a120a2fb5d99114091c89ed8dbfa57cd22 /policy-management/src/main/java/org/onap/policy/drools/system/Main.java | |
parent | 43cb6711bbc9b231e904ff3ef5266f0f0df3faec (diff) |
Use lombok in drools-pdp
Updated policy-management thru policy-utils.
Issue-ID: POLICY-3397
Change-Id: Ie9498fe912e8338ddc32a40774c3cb63d84f079a
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'policy-management/src/main/java/org/onap/policy/drools/system/Main.java')
-rw-r--r-- | policy-management/src/main/java/org/onap/policy/drools/system/Main.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/Main.java b/policy-management/src/main/java/org/onap/policy/drools/system/Main.java index be0cb820..c28d4c96 100644 --- a/policy-management/src/main/java/org/onap/policy/drools/system/Main.java +++ b/policy-management/src/main/java/org/onap/policy/drools/system/Main.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-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. @@ -21,6 +21,8 @@ package org.onap.policy.drools.system; import java.util.Properties; +import lombok.AccessLevel; +import lombok.NoArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager; import org.onap.policy.common.endpoints.http.client.HttpClientConfigException; @@ -39,16 +41,13 @@ import org.slf4j.LoggerFactory; /** * Programmatic entry point to the management layer. */ +@NoArgsConstructor(access = AccessLevel.PRIVATE) public class Main { /** * Symmetric Key to decode sensitive configuration data. */ protected static final String SYSTEM_SYMM_KEY = "engine.symm.key"; - /** constructor (hides public default one). */ - private Main() { - } - /** * main. * @@ -62,7 +61,7 @@ public class Main { */ /* start logger */ - Logger logger = LoggerFactory.getLogger(Main.class); + var logger = LoggerFactory.getLogger(Main.class); /* system properties */ setSystemProperties(); @@ -191,7 +190,7 @@ public class Main { .setTargetEntity("controller:" + controllerName) .setTargetServiceName("start"); - final PolicyController controller = + final var controller = PolicyEngineConstants.getManager().createPolicyController(controllerName, controllerProperties); controller.start(); @@ -226,4 +225,4 @@ public class Main { } } } -}
\ No newline at end of file +} |