1 /* 2 * Licensed under the GPL License. You may not use this file except in compliance with the License. 3 * You may obtain a copy of the License at 4 * 5 * https://www.gnu.org/licenses/old-licenses/gpl-2.0.html 6 * 7 * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 8 * WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 9 * PURPOSE. 10 */ 11 package psiprobe.beans.accessors; 12 13 import psiprobe.model.DataSourceInfo; 14 15 /** 16 * Part of datasource type abstraction layer. Allows to extent Probe functionality to any kind of 17 * datasources. 18 */ 19 public interface DatasourceAccessor { 20 21 /** 22 * Gets the info. 23 * 24 * @param resource the resource 25 * @return the info 26 * @throws Exception the exception 27 */ 28 DataSourceInfo getInfo(Object resource) throws Exception; 29 30 /** 31 * Reset. 32 * 33 * @param resource the resource 34 * @return true, if successful 35 * @throws Exception the exception 36 */ 37 boolean reset(Object resource) throws Exception; 38 39 /** 40 * Can map. 41 * 42 * @param resource the resource 43 * @return true, if successful 44 */ 45 boolean canMap(Object resource); 46 }