Package org.geoserver.config.impl

Examples of org.geoserver.config.impl.SettingsInfoImpl


        String root = rootFile.getAbsolutePath();

        // Setting of the global configuration
        GeoServerInfo global = getGeoServer().getGlobal();
        // Selections of the SettingsInfo associated to the GlobalSettings
        SettingsInfoImpl info = (SettingsInfoImpl) ModificationProxy.unwrap(global.getSettings());
        // If no metadata map is present, then a new one is added
        if (info.getMetadata() == null) {
            info.setMetadata(new MetadataMap());
        }
        // Selection of the metadata
        MetadataMap map = info.getMetadata();
        // Addition of the key associated to the root directory
        map.put(RESTUtils.ROOT_KEY, root);
        // Insertion of the settings inside the global ones
        global.setSettings(info);
        // Save settings
View Full Code Here


        // Setting of the workspace configuration
        WorkspaceInfo ws = getCatalog().getWorkspaceByName("test");
        assertNotNull(ws);

        // Creation of new Settings to test
        SettingsInfoImpl info = new SettingsInfoImpl();
       
        // Setting of the metadata map if not present
        if (info.getMetadata() == null) {
            info.setMetadata(new MetadataMap());
        }
        // Selection of the metadata map
        MetadataMap map = info.getMetadata();
        // Addition of the key associated to the root directory
        map.put(RESTUtils.ROOT_KEY, root);
        // Associate the workspace to the settings
        info.setWorkspace(ws);
        // Add the new Settings
        getGeoServer().add(info);
        // Test of the input file
        testFile(rootFile, "test", "usa2");
    }
View Full Code Here

        assertNotNull(s.getGeoServer());
    }

    @Test
    public void testGlobalSettingsWithId() throws Exception {
        SettingsInfoImpl settings = new SettingsInfoImpl();
        settings.setId("settings");
       
        GeoServerInfo global = geoServer.getFactory().createGlobal();
        global.setSettings(settings);

        geoServer.setGlobal(global);
View Full Code Here

        // Selection of the root directory
        String root = getTestData().getDataDirectoryRoot().getAbsolutePath();

        // Setting of the global configuration
        GeoServerInfo global = getGeoServer().getGlobal();
        SettingsInfoImpl info = (SettingsInfoImpl) ModificationProxy.unwrap(global.getSettings());
        // Setting of the metadata map if not present
        if (info.getMetadata() == null) {
            info.setMetadata(new MetadataMap());
        }
        // Selection of the metadata map
        MetadataMap map = info.getMetadata();
        // Insertion of the Root directory and the ecql expression
        map.put(RESTUtils.ROOT_KEY, root);
        map.put(RESTUploadECQLPathMapper.EXPRESSION_KEY, expression);
        // Save the global settings
        getGeoServer().save(global);
View Full Code Here

            super(SettingsInfo.class);
        }
       
        public Object doUnmarshal(Object result,
                HierarchicalStreamReader reader, UnmarshallingContext context) {
            SettingsInfoImpl obj = (SettingsInfoImpl) super.doUnmarshal(result, reader, context);
            if(obj.getMetadata() == null){
                obj.setMetadata(new MetadataMap());
            }
            if(obj.getContact() == null){
                obj.setContact(new ContactInfoImpl());
            }
            if(obj.getClientProperties() == null){
                obj.setClientProperties(new HashMap<Object, Object>());
            }
            return obj;
        }
View Full Code Here

        String workspace = getAttribute("workspace");
        if (workspace != null) {
            WorkspaceInfo workspaceInfo = geoServer.getCatalog().getWorkspaceByName(workspace);
            SettingsInfo settingsInfo = geoServer.getSettings(workspaceInfo);
            if (settingsInfo == null) {
                settingsInfo = new SettingsInfoImpl();
                settingsInfo.setVerbose(false);
            }
            return settingsInfo;
        }
        throw new RestletException("Workspace " + workspace + " not found",
View Full Code Here

TOP

Related Classes of org.geoserver.config.impl.SettingsInfoImpl

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.