/** * Performs the save of the store. * <p> * This method may be subclasses to provide custom save functionality. * </p> */ protected void doSaveStore(WMSStoreInfo info) { getCatalog().save(info); doReturn(StorePage.class); }
/** * Performs the save of the store. * * <p>This method may be subclasses to provide custom save functionality. */ protected void doSaveStore(WMSStoreInfo info) { Catalog catalog = getCatalog(); // Cloning into "expandedStore" through the super class "clone" method WMSStoreInfo expandedStore = catalog.getResourcePool().clone(info, true); getCatalog().validate(expandedStore, false).throwIfInvalid(); getCatalog().save(info); doReturn(StorePage.class); }
final AjaxRequestTarget requestTarget, final Exception error) { getCatalog().getResourcePool().clear(info);
final WMSStoreInfo info, final AjaxRequestTarget requestTarget, final Exception error) { getCatalog().getResourcePool().clear(info);
/** * Uses a "name" parameter to locate the datastore * @param parameters */ public WMSStoreEditPage(PageParameters parameters) { String wsName = parameters.getString(WS_NAME); String storeName = parameters.getString(STORE_NAME); WMSStoreInfo store = getCatalog().getStoreByName(wsName, storeName, WMSStoreInfo.class); initUI(store); }
@Override protected void onSave(WMSStoreInfo info, AjaxRequestTarget target) throws IllegalArgumentException { if (!info.isEnabled()) { doSaveStore(info); } else { try { // try to see if we can connect getCatalog().getResourcePool().clear(info); // do not call info.getWebMapServer cause it ends up calling // resourcepool.getWebMapServer with the unproxied instance (old values) // info.getWebMapServer(null).getCapabilities(); WebMapServer webMapServer = getCatalog().getResourcePool().getWebMapServer(info); webMapServer.getCapabilities(); doSaveStore(info); } catch (Exception e) { confirmSaveOnConnectionFailure(info, target, e); } } }
@Override protected void onSave(WMSStoreInfo info, AjaxRequestTarget target) throws IllegalArgumentException { if(!info.isEnabled()) { doSaveStore(info); } else { try { // try to see if we can connect getCatalog().getResourcePool().clear(info); // do not call info.getWebMapServer cause it ends up calling // resourcepool.getWebMapServer with the unproxied instance (old values) //info.getWebMapServer(null).getCapabilities(); WebMapServer webMapServer = getCatalog().getResourcePool().getWebMapServer(info); webMapServer.getCapabilities(); doSaveStore(info); } catch(Exception e) { confirmSaveOnConnectionFailure(info, target, e); } } }
/** * Uses a "name" parameter to locate the datastore * * @param parameters */ public WMSStoreEditPage(PageParameters parameters) { String wsName = parameters.get(WS_NAME).toOptionalString(); String storeName = parameters.get(STORE_NAME).toString(); WMSStoreInfo store = getCatalog().getStoreByName(wsName, storeName, WMSStoreInfo.class); initUI(store); }