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
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
getValue(Template template, java.lang.String attributeName, PObject requestJsonAttributes)
Get the attribute value.java.lang.Class<?>
getValueType()
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(java.lang.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 Detail
-
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 totemplate
- the template that this attribute is part of- Throws:
org.json.JSONException
-
setConfigName
void setConfigName(java.lang.String name)
Set the name of the attribute as set in the configuration file.- Parameters:
name
- the name of the attribute
-
getValueType
java.lang.Class<?> getValueType()
Get the class of the value.- Returns:
- the value class
-
getValue
java.lang.Object getValue(@Nonnull Template template, @Nonnull java.lang.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
-
-