@Test public void testCanProcess() { Map params = new HashMap(); assertFalse(factory.canProcess(params)); params.put("dbtype", "arcsde"); params.put("url", "http: assertFalse(factory.canProcess(params)); params.remove("url"); params.put("dbtype", "app-schema"); assertFalse(factory.canProcess(params)); params.put("url", "http: assertTrue(factory.canProcess(params)); }
public boolean canProcess(Map params) { try { Object dbType = AppSchemaDataAccessFactory.DBTYPE.lookUp(params); Object configUrl = AppSchemaDataAccessFactory.URL.lookUp(params); return DBTYPE_STRING.equals(dbType) && configUrl != null; } catch (Exception e) { } return false; }
AppSchemaDataAccessFactory implements DataAccessFactory { public boolean canProcess(Map params) { try { Object dbType = AppSchemaDataAccessFactory.DBTYPE.lookUp(params); Object configUrl = AppSchemaDataAccessFactory.URL.lookUp(params); return DBTYPE_STRING.equals(dbType) && configUrl != null; } catch (Exception e) { } return false; } }
AppSchemaDataAccessFactory implements DataAccessFactory { public boolean canProcess(Map params) { try { Object dbType = AppSchemaDataAccessFactory.DBTYPE.lookUp(params); Object configUrl = AppSchemaDataAccessFactory.URL.lookUp(params); return DBTYPE_STRING.equals(dbType) && configUrl != null; } catch (Exception e) { } return false; } AppSchemaDataAccessFactory(); }
AppSchemaDataAccessFactory implements DataAccessFactory { public boolean canProcess(Map params) { try { Object dbType = AppSchemaDataAccessFactory.DBTYPE.lookUp(params); Object configUrl = AppSchemaDataAccessFactory.URL.lookUp(params); return DBTYPE_STRING.equals(dbType) && configUrl != null; } catch (Exception e) { } return false; } AppSchemaDataAccessFactory(); DataAccess<FeatureType, Feature> createDataStore(Map params); DataStore createNewDataStore(Map params); String getDisplayName(); String getDescription(); DataStoreFactorySpi.Param[] getParametersInfo(); boolean canProcess(Map params); boolean isAvailable(); Map getImplementationHints(); }
AppSchemaDataAccessFactory implements DataAccessFactory { public boolean canProcess(Map params) { try { Object dbType = AppSchemaDataAccessFactory.DBTYPE.lookUp(params); Object configUrl = AppSchemaDataAccessFactory.URL.lookUp(params); return DBTYPE_STRING.equals(dbType) && configUrl != null; } catch (Exception e) { } return false; } AppSchemaDataAccessFactory(); DataAccess<FeatureType, Feature> createDataStore(Map params); DataStore createNewDataStore(Map params); String getDisplayName(); String getDescription(); DataStoreFactorySpi.Param[] getParametersInfo(); boolean canProcess(Map params); boolean isAvailable(); Map getImplementationHints(); static final String DBTYPE_STRING; static final DataAccessFactory.Param DBTYPE; static final DataAccessFactory.Param URL; }