Class StringAttribute

java.lang.Object
org.mapfish.print.attribute.PrimitiveAttribute<String>
org.mapfish.print.attribute.StringAttribute
All Implemented Interfaces:
Attribute, ConfigurationObject

public class StringAttribute extends PrimitiveAttribute<String>
Attribute that reads a string from the request data. [[examples=verboseExample]]
  • Constructor Details

    • StringAttribute

      public StringAttribute()
      Constructor.
  • Method Details

    • setDefault

      public final void setDefault(String value)
      A default value for this attribute. Example:
      
           attributes:
             title: !string
               default: The title
      Specified by:
      setDefault in class PrimitiveAttribute<String>
      Parameters:
      value - The default value.
    • getMaxLength

      public final int getMaxLength()
    • setMaxLength

      public final void setMaxLength(int maxLength)
      The maximum number of characters allowed for this field (default: unlimited).
      Parameters:
      maxLength - Maximum number of characters.
    • validateValue

      public final void validateValue(Object value)
      Description copied from class: PrimitiveAttribute
      Validation of the value from a request.
      Overrides:
      validateValue in class PrimitiveAttribute<String>
      Parameters:
      value - The value from a request.
    • getValueType

      public Class getValueType()
      Description copied from interface: Attribute
      Get the class of the value.
      Returns:
      the value class