// Path: app/dto/objects/ConnectionDto.java
// public class ConnectionDto {
// 
//     protected String ipAddress;
//     protected String iqn;
// 
//     public ConnectionDto(String ipAddress, String iqn) {
//         this.ipAddress = ipAddress;
//         this.iqn = iqn;
//     }
// 
//     public String getIpAddress() {
//         return ipAddress;
//     }
// 
//     public void setIpAddress(String ipAddress) {
//         this.ipAddress = ipAddress;
//     }
// 
//     public String getIqn() {
//         return iqn;
//     }
// 
//     public void setIqn(String iqn) {
//         this.iqn = iqn;
//     }
// }
// 
// Path: app/dto/objects/DataCenterDto.java
// public class DataCenterDto {
// 
//     protected String name;
//     protected String status;
// 
//     public DataCenterDto(String name, String status) {
//         this.name = name;
//         this.status = status;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public String getStatus() {
//         return status;
//     }
// }
// 
// Path: app/dto/objects/HostDto.java
// public class HostDto {
// 
//     protected String name;
//     protected String ip;
//     protected String identifier;
//     protected String status;
//     protected RemoteHost.RecoveryType type;
// 
//     public HostDto(String name, String ip, String identifier, String status) {
//         this.name = name;
//         this.ip = ip;
//         this.identifier = identifier;
//         this.status = status;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public String getIp() {
//         return ip;
//     }
// 
//     public String getIdentifier() {
//         return identifier;
//     }
// 
//     public String getStatus() {
//         return status;
//     }
// 
//     public RemoteHost.RecoveryType getType() {
//         return type;
//     }
// 
//     public void setType(RemoteHost.RecoveryType type) {
//         this.type = type;
//     }
// }
// 
// Path: app/models/RemoteHost.java
// @Entity
// public class RemoteHost extends BaseModel {
// 
//     public enum RecoveryType {
//         FAILOVER,
//         FAILBACK,
//         NONE
//     }
// 
//     @Required
//     @Column(nullable = false)
//     public RecoveryType type;
// 
//     @Required
//     @MaxSize(255)
//     @Column(length=255, name="host_name", nullable = false)
//     public String hostName;
// }


import dto.objects.ConnectionDto;
import dto.objects.DataCenterDto;
import dto.objects.HostDto;
import models.RemoteHost;
import org.ovirt.engine.sdk.decorators.DataCenter;
import org.ovirt.engine.sdk.decorators.Host;
import org.ovirt.engine.sdk.decorators.StorageConnection;
import play.i18n.Messages;
import java.util.List;
/*
 *   Copyright 2016 ITM, S.A.
 *
 *   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`](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 dto;



/**
 * Created by jandrad on 26/01/16.
 */
public class DtoHelper {

    public static HostDto getHostDto(Host host) {
        return new HostDto(host.getName(), host.getAddress(), host.getDescription(), Messages.get(host.getStatus().getState()));
    }

    public static ConnectionDto getConnectionDto(StorageConnection connection) {
        return new ConnectionDto(connection.getAddress(), connection.getTarget());
    }

// Path: app/dto/objects/ConnectionDto.java
// public class ConnectionDto {
// 
//     protected String ipAddress;
//     protected String iqn;
// 
//     public ConnectionDto(String ipAddress, String iqn) {
//         this.ipAddress = ipAddress;
//         this.iqn = iqn;
//     }
// 
//     public String getIpAddress() {
//         return ipAddress;
//     }
// 
//     public void setIpAddress(String ipAddress) {
//         this.ipAddress = ipAddress;
//     }
// 
//     public String getIqn() {
//         return iqn;
//     }
// 
//     public void setIqn(String iqn) {
//         this.iqn = iqn;
//     }
// }
// 
// Path: app/dto/objects/DataCenterDto.java
// public class DataCenterDto {
// 
//     protected String name;
//     protected String status;
// 
//     public DataCenterDto(String name, String status) {
//         this.name = name;
//         this.status = status;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public String getStatus() {
//         return status;
//     }
// }
// 
// Path: app/dto/objects/HostDto.java
// public class HostDto {
// 
//     protected String name;
//     protected String ip;
//     protected String identifier;
//     protected String status;
//     protected RemoteHost.RecoveryType type;
// 
//     public HostDto(String name, String ip, String identifier, String status) {
//         this.name = name;
//         this.ip = ip;
//         this.identifier = identifier;
//         this.status = status;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public String getIp() {
//         return ip;
//     }
// 
//     public String getIdentifier() {
//         return identifier;
//     }
// 
//     public String getStatus() {
//         return status;
//     }
// 
//     public RemoteHost.RecoveryType getType() {
//         return type;
//     }
// 
//     public void setType(RemoteHost.RecoveryType type) {
//         this.type = type;
//     }
// }
// 
// Path: app/models/RemoteHost.java
// @Entity
// public class RemoteHost extends BaseModel {
// 
//     public enum RecoveryType {
//         FAILOVER,
//         FAILBACK,
//         NONE
//     }
// 
//     @Required
//     @Column(nullable = false)
//     public RecoveryType type;
// 
//     @Required
//     @MaxSize(255)
//     @Column(length=255, name="host_name", nullable = false)
//     public String hostName;
// }


// Path: app/dto/DtoHelper.java
import dto.objects.ConnectionDto;
import dto.objects.DataCenterDto;
import dto.objects.HostDto;
import models.RemoteHost;
import org.ovirt.engine.sdk.decorators.DataCenter;
import org.ovirt.engine.sdk.decorators.Host;
import org.ovirt.engine.sdk.decorators.StorageConnection;
import play.i18n.Messages;
import java.util.List;

/*
 *   Copyright 2016 ITM, S.A.
 *
 *   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`](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 dto;



/**
 * Created by jandrad on 26/01/16.
 */
public class DtoHelper {

    public static HostDto getHostDto(Host host) {
        return new HostDto(host.getName(), host.getAddress(), host.getDescription(), Messages.get(host.getStatus().getState()));
    }

    public static ConnectionDto getConnectionDto(StorageConnection connection) {
        return new ConnectionDto(connection.getAddress(), connection.getTarget());
    }

    public static DataCenterDto getDataCenterDto(DataCenter dataCenter) {