X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fadsal%2Fusermanager%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fusermanager%2FServerConfig.java;fp=opendaylight%2Fadsal%2Fusermanager%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fusermanager%2FServerConfig.java;h=0000000000000000000000000000000000000000;hb=50f88249a65c52ba56a48852b71ce432fed2bbeb;hp=3145f2095f4d480af5f91bc5e2303fd89246ae14;hpb=abfa9a03550cbe9fccc4420684dced175dd6d119;p=controller.git diff --git a/opendaylight/adsal/usermanager/api/src/main/java/org/opendaylight/controller/usermanager/ServerConfig.java b/opendaylight/adsal/usermanager/api/src/main/java/org/opendaylight/controller/usermanager/ServerConfig.java deleted file mode 100644 index 3145f2095f..0000000000 --- a/opendaylight/adsal/usermanager/api/src/main/java/org/opendaylight/controller/usermanager/ServerConfig.java +++ /dev/null @@ -1,100 +0,0 @@ - -/* - * Copyright (c) 2013 Cisco Systems, Inc. and others. 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 - */ - -package org.opendaylight.controller.usermanager; - -import java.io.Serializable; - -import org.opendaylight.controller.configuration.ConfigurationObject; - -/** - * Configuration Java Object which represents a Remote AAA server configuration - * information for User Manager. - */ -public class ServerConfig extends ConfigurationObject implements Serializable { - private static final long serialVersionUID = 1L; - - // Order matters: JSP file expects following fields in the following order - private String ip; - private String secret; - private String protocol; - - public ServerConfig() { - } - - public ServerConfig(String ip, String secret, String protocol) { - this.ip = ip; - this.secret = secret; - this.protocol = protocol; - } - - public String getAddress() { - return ip; - } - - public String getSecret() { - return secret; - } - - public String getProtocol() { - return protocol; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((ip == null) ? 0 : ip.hashCode()); - result = prime * result - + ((protocol == null) ? 0 : protocol.hashCode()); - result = prime * result + ((secret == null) ? 0 : secret.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - ServerConfig other = (ServerConfig) obj; - if (ip == null) { - if (other.ip != null) { - return false; - } - } else if (!ip.equals(other.ip)) { - return false; - } - if (protocol == null) { - if (other.protocol != null) { - return false; - } - } else if (!protocol.equals(other.protocol)) { - return false; - } - if (secret == null) { - if (other.secret != null) { - return false; - } - } else if (!secret.equals(other.secret)) { - return false; - } - return true; - } - - public boolean isValid() { - return (ip != null && !ip.isEmpty() && secret != null && !secret - .isEmpty()); - } -}