Interface Attribute

All Superinterfaces:
ConfigurationObject
All Known Implementing Classes:
BooleanAttribute, DataSourceAttribute, FeaturesAttribute, FloatAttribute, GenericMapAttribute, HttpRequestHeadersAttribute, IntegerAttribute, JsonDatasourceAttribute, LegendAttribute, MapAttribute, NorthArrowAttribute, OverviewMapAttribute, PagingAttribute, PrimitiveAttribute, ReflectiveAttribute, ScalebarAttribute, StaticLayersAttribute, StringArrayAttribute, StringAttribute, StyleAttribute, TableAttribute

public interface Attribute extends ConfigurationObject
Represents an attribute passed in from a web-client to be used to populate the report. It reads a value from the request data
  • Method Summary

    Modifier and Type
    Method
    Description
    getValue(Template template, String attributeName, PObject requestJsonAttributes)
    Get the attribute value.
    Get the class of the value.
    void
    printClientConfig(org.json.JSONWriter json, Template template)
    Write this attribute out the the json writer so that clients can know what attributes are expected.
    void
    Set the name of the attribute as set in the configuration file.

    Methods inherited from interface org.mapfish.print.config.ConfigurationObject

    validate
  • Method Details

    • printClientConfig

      void printClientConfig(org.json.JSONWriter json, Template template) throws org.json.JSONException
      Write this attribute out the the json writer so that clients can know what attributes are expected.
      Parameters:
      json - the json writer to write to
      template - the template that this attribute is part of
      Throws:
      org.json.JSONException
    • setConfigName

      void setConfigName(String name)
      Set the name of the attribute as set in the configuration file.
      Parameters:
      name - the name of the attribute
    • getValueType

      Class<?> getValueType()
      Get the class of the value.
      Returns:
      the value class
    • getValue

      Object getValue(@Nonnull Template template, @Nonnull String attributeName, @Nonnull PObject requestJsonAttributes)
      Get the attribute value.
      Parameters:
      template - the template of the current request.
      attributeName - the name of the attribute
      requestJsonAttributes - the json data for populating the attribute values
      Returns:
      the value