001/* 002 * The contents of this file are subject to the terms of the Common Development and 003 * Distribution License (the License). You may not use this file except in compliance with the 004 * License. 005 * 006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 007 * specific language governing permission and limitations under the License. 008 * 009 * When distributing Covered Software, include this CDDL Header Notice in each file and include 010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 011 * Header, with the fields enclosed by brackets [] replaced by your own identifying 012 * information: "Portions Copyright [year] [name of copyright owner]". 013 * 014 * Copyright 2006-2008 Sun Microsystems, Inc. 015 */ 016 017package org.opends.quicksetup.installer; 018 019/** 020 * This class is used to provide a data model for the different parameters used 021 * to connect to a server that we want to replicate contents with. 022 * 023 * @see DataReplicationOptions 024 * 025 */ 026public class AuthenticationData 027{ 028 private String hostName; 029 030 private int port; 031 032 private String dn; 033 034 private String pwd; 035 036 private boolean useSecureConnection; 037 038 /** 039 * Sets the server LDAP port. 040 * @param port the server LDAP port. 041 */ 042 public void setPort(int port) 043 { 044 this.port = port; 045 } 046 047 /** 048 * Returns the server LDAP port. 049 * @return the server LDAP port. 050 */ 051 public int getPort() 052 { 053 return port; 054 } 055 056 /** 057 * Returns the Authentication DN. 058 * @return the Authentication DN. 059 */ 060 public String getDn() 061 { 062 return dn; 063 } 064 065 /** 066 * Sets the Authentication DN. 067 * @param dn the Authentication DN. 068 */ 069 public void setDn(String dn) 070 { 071 this.dn = dn; 072 } 073 074 /** 075 * Returns the authentication password. 076 * @return the authentication password. 077 */ 078 public String getPwd() 079 { 080 return pwd; 081 } 082 083 /** 084 * Sets the authentication password. 085 * @param pwd the authentication password. 086 */ 087 public void setPwd(String pwd) 088 { 089 this.pwd = pwd; 090 } 091 092 /** 093 * Returns the host name to connect to. 094 * @return the host name to connect to. 095 */ 096 public String getHostName() 097 { 098 return hostName; 099 } 100 101 /** 102 * Sets the host name to connect to. 103 * @param hostName the host name to connect to. 104 */ 105 public void setHostName(String hostName) 106 { 107 this.hostName = hostName; 108 } 109 110 /** 111 * Returns whether to use a secure connection or not. 112 * @return <CODE>true</CODE> if we must use a secure connection and 113 * <CODE>false</CODE> otherwise. 114 */ 115 public boolean useSecureConnection() 116 { 117 return useSecureConnection; 118 } 119 120 /** 121 * Tells to use a secure connection or not. 122 * @param useSecureConnection use a secure connection or not. 123 */ 124 public void setUseSecureConnection(boolean useSecureConnection) 125 { 126 this.useSecureConnection = useSecureConnection; 127 } 128}