Package org.geoserver.catalog

Examples of org.geoserver.catalog.Catalog.addListener()


        }
       
        //load listeners
        List<CatalogListener> catalogListeners = GeoServerExtensions.extensions( CatalogListener.class );
        for ( CatalogListener l : catalogListeners ) {
            catalog.addListener( l );
        }
        List<ConfigurationListener> configListeners = GeoServerExtensions.extensions( ConfigurationListener.class );
        for ( ConfigurationListener l : configListeners ) {
            geoserver.addListener( l );
        }
View Full Code Here


       
        //add listener now as a converter which will convert from the old style
        // data directory to the new
        GeoServerPersister p = new GeoServerPersister( resourceLoader, xp );
        if ( !legacy ) {
            catalog2.addListener( p );
        }
       
        LegacyCatalogImporter importer = new LegacyCatalogImporter(catalog2);
        importer.setResourceLoader(resourceLoader);
        importer.imprt(resourceLoader.getBaseDirectory());
View Full Code Here

        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;
    }

    protected Map<String,Object> featureData(Object... kvp) {
        if (kvp.length % 2 != 0) {
View Full Code Here

       
        //add listener now as a converter which will convert from the old style
        // data directory to the new
        GeoServerPersister p = new GeoServerPersister( resourceLoader, xp );
        if ( !legacy ) {
            catalog2.addListener( p );
        }
       
        LegacyCatalogImporter importer = new LegacyCatalogImporter(catalog2);
        importer.setResourceLoader(resourceLoader);
        importer.imprt(resourceLoader.getBaseDirectory());
View Full Code Here

       
        //add listener now as a converter which will convert from the old style
        // data directory to the new
        GeoServerPersister p = new GeoServerPersister( resourceLoader, xp );
        if ( !legacy ) {
            catalog2.addListener( p );
        }
       
        LegacyCatalogImporter importer = new LegacyCatalogImporter(catalog2);
        importer.setResourceLoader(resourceLoader);
        importer.imprt(resourceLoader.getBaseDirectory());
View Full Code Here

    protected void onSetUp(SystemTestData testData) throws Exception {
        super.onSetUp(testData);
        Catalog catalog = getCatalog();
        GeoServerPersister p =
            new GeoServerPersister( getResourceLoader(), new XStreamPersisterFactory().createXMLPersister() );
        catalog.addListener( p );
    }

    @Before
    public void initCatalog() {
        catalog = getCatalog();
View Full Code Here

        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

        expect(catalog.getResourceLoader()).andReturn(loader).anyTimes();

        catalog.removeListeners((Class)EasyMock.anyObject());
        expectLastCall().anyTimes();

        catalog.addListener((CatalogListener) EasyMock.anyObject());
        expectLastCall().anyTimes();
       
        expect(catalog.getResourcePool()).andAnswer(new IAnswer<ResourcePool>() {
            @Override
            public ResourcePool answer() throws Throwable {
View Full Code Here

public class WorkspaceNamespaceConstencyTest {

    @Test
    public void testChangeWorkspace() {
        Catalog cat = createMock(Catalog.class);
        cat.addListener((CatalogListener) anyObject());
        expectLastCall();
       
        NamespaceInfo ns = createMock(NamespaceInfo.class);
        ns.setPrefix("abcd");
        expectLastCall();
View Full Code Here

    }

    @Test
    public void testChangeNamespace() {
        Catalog cat = createMock(Catalog.class);
        cat.addListener((CatalogListener) anyObject());
        expectLastCall();

        WorkspaceInfo ws = createMock(WorkspaceInfo.class);
        ws.setName("abcd");
        expectLastCall();
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.