diff options
Diffstat (limited to 'catalog-be')
2 files changed, 33 insertions, 71 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/IDistributionEngine.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/IDistributionEngine.java index 1c58112293..2136463f79 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/IDistributionEngine.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/IDistributionEngine.java @@ -20,38 +20,57 @@ package org.openecomp.sdc.be.components.distribution.engine; +import java.util.List; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.model.Service; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; import org.openecomp.sdc.be.resources.data.OperationalEnvironmentEntry; -import java.util.List; - public interface IDistributionEngine { - boolean isActive(); + default boolean isActive() { + return false; + } - ActionStatus notifyService(String distributionId, Service service, INotificationData notificationData, String envName, User modifier); + default ActionStatus notifyService(String distributionId, Service service, INotificationData notificationData, String envName, User modifier) { + return null; + } - ActionStatus notifyService(String distributionId, Service service, INotificationData notificationData, String envId, String envName, User modifier); + default ActionStatus notifyService(String distributionId, Service service, INotificationData notificationData, String envId, String envName, + User modifier) { + return null; + } - StorageOperationStatus isEnvironmentAvailable(String envName); + default StorageOperationStatus isEnvironmentAvailable(String envName) { + return null; + } - StorageOperationStatus isEnvironmentAvailable(); + default StorageOperationStatus isEnvironmentAvailable() { + return null; + } /** * Currently, it used for tests. For real implementation we need cancel the initialization task and the polling task. * * @param envName */ - void disableEnvironment(String envName); + default void disableEnvironment(String envName) { + } - StorageOperationStatus isReadyForDistribution(String envName); + default StorageOperationStatus isReadyForDistribution(String envName) { + return null; + } - INotificationData buildServiceForDistribution(Service service, String distributionId, String workloadContext); + default INotificationData buildServiceForDistribution(Service service, String distributionId, String workloadContext) { + return null; + } - OperationalEnvironmentEntry getEnvironmentById(String opEnvId); + default OperationalEnvironmentEntry getEnvironmentById(String opEnvId) { + return null; + } - OperationalEnvironmentEntry getEnvironmentByDmaapUebAddress(List<String> dmaapUebAddress); + default OperationalEnvironmentEntry getEnvironmentByDmaapUebAddress(List<String> dmaapUebAddress) { + return null; + } } diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/beans/DistributionEngineMock.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/beans/DistributionEngineMock.java index 8ec71ad870..6bdc1e1281 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/beans/DistributionEngineMock.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/beans/DistributionEngineMock.java @@ -7,9 +7,9 @@ * 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. @@ -21,64 +21,7 @@ package org.openecomp.sdc.be.components.path.beans; import org.openecomp.sdc.be.components.distribution.engine.IDistributionEngine; -import org.openecomp.sdc.be.components.distribution.engine.INotificationData; -import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.model.Service; -import org.openecomp.sdc.be.model.User; -import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; -import org.openecomp.sdc.be.resources.data.OperationalEnvironmentEntry; - -import java.util.List; public class DistributionEngineMock implements IDistributionEngine { - @Override - public boolean isActive() { - return false; - } - - @Override - public ActionStatus notifyService(String distributionId, Service service, INotificationData notificationData, String envName, User modifier) { - return null; - } - - @Override - public ActionStatus notifyService(String distributionId, Service service, INotificationData notificationData, String envId, String envName, User modifier) { - return null; - } - - @Override - public StorageOperationStatus isEnvironmentAvailable(String envName) { - return null; - } - - @Override - public StorageOperationStatus isEnvironmentAvailable() { - return null; - } - - @Override - public void disableEnvironment(String envName) { - - } - - @Override - public StorageOperationStatus isReadyForDistribution(String envName) { - return null; - } - - @Override - public INotificationData buildServiceForDistribution(Service service, String distributionId, String workloadContext) { - return null; - } - - @Override - public OperationalEnvironmentEntry getEnvironmentById(String opEnvId) { - return null; - } - - @Override - public OperationalEnvironmentEntry getEnvironmentByDmaapUebAddress(List<String> dmaapUebAddress) { - return null; - } } |