Package org.mapfish.print.attribute

Examples of org.mapfish.print.attribute.Attribute


     */
    public final void printClientConfig(final JSONWriter json) throws JSONException {
        json.key("attributes");
        json.array();
        for (Map.Entry<String, Attribute> entry : this.attributes.entrySet()) {
            Attribute attribute = entry.getValue();
            if (attribute.getClass().getAnnotation(InternalAttribute.class) == null) {
                json.object();
                json.key("name").value(entry.getKey());
                attribute.printClientConfig(json, this);
                json.endObject();
            }
        }
        json.endArray();
    }
View Full Code Here


            if (!attributes.containsKey(MapPrinterServlet.JSON_REQUEST_HEADERS)) {
                attributes.put(MapPrinterServlet.JSON_REQUEST_HEADERS, new HttpRequestHeadersAttribute());
            }
        }
        for (String attributeName : attributes.keySet()) {
            final Attribute attribute = attributes.get(attributeName);
            final Object value;
            if (attribute instanceof PrimitiveAttribute) {
                PrimitiveAttribute<?> pAtt = (PrimitiveAttribute<?>) attribute;
                Object defaultVal = pAtt.getDefault();
                PObject jsonToUse = requestJsonAttributes;
View Full Code Here

        assertEquals(1, config.getTemplates().size());
        final Template template = config.getTemplate("main");
        assertNotNull(template);

        assertEquals(1, template.getAttributes().size());
        final Attribute attribute = template.getAttributes().get("att");
        assertTrue(attribute instanceof AttributeWithSpringInjection);
        ((AttributeWithSpringInjection)attribute).assertInjected();

        assertEquals(1, template.getProcessorGraph().getAllProcessors().size());
        assertEquals(1, template.getProcessorGraph().getRoots().size());
View Full Code Here

        assertEquals(1, config.getTemplates().size());
        final Template template = config.getTemplate("main");
        assertNotNull(template);

        assertEquals(1, template.getAttributes().size());
        final Attribute attribute = template.getAttributes().get("att");
        assertTrue(attribute instanceof AttributeWithConfigurationInjection);
        ((AttributeWithConfigurationInjection)attribute).assertInjected();

        assertEquals(1, template.getProcessorGraph().getAllProcessors().size());
        assertEquals(1, template.getProcessorGraph().getRoots().size());
View Full Code Here

TOP

Related Classes of org.mapfish.print.attribute.Attribute

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.