All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mapfish.print.attribute.Attribute Maven / Gradle / Ivy

There is a newer version: 3.22.0
Show newest version
package org.mapfish.print.attribute;

import org.json.JSONException;
import org.json.JSONWriter;
import org.mapfish.print.config.ConfigurationObject;
import org.mapfish.print.config.Template;
import org.mapfish.print.wrapper.PObject;

import javax.annotation.Nonnull;

/**
 * Represents an attribute passed in from a web-client to be used to populate the report.  It reads a value
 * from the request data
 * 

*/ public interface Attribute extends ConfigurationObject { /** * Write this attribute out the the json writer so that clients can know what attributes are expected. * * @param json the json writer to write to * @param template the template that this attribute is part of * @throws JSONException */ void printClientConfig(JSONWriter json, Template template) throws JSONException; /** * Set the name of the attribute as set in the configuration file. * * @param name the name of the attribute */ void setConfigName(String name); /** * Get the class of the value. * * @return the value class */ Class getValueType(); /** * Get the attribute value. * * @param template the template of the current request. * @param attributeName the name of the attribute * @param requestJsonAttributes the json data for populating the attribute values * @return the value */ Object getValue( @Nonnull Template template, @Nonnull String attributeName, @Nonnull PObject requestJsonAttributes); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy