0d5a6c5992676ddfec52616dd44c7a185e35c9c8
[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.AutomationCompositionElementListener;\r
24 import org.onap.policy.clamp.acm.participant.intermediary.api.CompositionElementDto;\r
25 import org.onap.policy.clamp.acm.participant.intermediary.api.InstanceElementDto;\r
26 import org.onap.policy.clamp.acm.participant.intermediary.api.ParticipantIntermediaryApi;\r
27 import org.onap.policy.clamp.models.acm.concepts.DeployState;\r
28 import org.onap.policy.clamp.models.acm.concepts.StateChangeResult;\r
29 import org.onap.policy.models.base.PfModelException;\r
30 \r
31 /**\r
32  * Wrapper of AutomationCompositionElementListener.\r
33  * Valid since 8.0.1 release.\r
34  */\r
35 public abstract class AcElementListenerV3 extends AcElementListenerV4\r
36         implements AutomationCompositionElementListener, AutomationCompositionElementListenerV3 {\r
37 \r
38     protected AcElementListenerV3(ParticipantIntermediaryApi intermediaryApi) {\r
39         super(intermediaryApi);\r
40     }\r
41 \r
42     @Override\r
43     public void prepare(CompositionElementDto compositionElement, InstanceElementDto instanceElement)\r
44             throws PfModelException {\r
45         intermediaryApi.updateAutomationCompositionElementState(instanceElement.instanceId(),\r
46                 instanceElement.elementId(), DeployState.UNDEPLOYED, null,\r
47                 StateChangeResult.NO_ERROR, "Prepare completed");\r
48     }\r
49 }\r