2 * Copyright 2016 Huawei Technologies Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.csm.api;
18 import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.constant.Constant;
21 * Connection Information
25 * @version NFVO 0.5 Sep 14, 2016
27 public class ConnectInfo {
31 private String userName;
33 private String userPwd;
35 private String authenticateMode;
44 public ConnectInfo(String url) {
45 this.url = url == null ? "" : url;
46 this.authenticateMode = Constant.ANONYMOUS;
56 * @param authenticateMode
59 public ConnectInfo(String url, String userName, String userPwd, String authenticateMode) {
60 this.url = url == null ? "" : url;
61 this.userName = userName == null ? "" : userName;
62 this.userPwd = userPwd == null ? "" : userPwd;
63 this.authenticateMode = authenticateMode == null ? "" : authenticateMode;
66 public String getUrl() {
70 public void setUrl(String vnfUrl) {
74 public String getUserName() {
78 public void setUserName(String vnfUserName) {
79 this.userName = vnfUserName;
82 public String getUserPwd() {
86 public void setUserPwd(String vnfUserPwd) {
87 this.userPwd = vnfUserPwd;
90 public String getAuthenticateMode() {
91 return this.authenticateMode;
94 public void setAuthenticateMode(String vnfAuthenticateMode) {
95 this.authenticateMode = vnfAuthenticateMode;
99 public String toString() {
100 return "ConnectInfo [AuthenticateMode: " + authenticateMode + ",url=" + url + ", userName=" + userName + ']';
104 public int hashCode() {
105 final int prime = 31;
107 result = prime * result + ((url == null) ? 0 : url.hashCode());
112 public boolean equals(Object obj) {
120 if(!(obj instanceof ConnectInfo)) {
124 if(getClass() != obj.getClass()) {
127 ConnectInfo other = (ConnectInfo)obj;
129 if(other.url != null) {
132 } else if(!url.equals(other.url)) {