diff --git a/core/che-core-api-model/src/main/java/org/eclipse/che/api/core/model/machine/ServerProperties.java b/core/che-core-api-model/src/main/java/org/eclipse/che/api/core/model/machine/ServerProperties.java deleted file mode 100644 index fbf3394ea8..0000000000 --- a/core/che-core-api-model/src/main/java/org/eclipse/che/api/core/model/machine/ServerProperties.java +++ /dev/null @@ -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 host:port. - *
- * Used by wsmaster to communicate with the server - */ - @Nullable - String getInternalAddress(); - - - /** - * Internal Url of the server, e.g. http://localhost:8080. - *
- * Used by wsmaster to comunicate with the server - */ - @Nullable - String getInternalUrl(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/machine/MachineServerProperties.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/machine/MachineServerProperties.java deleted file mode 100644 index 41d863e440..0000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/machine/MachineServerProperties.java +++ /dev/null @@ -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 + '\'' + - '}'; - } - -} diff --git a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/model/impl/ServerPropertiesImpl.java b/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/model/impl/ServerPropertiesImpl.java deleted file mode 100644 index 7ae1b1ae8d..0000000000 --- a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/model/impl/ServerPropertiesImpl.java +++ /dev/null @@ -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 + '\'' + - '}'; - } -}