/*
 *
 * Copyright (C)  5-sept-2003 Jean-Yves Beaujean 
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,  59
 * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 */
package jxtray.connection;


public class JxtConnectionParam
{
	private String name;
	private String login;
	private String password;
	private String host;
	private boolean connected = false;
	private boolean passwordPrompt = false;
	private String jdbcurl;
	
	
	public JxtConnectionParam()
	{
	}
	
	/**
	 * @return boolean
	 */
	public boolean isConnected() 
	{
		return connected;
	}

	/**
	 * @param connected
	 */
	public void setConnected(boolean connected) 
	{
		this.connected = connected;
	}
	
	/**
	 * @param pwprompt
	 */
	public void setPasswordPrompt(boolean pwprompt) 
	{
		this.passwordPrompt = pwprompt;
	}
	
	/**
	 * @param pwprompt
	 */
	public void setPasswordPrompt(String pwprompt) 
	{
		try
		{
			if ( "TRUE".equals(pwprompt.toUpperCase()))
				this.passwordPrompt = true;
			else
				this.passwordPrompt = false;
		}
		catch ( Exception e )
		{
			this.passwordPrompt = false;
		}
	}	
		
	/**
	 * @return boolean
	 */
	public boolean isPasswordPrompt() 
	{
		return passwordPrompt;
	}		

	
	/**
	 * @return String
	 */
	public String getLogin() 
	{
		return login;
	}

	/**
	 * @param login
	 */
	public void setLogin(String login) {
		this.login = login;
	}

	/**
	 * @return String
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return String
	 */ 
	public String getPassword() {
		return password;
	}

	/**
	 * @param password
	 */
	public void setPassword(String password) {
		this.password = password;
	}


	/**
	 * @return String
	 */
	public String getHost() {
		return host;
	}

	/**
	 * @param host
	 */
	public void setHost(String host) {
		this.host = host;
	}

	

	/**
	 * @return String
	 */
	public String getJdbcurl() {
		return jdbcurl;
	}

	/**
	 * @param jdbcurl
	 * void
	 */
	public void setJdbcurl(String jdbcurl) {
		this.jdbcurl = jdbcurl;
	}

}
