@Test public void testCanProcess() { assertFalse(dsf.canProcess(params)); params.put(WFSDataStoreFactory.URL.key, "http: assertTrue(dsf.canProcess(params)); params.put(WFSDataStoreFactory.USERNAME.key, "groldan"); assertFalse(dsf.canProcess(params)); params.put(WFSDataStoreFactory.PASSWORD.key, "secret"); assertTrue(dsf.canProcess(params)); }
public boolean canProcess(final Map params) { if (params == null) { return false; } try { URL url = (URL) URL.lookUp(params); if( !"http".equalsIgnoreCase(url.getProtocol()) && !"https".equalsIgnoreCase(url.getProtocol())){ return false; } } catch (Exception e) { return false; } if (params.containsKey(USERNAME.key)) { if (!params.containsKey(PASSWORD.key)) { return false; } } else { if (params.containsKey(PASSWORD.key)) { return false; } } return true; }
WFSDataStoreFactory extends AbstractDataStoreFactory { public boolean canProcess(final Map params) { if (params == null) { return false; } try { URL url = (URL) URL.lookUp(params); if( !"http".equalsIgnoreCase(url.getProtocol()) && !"https".equalsIgnoreCase(url.getProtocol())){ return false; } } catch (Exception e) { return false; } if (params.containsKey(USERNAME.key)) { if (!params.containsKey(PASSWORD.key)) { return false; } } else { if (params.containsKey(PASSWORD.key)) { return false; } } return true; } }
WFSDataStoreFactory extends AbstractDataStoreFactory { public boolean canProcess(final Map params) { if (params == null) { return false; } try { URL url = (URL) URL.lookUp(params); if( !"http".equalsIgnoreCase(url.getProtocol()) && !"https".equalsIgnoreCase(url.getProtocol())){ return false; } } catch (Exception e) { return false; } if (params.containsKey(USERNAME.key)) { if (!params.containsKey(PASSWORD.key)) { return false; } } else { if (params.containsKey(PASSWORD.key)) { return false; } } return true; }  }
WFSDataStoreFactory extends AbstractDataStoreFactory { public boolean canProcess(final Map params) { if (params == null) { return false; } try { URL url = (URL) URL.lookUp(params); if( !"http".equalsIgnoreCase(url.getProtocol()) && !"https".equalsIgnoreCase(url.getProtocol())){ return false; } } catch (Exception e) { return false; } if (params.containsKey(USERNAME.key)) { if (!params.containsKey(PASSWORD.key)) { return false; } } else { if (params.containsKey(PASSWORD.key)) { return false; } } return true; }  WFSDataStore createDataStore(final Map params); DataStore createNewDataStore(final Map params); String getDescription(); Param[] getParametersInfo(); boolean canProcess(final Map params); String getDisplayName(); boolean isAvailable(); static URL createGetCapabilitiesRequest(URL host, Version version); static URL createGetCapabilitiesRequest(final URL host); }
WFSDataStoreFactory extends AbstractDataStoreFactory { public boolean canProcess(final Map params) { if (params == null) { return false; } try { URL url = (URL) URL.lookUp(params); if( !"http".equalsIgnoreCase(url.getProtocol()) && !"https".equalsIgnoreCase(url.getProtocol())){ return false; } } catch (Exception e) { return false; } if (params.containsKey(USERNAME.key)) { if (!params.containsKey(PASSWORD.key)) { return false; } } else { if (params.containsKey(PASSWORD.key)) { return false; } } return true; }  WFSDataStore createDataStore(final Map params); DataStore createNewDataStore(final Map params); String getDescription(); Param[] getParametersInfo(); boolean canProcess(final Map params); String getDisplayName(); boolean isAvailable(); static URL createGetCapabilitiesRequest(URL host, Version version); static URL createGetCapabilitiesRequest(final URL host); static final WFSFactoryParam<URL> URL; static final WFSFactoryParam<Boolean> PROTOCOL; static final WFSFactoryParam<String> USERNAME; static final WFSFactoryParam<String> PASSWORD; static final WFSFactoryParam<String> ENCODING; static final WFSFactoryParam<Integer> TIMEOUT; static final WFSFactoryParam<Integer> BUFFER_SIZE; static final WFSFactoryParam<Boolean> TRY_GZIP; static final WFSFactoryParam<Boolean> LENIENT; static final WFSFactoryParam<Integer> MAXFEATURES; static final WFSFactoryParam<Integer> FILTER_COMPLIANCE; static final WFSFactoryParam<String> WFS_STRATEGY; }