remove ServerProperties

6.19.x
Gennady Azarenkov 2017-05-21 18:28:45 +03:00
parent 258f0c8971
commit b38f73da76
3 changed files with 0 additions and 214 deletions

View File

@ -1,44 +0,0 @@
/*******************************************************************************
* Copyright (c) 2012-2017 Codenvy, S.A.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Codenvy, S.A. - initial API and implementation
*******************************************************************************/
package org.eclipse.che.api.core.model.machine;
import org.eclipse.che.commons.annotation.Nullable;
/**
* Not mandatory properties of a {OldServer}
*
* @author Mario Loriedo
*/
public interface ServerProperties {
/**
* Path to access the server.
*/
@Nullable
String getPath();
/**
* Internal address of the server in form <b>host:port</b>.
* <p>
* Used by wsmaster to communicate with the server
*/
@Nullable
String getInternalAddress();
/**
* Internal Url of the server, e.g.&nbsp;http://localhost:8080.
* <p>
* Used by wsmaster to comunicate with the server
*/
@Nullable
String getInternalUrl();
}

View File

@ -1,79 +0,0 @@
/*******************************************************************************
* Copyright (c) 2012-2017 Codenvy, S.A.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Codenvy, S.A. - initial API and implementation
*******************************************************************************/
package org.eclipse.che.ide.api.machine;
import org.eclipse.che.api.core.model.machine.ServerProperties;
import java.util.Objects;
/**
* Describe development machine server instance.
*
* @link ServerProperties
* @author Mario Loriedo
*/
public class MachineServerProperties implements ServerProperties {
private final String path;
private final String internalAddress;
private final String internalUrl;
public MachineServerProperties(ServerProperties properties) {
path = properties.getPath();
internalAddress = properties.getInternalAddress();
internalUrl = properties.getInternalUrl();
}
@Override
public String getInternalAddress() {
return internalAddress;
}
@Override
public String getPath() {
return path;
}
@Override
public String getInternalUrl() {
return internalUrl;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof MachineServerProperties)) return false;
final MachineServerProperties other = (MachineServerProperties)o;
return Objects.equals(path, other.path) &&
Objects.equals(internalAddress, other.internalAddress) &&
Objects.equals(internalUrl, other.internalUrl);
}
@Override
public int hashCode() {
int hash = 7;
hash = hash * 31 + Objects.hashCode(path);
hash = hash * 31 + Objects.hashCode(internalAddress);
hash = hash * 31 + Objects.hashCode(internalUrl);
return hash;
}
@Override
public String toString() {
return "MachineServerProperties{" +
"path='" + path + '\'' +
", internalAddress='" + internalAddress + '\'' +
", internalUrl='" + internalUrl + '\'' +
'}';
}
}

View File

@ -1,91 +0,0 @@
/*******************************************************************************
* Copyright (c) 2012-2017 Codenvy, S.A.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Codenvy, S.A. - initial API and implementation
*******************************************************************************/
package org.eclipse.che.api.workspace.server.model.impl;
import org.eclipse.che.api.core.model.machine.ServerProperties;
import java.util.Objects;
/**
* Data object for {@link ServerProperties}.
*
* @author Mario Loriedo
*/
public class ServerPropertiesImpl implements ServerProperties {
private String path;
private String internalAddress;
private String internalUrl;
public ServerPropertiesImpl(String path, String internalAddress, String internalUrl) {
this.internalAddress = internalAddress;
this.internalUrl = internalUrl;
this.path = path;
}
public ServerPropertiesImpl(ServerProperties properties) {
this(properties.getPath(), properties.getInternalAddress(), properties.getInternalUrl());
}
@Override
public String getPath() { return path; }
public void setPath(String path) {
this.path = path;
}
@Override
public String getInternalAddress() { return internalAddress; }
public void setInternalAddress(String internalAddress) {
this.internalAddress = internalAddress;
}
@Override
public String getInternalUrl() {
return internalUrl;
}
public void setInternalUrl(String internalUrl) {
this.internalUrl = internalUrl;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof ServerPropertiesImpl)) return false;
final ServerPropertiesImpl other = (ServerPropertiesImpl)o;
return Objects.equals(path, other.path) &&
Objects.equals(internalAddress, other.internalAddress) &&
Objects.equals(internalUrl, other.internalUrl);
}
@Override
public int hashCode() {
int hash = 7;
hash = hash * 31 + Objects.hashCode(path);
hash = hash * 31 + Objects.hashCode(internalAddress);
hash = hash * 31 + Objects.hashCode(internalUrl);
return hash;
}
@Override
public String toString() {
return "OldServerImpl{" +
"path='" + path + '\'' +
", internalAddress='" + internalAddress + '\'' +
", internalUrl='" + internalUrl + '\'' +
'}';
}
}