diff options
Diffstat (limited to 'catalog-be/src/main/java/org/openecomp/sdc/be/components/upgrade/UpgradeStatus.java')
-rw-r--r-- | catalog-be/src/main/java/org/openecomp/sdc/be/components/upgrade/UpgradeStatus.java | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/upgrade/UpgradeStatus.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/upgrade/UpgradeStatus.java index da4dd6b163..46d7307c80 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/upgrade/UpgradeStatus.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/upgrade/UpgradeStatus.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. @@ -17,21 +17,18 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.be.components.upgrade; +import java.util.ArrayList; +import java.util.List; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.exception.ResponseFormat; -import java.util.ArrayList; -import java.util.List; - public class UpgradeStatus { + ActionStatus status; ResponseFormat error; - - List<ServiceInfo> componentToUpgradeStatus; public ActionStatus getStatus() { @@ -54,14 +51,16 @@ public class UpgradeStatus { checkAndCreate(); componentToUpgradeStatus.add(info); } + public void addServiceStatus(String serviceId, ActionStatus status) { checkAndCreate(); - ServiceInfo info = new ServiceInfo(serviceId, status ); + ServiceInfo info = new ServiceInfo(serviceId, status); componentToUpgradeStatus.add(info); } + public void addServiceStatus(Component component, ActionStatus status) { checkAndCreate(); - ServiceInfo info = new ServiceInfo(component.getUniqueId(), status ); + ServiceInfo info = new ServiceInfo(component.getUniqueId(), status); info.setName(component.getName()); info.setVersion(component.getVersion()); componentToUpgradeStatus.add(info); @@ -80,5 +79,4 @@ public class UpgradeStatus { public void setError(ResponseFormat error) { this.error = error; } - } |