Package org.geoserver.config

Examples of org.geoserver.config.GeoServerDataDirectory.style()


                sinfo.setWorkspace(catalog.getWorkspaceByName(workspace));
            }

            // ensure that a existing resource does not already exist, because we may not want to overwrite it
            GeoServerDataDirectory dataDir = new GeoServerDataDirectory(catalog.getResourceLoader());
            if (dataDir.style(sinfo).getType() != Resource.Type.UNDEFINED) {
                String msg = "Style resource " + sinfo.getFilename() + " already exists.";
                throw new RestletException(msg, Status.CLIENT_ERROR_FORBIDDEN);
            }

            ResourcePool resourcePool = catalog.getResourcePool();
View Full Code Here


        handler.encode(sld, version, prettyPrint, out);
    }

    void copyFromFile(StyleInfo style, OutputStream out) throws IOException {
        GeoServerDataDirectory dd = GeoServerExtensions.bean(GeoServerDataDirectory.class);
        Resource resource = dd.style(style);
        InputStream in = resource.in();
        try {
            IOUtils.copy(in, out);
        }
        finally {
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.