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