Package org.geoserver.catalog

Examples of org.geoserver.catalog.ResourcePool$FeatureTypeCache


        if (null == info.getType()) {
            throw new IllegalArgumentException("Coverage type has not been set");
        }

        final Catalog catalog = getCatalog();
        final ResourcePool resourcePool = catalog.getResourcePool();
        resourcePool.clear(info);

        // Map<String, Serializable> connectionParameters = info.getConnectionParameters();

        if (info.isEnabled()) {
            // store's enabled, make sure it works
            LOGGER.finer("Store " + info.getName() + " is enabled, verifying factory availability "
                    + "before saving it...");
            AbstractGridFormat gridFormat = resourcePool.getGridCoverageFormat(info);

            if (gridFormat == null) {
                throw new IllegalArgumentException(
                        "No grid format found capable of connecting to the provided URL."
                                + " To save the store disable it, and check the required libraries are in place");
            }
            try {
                // get the reader through ResourcePool so it resolves relative URL's for us
                GridCoverageReader reader = resourcePool.getGridCoverageReader(info, null);
                LOGGER.info("Connection to store " + info.getName() + " validated. Got a "
                        + reader.getClass().getName() + ". Saving store");
                doSaveStore(info);
                setResponsePage(StorePage.class);
            } catch (IOException e) {
View Full Code Here


            for (CoverageInfo coverage : alreadyConfigured) {
                coverage.setNamespace(namespace);
            }

            ResourcePool resourcePool = catalog.getResourcePool();
            resourcePool.clear(info);
            catalog.save(info);

            for (CoverageInfo coverage : alreadyConfigured) {
                catalog.save(coverage);
            }
View Full Code Here

    // really needed??
    private GeoServerResourceLoader resourceLoader;

    private HibCatalogImpl() {
        super();
        resourcePool = new ResourcePool(this);

        listeners.add(new HibCatalogUpdater());       
    }
View Full Code Here

        if (listeners == null) {
            listeners = new ArrayList<CatalogListener>();
        }

        if (resourcePool == null) {
            resourcePool = new ResourcePool(this);
        }
    }
View Full Code Here

        dataStoreInfo.setName("mockDataStore");
        dataStoreInfo.setEnabled(true);
        dataStoreInfo.setWorkspace(workspaceInfo);

        dataStore = new MemoryDataStore();
        ResourcePool resourcePool = new ResourcePool(catalog) {
            @Override
            public DataStore getDataStore(DataStoreInfo info) throws IOException {
                return dataStore;
            }
        };
View Full Code Here

    public ResourceReference getStoreIcon(final StoreInfo storeInfo) {
       
        Class<?> factoryClass = null;

        Catalog catalog = storeInfo.getCatalog();
        final ResourcePool resourcePool = catalog.getResourcePool();

        if (storeInfo instanceof DataStoreInfo) {
            DataAccessFactory dataStoreFactory = null;
            try {
                dataStoreFactory = resourcePool.getDataStoreFactory((DataStoreInfo) storeInfo);
            } catch (IOException e) {
                LOGGER.log(Level.INFO, "factory class for storeInfo " + storeInfo.getName()
                        + " not found", e);
            }
           
            if(dataStoreFactory != null){
                factoryClass = dataStoreFactory.getClass();
            }
           
        } else if (storeInfo instanceof CoverageStoreInfo) {
            AbstractGridFormat format = resourcePool
                    .getGridCoverageFormat((CoverageStoreInfo) storeInfo);
            if(format != null){
                factoryClass = format.getClass();
            }
        } else {
View Full Code Here

        };
    }

    Reader readFile(StyleInfo style) throws IOException {
        ResourcePool pool = getCatalog().getResourcePool();
        return pool.readStyle(style);
    }
View Full Code Here

     */
    protected ResourcePool resourcePool;
    protected GeoServerResourceLoader resourceLoader;

    public CatalogImpl() {
        resourcePool = new ResourcePool(this);
    }
View Full Code Here

        if ( listeners == null ) {
            listeners = new ArrayList<CatalogListener>();
        }
       
        if ( resourcePool == null ) {
            resourcePool = new ResourcePool(this);
        }
    }
View Full Code Here

        if (storeInfo.getWorkspace() == null) {
            throw new IllegalArgumentException("Workspace not provided");
        }

        final Catalog catalog = getCatalog();
        final ResourcePool resourcePool = catalog.getResourcePool();
        DataAccessFactory dsFactory;
        try {
            dsFactory = resourcePool.getDataStoreFactory(storeInfo);
        } catch (IOException e) {
            String msg = (String) new ResourceModel(
                    "AbstractDataAccessPage.cantGetDataStoreFactory").getObject();
            msg += ": " + e.getMessage();
            throw new IllegalArgumentException(msg);
View Full Code Here

TOP

Related Classes of org.geoserver.catalog.ResourcePool$FeatureTypeCache

Copyright © 2018 www.massapicom. 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.