public void setGlobal(GeoServerInfo global) { resolve(global); setId(global.getSettings()); this.global = global; }
public SettingsInfo getSettings() { SettingsInfo settings = null; if (LocalWorkspace.get() != null) { settings = getSettings(LocalWorkspace.get()); } return settings != null ? settings : getGlobal().getSettings(); }
} else if (!adminUsername.equals(other.getAdminUsername())) return false; if (settings == null) { if (other.getSettings() != null) return false; } else if (!settings.equals(other.getSettings())) return false; if (id == null) { if (other.getId() != null) return false;
@Before public void setup() { GeoServerInfo gi = getGeoServer().getGlobal(); gi.getSettings().setProxyBaseUrl(null); getGeoServer().save(gi); }
@Test public void testProxyBase() { GeoServerInfo gi = getGeoServer().getGlobal(); gi.getSettings().setProxyBaseUrl("http://geoserver.org/"); getGeoServer().save(gi); String url = buildURL(BASEURL, "test", null, URLType.SERVICE); assertEquals("http://geoserver.org/test", url); } }
GeoServerInfo gs = persister.load(new ByteArrayInputStream(xml.getBytes()), GeoServerInfo.class); SettingsInfo settings = gs.getSettings(); MetadataMap metadata = settings.getMetadata(); assertEquals(2, metadata.size());
SettingsInfo settings = ws != null ? geoServer.getSettings(ws) : global.getSettings(); if (settings == null) { settings = geoServer.getFactory().createSettings();
@Override public String getCharset(Operation operation) { return gs.getGlobal().getSettings().getCharset(); } }
/** This method is used for extracting the metadata map from the global settings */ public static MetadataMap loadMapFromGlobal() { GeoServerInfo gsInfo = GeoServerExtensions.bean(GeoServer.class).getGlobal(); // Global info should be always not null if (gsInfo != null) { SettingsInfo info = gsInfo.getSettings(); return info != null ? info.getMetadata() : null; } return null; }
String getProxyBaseURL() { GeoServer geoServer = getGeoServer(); if (geoServer != null) { return geoServer.getGlobal().getSettings().getProxyBaseUrl(); } return null; }
@Override protected void handleObjectPut(Object obj) throws Exception { GeoServerInfo geoServerInfo = geoServer.getGlobal(); ContactInfo original = geoServerInfo.getSettings().getContact(); OwsUtils.copy((ContactInfo) obj, original, ContactInfo.class); geoServer.save(geoServerInfo); }
@Override public void initialize(GeoServer geoServer) throws Exception { // Add a new Element to the metadata map GeoServerInfo global = geoServer.getGlobal(); MetadataMap metadata = global.getSettings().getMetadata(); if(!metadata.containsKey(NetCDFSettingsContainer.NETCDFOUT_KEY)){ metadata.put(NetCDFSettingsContainer.NETCDFOUT_KEY, new NetCDFSettingsContainer()); geoServer.save(global); } } }
@Override public void initialize(GeoServer geoServer) throws Exception { // Add a new Element to the metadata map GeoServerInfo global = geoServer.getGlobal(); MetadataMap metadata = global.getSettings().getMetadata(); if (!metadata.containsKey(NetCDFSettingsContainer.NETCDFOUT_KEY)) { metadata.put(NetCDFSettingsContainer.NETCDFOUT_KEY, new NetCDFSettingsContainer()); geoServer.save(global); } } }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); Logging.getLogger("org.geoserver.ows").setLevel(Level.OFF); GeoServerInfo global = getGeoServer().getGlobal(); global.getSettings().setProxyBaseUrl("src/test/resources/geoserver"); getGeoServer().save(global); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); GeoServerInfo global = getGeoServer().getGlobal(); global.getSettings().setProxyBaseUrl("src/test/resources/geoserver"); getGeoServer().save(global); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); GeoServerInfo global = getGeoServer().getGlobal(); global.getSettings().setProxyBaseUrl("src/test/resources/geoserver"); getGeoServer().save(global); }
@Before public void resetServiceConfiguration() throws Exception { GeoServerInfo gs = getGeoServer().getGlobal(); gs.getSettings().setProxyBaseUrl(null); getGeoServer().save(gs); }
@Override protected void setUpInternal() throws Exception { GeoServer gs = getGeoServer(); GeoServerInfo global = gs.getGlobal(); SettingsInfo settings = global.getSettings(); ContactInfo contact = settings.getContact(); contact.setContactOrganization("GeoServer"); contact.setOnlineResource("http://www.geoserver.org"); gs.save(global); ppio = new KMLPPIO(gs); }
@Override protected void setUpInternal() throws Exception { GeoServer gs = getGeoServer(); GeoServerInfo global = gs.getGlobal(); SettingsInfo settings = global.getSettings(); ContactInfo contact = settings.getContact(); contact.setContactOrganization("GeoServer"); contact.setOnlineResource("http://www.geoserver.org"); gs.save(global); ppio = new GPXPPIO(gs); }
@Test public void testGlobal() throws Exception { Catalog cat = getCatalog(); FeatureTypeInfo ft = cat.getFeatureTypeByName("sf", "PrimitiveGeoFeature"); ft.setNumDecimals(-1); cat.save(ft); GeoServerInfo global = getGeoServer().getGlobal(); global.getSettings().setNumDecimals(1); getGeoServer().save(global); Document dom = getAsDOM("wfs?request=getfeature&featureid=PrimitiveGeoFeature.f008&version=1.0.0"); runAssertions(dom, 1); }