Package org.geoserver.config

Examples of org.geoserver.config.SettingsInfo


    @Override
    protected void setUpInternal() throws Exception {
        GeoServer gs = getGeoServer();
        GeoServerInfo global = gs.getGlobal();
        SettingsInfo settings = global.getSettings();
        ContactInfo contact = settings.getContact();
        contact.setContactOrganization("GeoServer");
        contact.setOnlineResource("http://www.geoserver.org");
        gs.save(global);

        ppio = new GPXPPIO(gs);
View Full Code Here


            if (info == null) {
                GeoServer gs = GeoServerApplication.get().getGeoServer();
                info = gs.getFactory().createSettings();
               
                //initialize from global settings
                SettingsInfo global = gs.getGlobal().getSettings();

                //hack, we need to copy out composite objects separately to get around proxying
                // madness
                ContactInfo contact = gs.getFactory().createContact();
                OwsUtils.copy(global.getContact(), contact, ContactInfo.class);

                OwsUtils.copy(global, info, SettingsInfo.class);
                info.setContact(contact);

                info.setWorkspace(wsModel.getObject());
View Full Code Here

        Settings set;

        public SettingsPanel(String id, IModel<WorkspaceInfo> model) {
            super(id, new Model());

            SettingsInfo settings = getGeoServer().getSettings(model.getObject());

            set = new Settings();
            set.enabled = settings != null;
            set.model = settings != null ?
                new ExistingSettingsModel(wsModel) : new NewSettingsModel(wsModel);
View Full Code Here

    }

    private void assertPrefixInclusion(boolean includePrefix,
            boolean setLocalWorkspace, boolean createGeoServer) {
        if (createGeoServer ) {
            SettingsInfo settings = createNiceMock(SettingsInfo.class);
            expect(settings.isLocalWorkspaceIncludesPrefix()).andReturn(includePrefix)
                    .anyTimes();
            replay(settings);
   
            GeoServer geoServer = createNiceMock(GeoServer.class);
            expect(geoServer.getSettings()).andReturn(settings).anyTimes();
View Full Code Here

        contactInfo.setAddressPostalCode("20001");
        contactInfo.setAddressCountry("United States");
        contactInfo.setAddressState("DC");
       
        GeoServerInfo geoServerInfo = geoServer.getGlobal();
        SettingsInfo settingsInfo = geoServerInfo.getSettings();
        settingsInfo.setContact(contactInfo);
        geoServer.save(geoServerInfo);       
    }
View Full Code Here

         * @throws SAXException
         *             For any errors.
         */
        private void handleServiceProvider() {
            start("ows:ServiceProvider");
            SettingsInfo settings = wcs.getGeoServer().getSettings();
            element("ows:ProviderName", settings.getContact().getContactOrganization());
            AttributesImpl attributes = new AttributesImpl();
            attributes.addAttribute("", "xlink:href", "xlink:href", "",
                settings.getOnlineResource() != null ? settings.getOnlineResource() : "");
            element("ows:ProviderSite", null, attributes);

            handleContact();

            end("ows:ServiceProvider");
View Full Code Here

        login();
        // Selection of the workspace
        citeWorkspace = getCatalog().getWorkspaceByName(MockData.CITE_PREFIX);
        // Removing the settings associated to the workspace
        GeoServer gs = getGeoServer();
        SettingsInfo s = gs.getSettings(citeWorkspace);
        if (s != null) {
            gs.remove(s);
        }
        NamespaceInfo citeNS = getCatalog().getNamespaceByPrefix(MockData.CITE_PREFIX);
        citeNS.setURI(MockData.CITE_URI);
View Full Code Here

            Configuration cfg = super.createConfiguration(data, clazz);
            cfg.setClassForTemplateLoading(getClass(), "templates");
            cfg.setObjectWrapper(new ObjectToMapWrapper<GeoServerInfo>(GeoServerInfo.class) {
                @Override
                protected void wrapInternal(Map properties, SimpleHash model, GeoServerInfo info) {
                    SettingsInfo settingsInfo = info.getSettings();
                    ContactInfo contactInfo = settingsInfo.getContact();
                    JAIInfo jaiInfo = info.getJAI();
                    CoverageAccessInfo covInfo = info.getCoverageAccess();
                    properties.put("contactPerson",
                            contactInfo.getContactPerson() != null ? contactInfo.getContactPerson()
                                    : "");
                    properties.put(
                            "contactOrganization",
                            contactInfo.getContactOrganization() != null ? contactInfo
                                    .getContactOrganization() : "");
                    properties.put(
                            "contactPosition",
                            contactInfo.getContactPosition() != null ? contactInfo
                                    .getContactPosition() : "");
                    properties.put("addressType",
                            contactInfo.getAddressType() != null ? contactInfo.getAddressType()
                                    : "");
                    properties.put("address",
                            contactInfo.getAddress() != null ? contactInfo.getAddress() : "");
                    properties.put("addressCity",
                            contactInfo.getAddressCity() != null ? contactInfo.getAddressCity()
                                    : "");
                    properties.put("addressState",
                            contactInfo.getAddressState() != null ? contactInfo.getAddressState()
                                    : "");
                    properties.put(
                            "addressPostalCode",
                            contactInfo.getAddressPostalCode() != null ? contactInfo
                                    .getAddressPostalCode() : "");
                    properties.put(
                            "addressCountry",
                            contactInfo.getAddressCountry() != null ? contactInfo
                                    .getAddressCountry() : "");
                    properties.put("contactVoice",
                            contactInfo.getContactVoice() != null ? contactInfo.getContactVoice()
                                    : "");
                    properties.put(
                            "contactFacsimile",
                            contactInfo.getContactFacsimile() != null ? contactInfo
                                    .getContactFacsimile() : "");
                    properties.put("contactEmail",
                            contactInfo.getContactEmail() != null ? contactInfo.getContactEmail()
                                    : "");
                    properties.put("verbose", settingsInfo.isVerbose() ? "true" : "false");
                    properties.put("verboseExceptions", settingsInfo.isVerboseExceptions() ? "true"
                            : "false");
                    properties.put("numDecimals", String.valueOf(settingsInfo.getNumDecimals()));
                    properties.put("charset", settingsInfo.getCharset());
                    properties.put(
                            "onlineResource",
                            settingsInfo.getOnlineResource() != null ? settingsInfo
                                    .getOnlineResource() : "");
                    properties.put("proxyBaseUrl",
                            settingsInfo.getProxyBaseUrl() != null ? settingsInfo.getProxyBaseUrl()
                                    : "");
                    properties.put("allowInterpolation", jaiInfo.getAllowInterpolation() ? "true"
                            : "false");
                    properties.put("recycling", jaiInfo.isRecycling() ? "true" : "false");
                    properties.put("tilePriority", String.valueOf(jaiInfo.getTilePriority()));
View Full Code Here

    @Override
    protected Object handleObjectGet() throws Exception {
        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",
                Status.CLIENT_ERROR_BAD_REQUEST);
View Full Code Here

        String name = "";
        String workspace = getAttribute("workspace");
        if (workspace != null) {
            Catalog catalog = geoServer.getCatalog();
            WorkspaceInfo workspaceInfo = catalog.getWorkspaceByName(workspace);
            SettingsInfo settings = (SettingsInfo) obj;
            settings.setWorkspace(workspaceInfo);
            geoServer.add(settings);
            geoServer.save(geoServer.getSettings(workspaceInfo));
            name = settings.getWorkspace().getName();
        }
        return name;
    }
View Full Code Here

TOP

Related Classes of org.geoserver.config.SettingsInfo

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.