Package org.mapfish.print.attribute
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
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 TypeMethodDescriptionGet the attribute value.Class<?>
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
setConfigName
(String name) 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
Write this attribute out the the json writer so that clients can know what attributes are expected.- Parameters:
json
- the json writer to write totemplate
- the template that this attribute is part of- Throws:
org.json.JSONException
-
setConfigName
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 attributerequestJsonAttributes
- the json data for populating the attribute values- Returns:
- the value
-