1c6c3a75c730023f2b1b43d31a58b75ee662cebf
[policy/clamp.git] /
1 /*-\r
2  * ============LICENSE_START=======================================================\r
3  *  Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.\r
4  * ================================================================================\r
5  * Licensed under the Apache License, Version 2.0 (the "License");\r
6  * you may not use this file except in compliance with the License.\r
7  * You may obtain a copy of the License at\r
8  *\r
9  *      http://www.apache.org/licenses/LICENSE-2.0\r
10  *\r
11  * Unless required by applicable law or agreed to in writing, software\r
12  * distributed under the License is distributed on an "AS IS" BASIS,\r
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14  * See the License for the specific language governing permissions and\r
15  * limitations under the License.\r
16  *\r
17  * SPDX-License-Identifier: Apache-2.0\r
18  * ============LICENSE_END=========================================================\r
19  */\r
20 \r
21 package org.onap.policy.clamp.acm.participant.intermediary.api.impl;\r
22 \r
23 import org.onap.policy.clamp.acm.participant.intermediary.api.CompositionElementDto;\r
24 import org.onap.policy.clamp.acm.participant.intermediary.api.InstanceElementDto;\r
25 import org.onap.policy.clamp.acm.participant.intermediary.api.ParticipantIntermediaryApi;\r
26 import org.onap.policy.clamp.models.acm.concepts.DeployState;\r
27 import org.onap.policy.clamp.models.acm.concepts.StateChangeResult;\r
28 import org.onap.policy.models.base.PfModelException;\r
29 \r
30 /**\r
31  * Wrapper of AutomationCompositionElementListener.\r
32  * Valid since 8.0.1 release.\r
33  */\r
34 public abstract class AcElementListenerV3 extends AcElementListenerV4\r
35         implements AutomationCompositionElementListenerV3 {\r
36 \r
37     protected AcElementListenerV3(ParticipantIntermediaryApi intermediaryApi) {\r
38         super(intermediaryApi);\r
39     }\r
40 \r
41     @Override\r
42     public void prepare(CompositionElementDto compositionElement, InstanceElementDto instanceElement)\r
43             throws PfModelException {\r
44         intermediaryApi.updateAutomationCompositionElementState(instanceElement.instanceId(),\r
45                 instanceElement.elementId(), DeployState.UNDEPLOYED, null,\r
46                 StateChangeResult.NO_ERROR, "Prepare completed");\r
47     }\r
48 }\r