Package org.geoserver.config

Examples of org.geoserver.config.SettingsInfo


    public @ResponseBody
    JSONObj get() {
        JSONObj obj = new JSONObj();
        obj.toObject();

        SettingsInfo settings = geoServer.getGlobal().getSettings();
        obj.putObject("service")
           .put("title", settings.getTitle());

        JSONObj services = obj.putObject("services");
        for (ServiceInfo service : geoServer.getServices()) {
            JSONArr versions = services.putObject(service.getName())
               .put("title", service.getTitle())
View Full Code Here


                    numDecimals = numDecimals == -1 ? ftiDecimals : Math.max(numDecimals, ftiDecimals);
                }
            }
        }

        SettingsInfo settings = geoServer.getSettings();
       
        if (numDecimals == -1) {
            numDecimals = settings.getNumDecimals();
        }
       
        WFSInfo wfs = getInfo();
       
        transformer.setIndentation(wfs.isVerbose() ? INDENT_SIZE : (NO_FORMATTING));
        transformer.setNumDecimals(numDecimals);
        transformer.setFeatureBounding(wfs.isFeatureBounding());
        transformer.setCollectionBounding(wfs.isFeatureBounding());
        transformer.setEncoding(Charset.forName(settings.getCharset()));

        if (wfs.isCanonicalSchemaLocation()) {
            transformer.addSchemaLocation(WFS.NAMESPACE, wfsCanonicalSchemaLocation());
        } else {
            String wfsSchemaloc = wfsSchemaLocation(request.getBaseUrl());
View Full Code Here

        FeatureTypeInfo ft = getCatalog().getFeatureTypeByName(BASIC_POLYGONS.getNamespaceURI(),
                BASIC_POLYGONS.getLocalPart());

        assertXpathEvaluatesTo(ft.getTitle(), "/kml:kml/kml:Document/kml:name", kml);

        SettingsInfo global = getGeoServer().getGlobal().getSettings();

        assertXpathEvaluatesTo(global.getContact().getContactPerson(),
                "/kml:kml/kml:Document/atom:author/atom:nameOrUriOrEmail", kml);

        assertXpathEvaluatesTo(global.getOnlineResource(), "/kml:kml/kml:Document/atom:link/@href",
                kml);

        assertXpathExists("/kml:kml/kml:Document/kml:description", kml);

        assertXpathEvaluatesTo("cite:BasicPolygons",
View Full Code Here

        // ServiceProvider
        ServiceProviderType sp = owsf.createServiceProviderType();
        caps.setServiceProvider(sp);

        // TODO: set provder name from context
        SettingsInfo settings = wps.getGeoServer().getSettings();
        if (settings.getContact().getContactOrganization() != null) {
            sp.setProviderName(settings.getContact().getContactOrganization());
        } else {
            sp.setProviderName("GeoServer");
        }

        sp.setProviderSite(owsf.createOnlineResourceType());
        sp.getProviderSite().setHref(settings.getOnlineResource());
        sp.setServiceContact(responsibleParty(settings, owsf));

        // OperationsMetadata
        OperationsMetadataType om = owsf.createOperationsMetadataType();
        caps.setOperationsMetadata(om);
View Full Code Here

        if (obj == null)
            return false;
        if (!( obj instanceof SettingsInfo ) ) {
            return false;
        }
        final SettingsInfo other = (SettingsInfo) obj;
        if (charset == null) {
            if (other.getCharset() != null)
                return false;
        } else if (!charset.equals(other.getCharset()))
            return false;
        if (contact == null) {
            if (other.getContact() != null)
                return false;
        } else if (!contact.equals(other.getContact()))
            return false;
        if (id == null) {
            if (other.getId() != null)
                return false;
        } else if (!id.equals(other.getId()))
            return false;
        if (numDecimals != other.getNumDecimals())
            return false;
        if (onlineResource == null) {
            if (other.getOnlineResource() != null)
                return false;
        } else if (!onlineResource.equals(other.getOnlineResource()))
            return false;
        if (proxyBaseUrl == null) {
            if (other.getProxyBaseUrl() != null)
                return false;
        } else if (!proxyBaseUrl.equals(other.getProxyBaseUrl()))
            return false;
        if (schemaBaseUrl == null) {
            if (other.getSchemaBaseUrl() != null)
                return false;
        } else if (!schemaBaseUrl.equals(other.getSchemaBaseUrl()))
            return false;
        if (title == null) {
            if (other.getTitle() != null)
                return false;
        } else if (!title.equals(other.getTitle()))
            return false;
        if (verbose != other.isVerbose())
            return false;
        if (verboseExceptions != other.isVerboseExceptions())
            return false;

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

    @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 KMLPPIO(gs);
View Full Code Here

    @Override
    public void setGlobal(GeoServerInfo global) {
        OwsUtils.set(global, "id", GLOBAL_ID);
        if (global.getSettings() == null) {
            SettingsInfo defaultSettings = geoServer.getFactory().createSettings();
            add(defaultSettings);
            global.setSettings(defaultSettings);
        //JD: disabling this check, global settings should have an id
        //}else if(null == global.getSettings().getId()){
        }else {
View Full Code Here

        //fire the modification event
        fireGlobalPostModified();
    }

    public SettingsInfo getSettings() {
        SettingsInfo settings = null;
        if (LocalWorkspace.get() != null) {
            settings = getSettings(LocalWorkspace.get());
        }
        return settings != null ? settings : getGlobal().getSettings();
    }
View Full Code Here

            quietOnNotFound = Boolean.parseBoolean(quietOnNotFoundS);
        }else{
            GeoServerInfo gsInfo = GeoServerExtensions.bean(GeoServer.class).getGlobal();
            // Global info should be always not null
            if(gsInfo != null){
                SettingsInfo info = gsInfo.getSettings();
                MetadataMap map = info != null ? info.getMetadata() : null;
                if(map != null && map.containsKey(RESTUtils.QUIET_ON_NOT_FOUND_KEY)){
                    quietOnNotFound = map.get(RESTUtils.QUIET_ON_NOT_FOUND_KEY, Boolean.class);
                }
            }
        }
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.