Package org.geowebcache.diskquota

Examples of org.geowebcache.diskquota.DiskQuotaConfig


    @Override
    public void handleGet() {
        final Request request = getRequest();
        final Response response = getResponse();
        final String formatExtension = (String) request.getAttributes().get("extension");
        final DiskQuotaConfig config = monitor.getConfig();

        Representation representation;
        if ("json".equals(formatExtension)) {
            try {
                representation = getJsonRepresentation(config);
View Full Code Here


    public void put(final Representation entity) {
        final Request request = getRequest();
        final Response response = getResponse();

        final String formatExtension = (String) request.getAttributes().get("extension");
        DiskQuotaConfig config = monitor.getConfig();
        DiskQuotaConfig newConfig = null;

        try {
            if ("json".equals(formatExtension)) {

                newConfig = fromJSON(entity);
View Full Code Here

        }
    }

    @Override
    public Representation getPreferredRepresentation() {
        DiskQuotaConfig config = monitor.getConfig();
        JsonRepresentation jsonRepresentation;
        try {
            jsonRepresentation = getJsonRepresentation(config);
        } catch (JSONException e) {
            throw new RuntimeException(e);
View Full Code Here

    private DiskQuotaConfig fromXML(Representation entity) throws IOException {

        final String text = entity.getText();
        StringReader reader = new StringReader(text);
        XStream xstream = ConfigLoader.getConfiguredXStream(new XStream());
        DiskQuotaConfig diskQuotaConfig = ConfigLoader.loadConfiguration(reader, xstream);
        return diskQuotaConfig;
    }
View Full Code Here

        XStream xStream = new XStream(driver);

        xStream = ConfigLoader.getConfiguredXStream(xStream);

        DiskQuotaConfig configuration;
        StringReader reader = new StringReader(text);
        configuration = ConfigLoader.loadConfiguration(reader, xStream);
        return configuration;
    }
View Full Code Here

TOP

Related Classes of org.geowebcache.diskquota.DiskQuotaConfig

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.