Search in sources :

Example 1 with GeoServerInfoImpl

use of org.geoserver.config.impl.GeoServerInfoImpl in project polymap4-core by Polymap4.

the class GeoServerLoader method loadGeoServer.

protected void loadGeoServer(GeoServerServlet service) {
    IMap map = service.map;
    log.info("Loading GeoServer...");
    GeoServerInfoImpl gsInfo = new GeoServerInfoImpl(geoserver);
    gsInfo.setTitle("GeoServer powered by mapzone.io");
    gsInfo.setId(simpleName(map.id()) + "-gs");
    // XXX alias is added by ArenaConfig when running in mapzone (see comment there)
    String proxyBaseUrl = GeoServerPlugin.instance().baseUrl.map(s -> !s.contains(service.alias) ? s + service.alias : s).get();
    gsInfo.setProxyBaseUrl(proxyBaseUrl);
    log.info("Proxy base URL: " + gsInfo.getProxyBaseUrl());
    gsInfo.setVerbose(true);
    gsInfo.setVerboseExceptions(true);
    geoserver.setGlobal(gsInfo);
    log.info("GeoServer: " + gsInfo);
    createWMSInfo(map);
    createWFSInfo(map);
}
Also used : ILayer(org.polymap.core.project.ILayer) GMLInfo(org.geoserver.wfs.GMLInfo) WorkspaceInfoImpl(org.geoserver.catalog.impl.WorkspaceInfoImpl) Supplier(java.util.function.Supplier) GeoServerExtensions(org.geoserver.platform.GeoServerExtensions) ArrayList(java.util.ArrayList) WMSInfoImpl(org.geoserver.wms.WMSInfoImpl) Version(org.geotools.util.Version) Lists(com.google.common.collect.Lists) GeoServerServlet(org.polymap.service.geoserver.GeoServerServlet) ServiceLevel(org.geoserver.wfs.WFSInfo.ServiceLevel) GeoServerUtils.simpleName(org.polymap.service.geoserver.GeoServerUtils.simpleName) WFSInfoImpl(org.geoserver.wfs.WFSInfoImpl) GeoServerInitializer(org.geoserver.config.GeoServerInitializer) Catalog(org.geoserver.catalog.Catalog) ServiceInfo(org.geoserver.config.ServiceInfo) WFSInfo(org.geoserver.wfs.WFSInfo) GeoServerReinitializer(org.geoserver.config.GeoServerReinitializer) GeoServerPlugin(org.polymap.service.geoserver.GeoServerPlugin) Keyword(org.geoserver.catalog.Keyword) GeoServerInfoImpl(org.geoserver.config.impl.GeoServerInfoImpl) GeoServer(org.geoserver.config.GeoServer) BeansException(org.springframework.beans.BeansException) Wrapper(org.geoserver.catalog.Wrapper) GeoServerResourceLoader(org.geoserver.platform.GeoServerResourceLoader) GMLInfoImpl(org.geoserver.wfs.GMLInfoImpl) ApplicationContext(org.springframework.context.ApplicationContext) Consumer(java.util.function.Consumer) BeanPostProcessor(org.springframework.beans.factory.config.BeanPostProcessor) List(java.util.List) GeoServerUtils(org.polymap.service.geoserver.GeoServerUtils) SrsNameStyle(org.geoserver.wfs.GMLInfo.SrsNameStyle) PublishedType(org.geoserver.catalog.PublishedType) DisposableBean(org.springframework.beans.factory.DisposableBean) Log(org.apache.commons.logging.Log) LogFactory(org.apache.commons.logging.LogFactory) IMap(org.polymap.core.project.IMap) ApplicationContextAware(org.springframework.context.ApplicationContextAware) IMap(org.polymap.core.project.IMap) GeoServerInfoImpl(org.geoserver.config.impl.GeoServerInfoImpl)

Aggregations

Lists (com.google.common.collect.Lists)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Consumer (java.util.function.Consumer)1 Supplier (java.util.function.Supplier)1 Log (org.apache.commons.logging.Log)1 LogFactory (org.apache.commons.logging.LogFactory)1 Catalog (org.geoserver.catalog.Catalog)1 Keyword (org.geoserver.catalog.Keyword)1 PublishedType (org.geoserver.catalog.PublishedType)1 Wrapper (org.geoserver.catalog.Wrapper)1 WorkspaceInfoImpl (org.geoserver.catalog.impl.WorkspaceInfoImpl)1 GeoServer (org.geoserver.config.GeoServer)1 GeoServerInitializer (org.geoserver.config.GeoServerInitializer)1 GeoServerReinitializer (org.geoserver.config.GeoServerReinitializer)1 ServiceInfo (org.geoserver.config.ServiceInfo)1 GeoServerInfoImpl (org.geoserver.config.impl.GeoServerInfoImpl)1 GeoServerExtensions (org.geoserver.platform.GeoServerExtensions)1 GeoServerResourceLoader (org.geoserver.platform.GeoServerResourceLoader)1 GMLInfo (org.geoserver.wfs.GMLInfo)1