2136463f79146a528ae275aa198a63e66111ad31
[sdc.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.sdc.be.components.distribution.engine;
22
23 import java.util.List;
24 import org.openecomp.sdc.be.dao.api.ActionStatus;
25 import org.openecomp.sdc.be.model.Service;
26 import org.openecomp.sdc.be.model.User;
27 import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
28 import org.openecomp.sdc.be.resources.data.OperationalEnvironmentEntry;
29
30 public interface IDistributionEngine {
31
32     default boolean isActive() {
33         return false;
34     }
35
36     default ActionStatus notifyService(String distributionId, Service service, INotificationData notificationData, String envName, User modifier) {
37         return null;
38     }
39
40     default ActionStatus notifyService(String distributionId, Service service, INotificationData notificationData, String envId, String envName,
41                                        User modifier) {
42         return null;
43     }
44
45     default StorageOperationStatus isEnvironmentAvailable(String envName) {
46         return null;
47     }
48
49     default StorageOperationStatus isEnvironmentAvailable() {
50         return null;
51     }
52
53     /**
54      * Currently, it used for tests. For real implementation we need cancel the initialization task and the polling task.
55      *
56      * @param envName
57      */
58     default void disableEnvironment(String envName) {
59     }
60
61     default StorageOperationStatus isReadyForDistribution(String envName) {
62         return null;
63     }
64
65     default INotificationData buildServiceForDistribution(Service service, String distributionId, String workloadContext) {
66         return null;
67     }
68
69     default OperationalEnvironmentEntry getEnvironmentById(String opEnvId) {
70         return null;
71     }
72
73     default OperationalEnvironmentEntry getEnvironmentByDmaapUebAddress(List<String> dmaapUebAddress) {
74         return null;
75     }
76 }