/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.modules.j2ee.jboss4.config; import org.netbeans.modules.j2ee.deployment.plugins.api.Datasource; /** * * @author Libor Kotouc */ public final class JBossDatasource implements Datasource { private String jndiName; private String url; private String username; private String password; private String driverClassName; private String minPoolSize = "5"; // NOI18N private String maxPoolSize = "20"; // NOI18N private String idleTimeoutMinutes = "5"; // NOI18N private String description; public JBossDatasource(String jndiName, String url, String username, String password, String driverClassName) { this.jndiName = jndiName; this.url = url; this.username = username; this.password = password; this.driverClassName = driverClassName; } public String getJndiName() { return jndiName; } public String getUrl() { return url; } public String getUsername() { return username; } public String getPassword() { return password; } public String getDriverClassName() { return driverClassName; } public String getMinPoolSize() { return minPoolSize; } public String getMaxPoolSize() { return maxPoolSize; } public String getIdleTimeoutMinutes() { return idleTimeoutMinutes; } public String getDescription() { if (description == null) { //TODO implement some meaningful description description = getJndiName() + " [" + getUrl() + "]"; } return description; } public String toString() { return getDescription(); } }