Examples of WMSStoreInfo


Examples of org.geoserver.catalog.WMSStoreInfo

                HierarchicalStreamReader reader, UnmarshallingContext context) {
            StoreInfo store = (StoreInfo) super.doUnmarshal(result, reader, context);
           
            // 2.1.3+ backwards compatibility check
            if (store instanceof WMSStoreInfo) {
                WMSStoreInfo wmsStore = (WMSStoreInfo) store;
                MetadataMap metadata = wmsStore.getMetadata();
                Integer maxConnections = null;
                Integer connectTimeout = null;
                Integer readTimeout = null;
                if (metadata != null) {
                    maxConnections = metadata.get("maxConnections", Integer.class);
                    connectTimeout = metadata.get("connectTimeout", Integer.class);
                    readTimeout = metadata.get("readTimeout", Integer.class);
                    metadata.remove("maxConnections");
                    metadata.remove("connectTimeout");
                    metadata.remove("readTimeout");
                }
                if (wmsStore.getMaxConnections() <= 0) {
                    wmsStore.setMaxConnections(maxConnections != null
                            && maxConnections.intValue() > 0 ? maxConnections
                            : WMSStoreInfoImpl.DEFAULT_MAX_CONNECTIONS);
                }
                if (wmsStore.getConnectTimeout() <= 0) {
                    wmsStore.setConnectTimeout(connectTimeout != null
                            && connectTimeout.intValue() > 0 ? connectTimeout
                            : WMSStoreInfoImpl.DEFAULT_CONNECT_TIMEOUT);
                }
                if (wmsStore.getReadTimeout() <= 0) {
                    wmsStore.setReadTimeout(readTimeout != null && readTimeout.intValue() > 0 ? readTimeout
                            : WMSStoreInfoImpl.DEFAULT_READ_TIMEOUT);
                }
            }

            //process any parameters that require decryption
View Full Code Here

Examples of org.geoserver.catalog.WMSStoreInfo

                                }
                            }
                        } else {
                            f = new File( sd, "wmsstore.xml" );
                            if(f.exists()) {
                                WMSStoreInfo wms = null;
                                try {
                                    wms = depersist( xp, f, WMSStoreInfo.class );
                                    catalog.add( wms );
                               
                                    LOGGER.info( "Loaded wmsstore '" + wms.getName() +"'");
                                } catch( Exception e ) {
                                    LOGGER.log( Level.WARNING, "Failed to load wms store '" + sd.getName() +"'", e);
                                    continue;
                                }
                               
View Full Code Here

Examples of org.geoserver.catalog.WMSStoreInfo

            throw new RestletException( "", Status.CLIENT_ERROR_NOT_FOUND );
        }

        LOGGER.fine( "GET wms layer " + wmsstore + "," + wmslayer );
        WMSStoreInfo wms = catalog.getStoreByName(workspace, wmsstore, WMSStoreInfo.class);
        return catalog.getResourceByStore( wms, wmslayer, WMSLayerInfo.class );
    }
View Full Code Here

Examples of org.geoserver.catalog.WMSStoreInfo

        String wmsstore = getAttribute( "wmsstore");

        WMSLayerInfo wml = (WMSLayerInfo) object;
        
        //ensure the store matches up
        WMSStoreInfo wms = catalog.getStoreByName( workspace, wmsstore, WMSStoreInfo.class);
        if ( wml.getStore() != null ) {
            if ( !wmsstore.equals( wml.getStore().getName() ) ) {
                throw new RestletException( "Expected wms store " + wmsstore +
                " but client specified " + wml.getStore().getName(), Status.CLIENT_ERROR_FORBIDDEN );
            }
View Full Code Here

Examples of org.geoserver.catalog.WMSStoreInfo

       
        String workspace = getAttribute("workspace");
        String wmsstore = getAttribute("wmsstore");
        String wmslayer = getAttribute("wmslayer");
       
        WMSStoreInfo wms = catalog.getStoreByName(workspace, wmsstore, WMSStoreInfo.class);
        WMSLayerInfo original = catalog.getResourceByStore( wms,  wmslayer, WMSLayerInfo.class );
        new CatalogBuilder(catalog).updateWMSLayer(original,wml);
        catalog.validate(original, false).throwIfInvalid();
        catalog.save( original );
       
View Full Code Here

Examples of org.geoserver.catalog.WMSStoreInfo

        String workspace = getAttribute("workspace");
        String wmsstore = getAttribute("wmsstore");
        String wmslayer = getAttribute("wmslayer");
        boolean recurse = getQueryStringValue("recurse", Boolean.class, false);
       
        WMSStoreInfo wms = catalog.getStoreByName(workspace, wmsstore, WMSStoreInfo.class);
        WMSLayerInfo wml = catalog.getResourceByStore( wms,  wmslayer, WMSLayerInfo.class );
        List<LayerInfo> layers = catalog.getLayers(wml);
       
        if (recurse) {
            //by recurse we clear out all the layers that public this resource
View Full Code Here

Examples of org.geoserver.catalog.WMSStoreInfo

                if ( obj instanceof NamespaceInfo ) {
                    NamespaceInfo ns = (NamespaceInfo) obj;
                    encodeLink( "/namespaces/" + ns.getPrefix(), writer);
                }
                if ( obj instanceof WMSStoreInfo ) {
                    WMSStoreInfo ds = (WMSStoreInfo) obj;
                    encodeLink( "/workspaces/" + ds.getWorkspace().getName() + "/wmsstores/" +
                        ds.getName(), writer );
                }
            }
        });
    }
View Full Code Here

Examples of org.geoserver.catalog.WMSStoreInfo

    @Override
    protected Object handleObjectGet() {
        String workspace = (String) getRequest().getAttributes().get( "workspace" );
        String wmsstore = (String) getRequest().getAttributes().get( "wmsstore" );
       
        WMSStoreInfo info = catalog.getStoreByName( workspace, wmsstore, WMSStoreInfo.class );
        if ( info == null ) {
            throw new RestletException( "No such WMS store: " + wmsstore, Status.CLIENT_ERROR_NOT_FOUND );
        }
       
        //list of available feature types
        List<String> available = new ArrayList<String>();
        try {
            WebMapServer ds = (WebMapServer) info.getWebMapServer(null);
           
            for ( Layer layer : ds.getCapabilities().getLayerList() ) {
                if(layer.getName() == null || "".equals(layer.getName())) {
                    continue;
                }
View Full Code Here

Examples of org.geoserver.catalog.WMSStoreInfo

        String caps = wms13BaseURL + "?service=WMS&request=GetCapabilities&version=1.3.0";
        TestHttpClientProvider.bind(wms13Client, caps);
       
        // setup the WMS layer
        CatalogBuilder cb = new CatalogBuilder(getCatalog());
        WMSStoreInfo store = cb.buildWMSStore("mock-wms-store-130");
        getCatalog().add(store);
        cb.setStore(store);
        store.setCapabilitiesURL(caps);
        WMSLayerInfo wmsLayer = cb.buildWMSLayer("world4326");
        getCatalog().add(wmsLayer);
        LayerInfo gsLayer = cb.buildLayer(wmsLayer);
        gsLayer.setName(WORLD4326_130);
        getCatalog().add(gsLayer);
View Full Code Here

Examples of org.geoserver.catalog.WMSStoreInfo

        String caps = wms11BaseURL + "?service=WMS&request=GetCapabilities&version=1.1.1";
        TestHttpClientProvider.bind(wms11Client, caps);
       
        // setup the WMS layer
        CatalogBuilder cb = new CatalogBuilder(getCatalog());
        WMSStoreInfo store = cb.buildWMSStore("mock-wms-store-110");
        getCatalog().add(store);
        cb.setStore(store);
        store.setCapabilitiesURL(caps);
        WMSLayerInfo wmsLayer = cb.buildWMSLayer("world4326");
        getCatalog().add(wmsLayer);
        LayerInfo gsLayer = cb.buildLayer(wmsLayer);
        gsLayer.setName(WORLD4326_110);
        getCatalog().add(gsLayer);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.