| /********************************************************************************* |
| * Copyright (c) 2020 Robert Bosch GmbH and others. |
| * |
| * This program and the accompanying materials are made |
| * available under the terms of the Eclipse Public License 2.0 |
| * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Robert Bosch GmbH - initial API and implementation |
| ******************************************************************************** |
| */ |
| package org.eclipse.app4mc.cloud.manager; |
| |
| import java.util.ArrayList; |
| import java.util.List; |
| |
| public class ServiceConfiguration { |
| |
| private String serviceName; |
| private ArrayList<ServiceConfigurationParameter> parameter = new ArrayList<>(); |
| |
| public ServiceConfiguration() { |
| // empty constructor needed for JSON serialization |
| } |
| |
| public ServiceConfiguration(String serviceName) { |
| this.serviceName = serviceName; |
| } |
| |
| public String getServiceName() { |
| return serviceName; |
| } |
| |
| public void setServiceName(String serviceName) { |
| this.serviceName = serviceName; |
| } |
| |
| public void addParameter(ServiceConfigurationParameter param) { |
| this.parameter.add(param); |
| } |
| |
| public List<ServiceConfigurationParameter> getParameterList() { |
| return this.parameter; |
| } |
| |
| public ServiceConfigurationParameter getParameter(String key) { |
| for (ServiceConfigurationParameter param : this.parameter) { |
| if (param.getKey().equals(key)) { |
| return param; |
| } |
| } |
| return null; |
| } |
| } |