/**
 * Copyright (C) FuseSource, Inc.
 * http://fusesource.com
 *
 * 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.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.fusesource.fabric.api.jmx;

import java.util.List;

/**
 * Represents the status of the logical brokers
 */
public class MQBrokerStatusDTO {
    private String version;
    private String profile;
    private String brokerName;
    private String group;
    private String container;
    private String provisionStatus;
    private String provisionResult;
    private Integer minimumInstances;
    private List<String> services;
    private Boolean master;
    private boolean alive;
    private String jolokiaUrl;

    public MQBrokerStatusDTO() {
    }

    public MQBrokerStatusDTO(MQBrokerConfigDTO configDTO) {
        setVersion(configDTO.version());
        setProfile(configDTO.profile());
        setBrokerName(configDTO.getBrokerName());
        setGroup(configDTO.getGroup());
    }

    @Override
    public String toString() {
        return "MQBrokerStatusDTO{" +
                "version='" + version + '\'' +
                ", profile='" + profile + '\'' +
                ", container='" + container + '\'' +
                ", brokerName='" + brokerName + '\'' +
                ", group='" + group + '\'' +
                ", master='" + master + '\'' +
                ", provisionStatus='" + provisionStatus + '\'' +
                '}';
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getProfile() {
        return profile;
    }

    public void setProfile(String profile) {
        this.profile = profile;
    }

    public String getBrokerName() {
        return brokerName;
    }

    public void setBrokerName(String brokerName) {
        this.brokerName = brokerName;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public String getProvisionStatus() {
        return provisionStatus;
    }

    public void setProvisionStatus(String provisionStatus) {
        this.provisionStatus = provisionStatus;
    }

    public Integer getMinimumInstances() {
        return minimumInstances;
    }

    public void setMinimumInstances(Integer minimumInstances) {
        this.minimumInstances = minimumInstances;
    }

    public String getContainer() {
        return container;
    }

    public void setContainer(String container) {
        this.container = container;
    }

    /**
     * The list of master services for this node
     */
    public List<String> getServices() {
        return services;
    }

    public void setServices(List<String> services) {
        this.services = services;
    }

    public Boolean getMaster() {
        return master;
    }

    public void setMaster(Boolean master) {
        this.master = master;
    }

    public String getProvisionResult() {
        return provisionResult;
    }

    public void setProvisionResult(String provisionResult) {
        this.provisionResult = provisionResult;
    }

    public void setAlive(boolean alive) {
        this.alive = alive;
    }

    public boolean isAlive() {
        return alive;
    }

    public void setJolokiaUrl(String jolokiaUrl) {
        this.jolokiaUrl = jolokiaUrl;
    }

    public String getJolokiaUrl() {
        return jolokiaUrl;
    }
}

@@ -1143,16 +1143,47 @@
 okiaUrl;
+%0A    private String%5B%5D networks;
 %0A%0A    pu
@@ -1444,24 +1444,70 @@
 etGroup());%0A
+        setNetworks(configDTO.getNetworks());%0A
     %7D%0A%0A    @
@@ -4003,11 +4003,169 @@
 l;%0A    %7D
+%0A%0A    public void setNetworks(String%5B%5D networks) %7B%0A        this.networks = networks;%0A    %7D%0A%0A    public String%5B%5D getNetworks() %7B%0A        return networks;%0A    %7D
 %0A%7D%0A

add the networks to the broker status