1 19 20 package org.netbeans.modules.j2ee.deployment.common.api; 21 22 import java.util.LinkedList ; 23 import java.util.List ; 24 import org.openide.util.NbBundle; 25 26 34 public final class DatasourceAlreadyExistsException extends Exception { 35 36 private List <Datasource> datasources; 37 38 45 public DatasourceAlreadyExistsException(List <Datasource> datasources) { 46 if (datasources == null) { 47 throw new NullPointerException (NbBundle.getMessage(getClass(), "ERR_CannotPassNullDatasources")); } 49 this.datasources = datasources; 50 } 51 52 57 public DatasourceAlreadyExistsException(Datasource datasource) { 58 datasources = new LinkedList <Datasource>(); 59 datasources.add(datasource); 60 } 61 62 67 public List <Datasource> getDatasources() { 68 return datasources; 69 } 70 71 } 72 | Popular Tags |