aboutsummaryrefslogtreecommitdiffstats
path: root/participant/participant-impl/participant-impl-policy/src/main
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2023-06-07 14:25:33 +0100
committerFrancescoFioraEst <francesco.fiora@est.tech>2023-06-12 08:47:50 +0100
commit31090c9fbc6c29477acd784a6c9f03766b5cc981 (patch)
tree85b23dd0714707629ba11d190f2237b3ecf7061c /participant/participant-impl/participant-impl-policy/src/main
parent5ccedbf315e6879005e1748baaccbfda9e81097e (diff)
Add failure handling support in Intermediary
Add Failure handling support in Intermediary, and refactor the communication between Participant and Intermediary. Issue-ID: POLICY-4707 Change-Id: Ica22e0e820efda372886d6d8da9c3526633321e2 Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'participant/participant-impl/participant-impl-policy/src/main')
-rw-r--r--participant/participant-impl/participant-impl-policy/src/main/java/org/onap/policy/clamp/acm/participant/policy/config/ParticipantConfig.java43
-rw-r--r--participant/participant-impl/participant-impl-policy/src/main/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandler.java5
2 files changed, 1 insertions, 47 deletions
diff --git a/participant/participant-impl/participant-impl-policy/src/main/java/org/onap/policy/clamp/acm/participant/policy/config/ParticipantConfig.java b/participant/participant-impl/participant-impl-policy/src/main/java/org/onap/policy/clamp/acm/participant/policy/config/ParticipantConfig.java
deleted file mode 100644
index 7f9ad243d..000000000
--- a/participant/participant-impl/participant-impl-policy/src/main/java/org/onap/policy/clamp/acm/participant/policy/config/ParticipantConfig.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.clamp.acm.participant.policy.config;
-
-import org.onap.policy.clamp.acm.participant.intermediary.api.ParticipantIntermediaryApi;
-import org.onap.policy.clamp.acm.participant.policy.main.handler.AutomationCompositionElementHandler;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-public class ParticipantConfig {
-
- /**
- * Register AutomationCompositionElementListener.
- *
- * @param intermediaryApi the ParticipantIntermediaryApi
- * @param acElementHandler the Aotumation Composition Element Handler
- */
- @Autowired
- public void registerAutomationCompositionElementListener(ParticipantIntermediaryApi intermediaryApi,
- AutomationCompositionElementHandler acElementHandler) {
- intermediaryApi.registerAutomationCompositionElementListener(acElementHandler);
- acElementHandler.setIntermediaryApi(intermediaryApi);
- }
-}
diff --git a/participant/participant-impl/participant-impl-policy/src/main/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandler.java b/participant/participant-impl/participant-impl-policy/src/main/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandler.java
index 0b8ffe2a3..29622149a 100644
--- a/participant/participant-impl/participant-impl-policy/src/main/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandler.java
+++ b/participant/participant-impl/participant-impl-policy/src/main/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandler.java
@@ -29,7 +29,6 @@ import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import javax.ws.rs.core.Response.Status;
import lombok.RequiredArgsConstructor;
-import lombok.Setter;
import org.apache.http.HttpStatus;
import org.onap.policy.clamp.acm.participant.intermediary.api.AutomationCompositionElementListener;
import org.onap.policy.clamp.acm.participant.intermediary.api.ParticipantIntermediaryApi;
@@ -62,9 +61,7 @@ public class AutomationCompositionElementHandler implements AutomationCompositio
private final PolicyApiHttpClient apiHttpClient;
private final PolicyPapHttpClient papHttpClient;
-
- @Setter
- private ParticipantIntermediaryApi intermediaryApi;
+ private final ParticipantIntermediaryApi intermediaryApi;
/**
* Callback method to handle a automation composition element state change.