public void setType(String type) { delegate.setType(type); }
/** Builds a new WMS store */ public WMSStoreInfo buildWMSStore(String name) throws IOException { WMSStoreInfo info = catalog.getFactory().createWebMapServer(); buildStore(info, name); info.setType("WMS"); info.setMaxConnections(WMSStoreInfoImpl.DEFAULT_MAX_CONNECTIONS); info.setConnectTimeout(WMSStoreInfoImpl.DEFAULT_CONNECT_TIMEOUT); info.setReadTimeout(WMSStoreInfoImpl.DEFAULT_READ_TIMEOUT); return info; }
public WMSStoreInfo clone(final WMSStoreInfo source, boolean allowEnvParametrization) { WMSStoreInfo target; try { target = (WMSStoreInfo) SerializationUtils.clone(source); if (target instanceof StoreInfoImpl && target.getCatalog() == null) { ((StoreInfoImpl) target).setCatalog(catalog); } } catch (Exception e) { target = catalog.getFactory().createWebMapServer(); target.setDescription(source.getDescription()); target.setEnabled(source.isEnabled()); target.setName(source.getName()); target.setType(source.getType()); target.setWorkspace(source.getWorkspace()); } setConnectionParameters(source, target); if (allowEnvParametrization) { // Resolve GeoServer Environment placeholders final GeoServerEnvironment gsEnvironment = GeoServerExtensions.bean(GeoServerEnvironment.class); if (gsEnvironment != null && GeoServerEnvironment.ALLOW_ENV_PARAMETRIZATION) { target.setCapabilitiesURL( (String) gsEnvironment.resolveValue(source.getCapabilitiesURL())); target.setUsername((String) gsEnvironment.resolveValue(source.getUsername())); target.setPassword((String) gsEnvironment.resolveValue(source.getPassword())); } } return target; }
wms.setType("WMS"); wms.setCapabilitiesURL("http://fake.url"); wms.setWorkspace(ws);
protected void clone(final WMSStoreInfo source, WMSStoreInfo target) { target.setDescription(source.getDescription()); target.setEnabled(source.isEnabled()); target.setName(source.getName()); target.setType(source.getType()); target.setCapabilitiesURL(source.getCapabilitiesURL()); target.setWorkspace(source.getWorkspace()); target.setUsername(source.getUsername()); target.setPassword(source.getPassword()); target.setUseConnectionPooling(source.isUseConnectionPooling()); target.setMaxConnections(source.getMaxConnections()); target.setConnectTimeout(source.getConnectTimeout()); target.setReadTimeout(source.getReadTimeout()); }
wmsStore.setName("wmsStore-Name"); wmsStore.setWorkspace(workspace); wmsStore.setType("wmsStore-Type"); wmsStore.setDescription("wmsStore-Description"); wmsStore.setCapabilitiesURL("wmsStore-CapabilitiesURL");