Package org.geoserver.config

Examples of org.geoserver.config.GeoServerPersister


        Path dataDir = Files.createTempDirectory(Paths.get("target"), "data");
        GeoServerResourceLoader resourceLoader = new GeoServerResourceLoader(dataDir.toFile());

        Catalog cat = new CatalogImpl();
        cat.setResourceLoader(resourceLoader);
        cat.addListener(new GeoServerPersister(resourceLoader, new XStreamPersisterFactory().createXMLPersister()));
        return cat;
    }
View Full Code Here


    protected void createCatalog() throws IOException {
        CatalogImpl catalog = new CatalogImpl();
        catalog.setExtendedValidation(false);
        catalog.setResourceLoader(new GeoServerResourceLoader(data));
       
        catalog.addListener(new GeoServerPersister(catalog.getResourceLoader(),
            createXStreamPersister()));

        //workspaces
        addWorkspace(DEFAULT_PREFIX, DEFAULT_URI, catalog);
        addWorkspace(SF_PREFIX, SF_URI, catalog);
View Full Code Here

        this.catalog = catalog;
    }

    protected void createConfig() {
        GeoServerImpl geoServer = new GeoServerImpl();
        geoServer.addListener(new GeoServerPersister(new GeoServerResourceLoader(data),
            createXStreamPersister()));

        GeoServerInfo global = geoServer.getFactory().createGlobal();
        geoServer.setGlobal(global);
        addSettings(null, geoServer);
View Full Code Here

        GeoServerPasswordEncoder encoder = getPlainTextPasswordEncoder();
        String prefix=encoder.getPrefix()+GeoServerPasswordEncoder.PREFIX_DELIMTER;
        config.setConfigPasswordEncrypterName(encoder.getName());
        getSecurityManager().saveSecurityConfig(config);

        GeoServerPersister p =
            new GeoServerPersister( getResourceLoader(), new XStreamPersisterFactory().createXMLPersister() );
        cat.addListener( p );
       
        WorkspaceInfo ws = cat.getFactory().createWorkspace();
        ws.setName("password");
        cat.add(ws);
View Full Code Here

TOP

Related Classes of org.geoserver.config.GeoServerPersister

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.