protected StoreInfo resolve(StoreInfo store) { resolveCollections(store); StoreInfoImpl s = (StoreInfoImpl) store; s.setCatalog(this); return store; }
/** Reattaches a serialized {@link StoreInfo} to the catalog */ public void attach(StoreInfo storeInfo) { storeInfo = ModificationProxy.unwrap(storeInfo); ((StoreInfoImpl) storeInfo).setCatalog(catalog); }
target = (DataStoreInfo) SerializationUtils.clone(source); if (target instanceof StoreInfoImpl && target.getCatalog() == null) { ((StoreInfoImpl) target).setCatalog(catalog);
target = (CoverageStoreInfo) SerializationUtils.clone(source); if (target instanceof StoreInfoImpl && target.getCatalog() == null) { ((StoreInfoImpl) target).setCatalog(catalog);
public WMTSStoreInfo clone(final WMTSStoreInfo source, boolean allowEnvParametrization) { WMTSStoreInfo target; try { target = (WMTSStoreInfo) SerializationUtils.clone(source); if (target instanceof StoreInfoImpl && target.getCatalog() == null) { ((StoreInfoImpl) target).setCatalog(catalog); } } catch (Exception e) { target = catalog.getFactory().createWebMapTileServer(); 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; }
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; }
static StoreInfo resolve(StoreInfo s, Catalog cat, boolean lookupByName) { if (s != null) { StoreInfo resolved = null; if (s.getId() != null) { resolved = cat.getStore(s.getId(), StoreInfo.class); } if (resolved == null && lookupByName) { resolved = cat.getStoreByName(s.getWorkspace(), s.getName(), StoreInfo.class); } if (resolved != null) { s = resolved; } } if (s != null && s.getCatalog() == null && s instanceof StoreInfoImpl) { ((StoreInfoImpl) s).setCatalog(cat); } return resolveCollections(s); }
static StoreInfo resolve(StoreInfo s, Catalog cat, boolean lookupByName) { if (s != null) { StoreInfo resolved = null; if (s.getId() != null) { resolved = cat.getStore(s.getId(), StoreInfo.class); } if (resolved == null && lookupByName) { resolved = cat.getStoreByName(s.getWorkspace(), s.getName(), StoreInfo.class); } if (resolved != null) { s = resolved; } } if (s != null && s.getCatalog() == null && s instanceof StoreInfoImpl) { ((StoreInfoImpl)s).setCatalog(cat); } return resolveCollections(s); }