Klasse BaseValueParser

java.lang.Object
org.apache.fulcrum.parser.BaseValueParser
Alle implementierten Schnittstellen:
Iterable<String>, org.apache.avalon.framework.logger.LogEnabled, ParserServiceSupport, ValueParser
Bekannte direkte Unterklassen:
DefaultCookieParser, DefaultParameterParser, StringValueParser

public class BaseValueParser extends Object implements ValueParser, ParserServiceSupport, org.apache.avalon.framework.logger.LogEnabled
BaseValueParser is a base class for classes that need to parse name/value Parameters, for example GET/POST data or Cookies (DefaultParameterParser and DefaultCookieParser)

It can also be used standalone, for an example see DataStreamParser.

NOTE: The name= portion of a name=value pair may be converted to lowercase or uppercase when the object is initialized and when new data is added. This behavior is determined by the url.case.folding property in TurbineResources.properties. Adding a name/value pair may overwrite existing name=value pairs if the names match:

 ValueParser vp = new BaseValueParser();
 vp.add("ERROR",1);
 vp.add("eRrOr",2);
 int result = vp.getInt("ERROR");
 
In the above example, result is 2.
Version:
$Id$
Autor:
Ilkka Priha, Jon S. Stevens, Sean Legassick, Jason van Zyl, Jürgen Hoffmann, Thomas Vandahl
  • Felddetails

    • parserService

      protected ParserService parserService
      The ParserService instance to query for conversion and configuration
    • parameters

      protected Hashtable<String,Object> parameters
      Random access storage for parameter data.
  • Konstruktordetails

    • BaseValueParser

      public BaseValueParser()
    • BaseValueParser

      public BaseValueParser(String characterEncoding)
      Constructor that takes a character encoding
      Parameter:
      characterEncoding - desired character encoding
    • BaseValueParser

      public BaseValueParser(String characterEncoding, Locale locale)
      Constructor that takes a character encoding and a locale
      Parameter:
      characterEncoding - Sets the character encoding
      locale - Sets the locale
  • Methodendetails

    • setParserService

      public void setParserService(ParserService parserService)
      Set a ParserService instance
      Angegeben von:
      setParserService in Schnittstelle ParserServiceSupport
      Parameter:
      parserService - The parser service instance
    • enableLogging

      public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
      Angegeben von:
      enableLogging in Schnittstelle org.apache.avalon.framework.logger.LogEnabled
      Parameter:
      logger - The logger to be used
      Siehe auch:
      • LogEnabled.enableLogging(org.apache.avalon.framework.logger.Logger)
    • getLogger

      protected org.apache.avalon.framework.logger.Logger getLogger()
      Provide an Avalon logger to the derived classes
      Gibt zurück:
      An Avalon logger instance
    • recycle

      public final void recycle()
      Recycles the parser.
    • recycle

      public final void recycle(String characterEncoding)
      Recycles the parser with a character encoding.
      Parameter:
      characterEncoding - the character encoding.
    • dispose

      public void dispose()
      Disposes the parser.
      Angegeben von:
      dispose in Schnittstelle ValueParser
    • clear

      public void clear()
      Clear all name/value pairs out of this object.
      Angegeben von:
      clear in Schnittstelle ValueParser
    • setCharacterEncoding

      public final void setCharacterEncoding(String s)
      Set the character encoding that will be used by this ValueParser.
      Angegeben von:
      setCharacterEncoding in Schnittstelle ValueParser
      Parameter:
      s - the character encoding to use
    • getCharacterEncoding

      public String getCharacterEncoding()
      Get the character encoding that will be used by this ValueParser.
      Angegeben von:
      getCharacterEncoding in Schnittstelle ValueParser
      Gibt zurück:
      Current character encoding
    • setLocale

      public final void setLocale(Locale l)
      Set the locale that will be used by this ValueParser.
      Angegeben von:
      setLocale in Schnittstelle ValueParser
      Parameter:
      l - the default locale to be used by the parser
    • getLocale

      public final Locale getLocale()
      Get the locale that will be used by this ValueParser.
      Angegeben von:
      getLocale in Schnittstelle ValueParser
      Gibt zurück:
      Locale the locale being used
    • setDateFormat

      public final void setDateFormat(DateFormat df)
      Set the date format that will be used by this ValueParser.
      Angegeben von:
      setDateFormat in Schnittstelle ValueParser
      Parameter:
      df - the date format
    • getDateFormat

      public DateFormat getDateFormat()
      Get the date format that will be used by this ValueParser.
      Angegeben von:
      getDateFormat in Schnittstelle ValueParser
      Gibt zurück:
      DateFormat current date format used by this ValueParser
    • setNumberFormat

      public void setNumberFormat(NumberFormat nf)
      Set the number format that will be used by this ValueParser.
      Angegeben von:
      setNumberFormat in Schnittstelle ValueParser
      Parameter:
      nf - the number format to use
    • getNumberFormat

      public NumberFormat getNumberFormat()
      Get the number format that will be used by this ValueParser.
      Angegeben von:
      getNumberFormat in Schnittstelle ValueParser
      Gibt zurück:
      NumberFormat the current number format
    • add

      public void add(String name, double value)
      Add a name/value pair into this object.
      Angegeben von:
      add in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      value - A double with the value.
    • add

      public void add(String name, int value)
      Add a name/value pair into this object.
      Angegeben von:
      add in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      value - An int with the value.
    • add

      public void add(String name, Integer value)
      Add a name/value pair into this object.
      Angegeben von:
      add in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      value - An Integer with the value.
    • add

      public void add(String name, long value)
      Add a name/value pair into this object.
      Angegeben von:
      add in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      value - A long with the value.
    • add

      public void add(String name, String value)
      Add a name/value pair into this object.
      Angegeben von:
      add in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      value - A long with the value.
    • add

      public void add(String name, String[] value)
      Add an array of Strings for a key. This is simply adding all the elements in the array one by one.
      Angegeben von:
      add in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      value - A String Array.
    • remove

      public Object remove(String name)
      Removes the named parameter from the contained hashtable. Wraps to the contained Map.remove().
      Angegeben von:
      remove in Schnittstelle ValueParser
      Parameter:
      name - the name of the mapped value to remove
      Gibt zurück:
      The value that was mapped to the key (a String[]) or null if the key was not mapped.
    • convert

      public String convert(String value)
      Trims the string data and applies the conversion specified in the property given by URL_CASE_FOLDING. It returns a new string so that it does not destroy the value data.
      Angegeben von:
      convert in Schnittstelle ValueParser
      Parameter:
      value - A String to be processed.
      Gibt zurück:
      A new String converted to lowercase and trimmed.
    • containsKey

      public boolean containsKey(Object key)
      Determine whether a given key has been inserted. All keys are stored in lowercase strings, so override method to account for this.
      Angegeben von:
      containsKey in Schnittstelle ValueParser
      Parameter:
      key - An Object with the key to search for.
      Gibt zurück:
      True if the object is found.
    • keySet

      public Set<String> keySet()
      Gets the set of keys
      Angegeben von:
      keySet in Schnittstelle ValueParser
      Gibt zurück:
      A Set of the keys.
    • getKeys

      public String[] getKeys()
      Returns all the available parameter names.
      Angegeben von:
      getKeys in Schnittstelle ValueParser
      Gibt zurück:
      A object array with the keys.
    • iterator

      public Iterator<String> iterator()
      Gets an iterator over the set of keys
      Angegeben von:
      iterator in Schnittstelle Iterable<String>
      Gibt zurück:
      An Iterator over the keys.
    • getBoolean

      public boolean getBoolean(String name, boolean defaultValue)
      Return a boolean for the given name. If the name does not exist, return defaultValue.
      Angegeben von:
      getBoolean in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      defaultValue - The default value.
      Gibt zurück:
      A boolean.
    • getBoolean

      public boolean getBoolean(String name)
      Return a boolean for the given name. If the name does not exist, return false.
      Angegeben von:
      getBoolean in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A boolean.
    • getBooleans

      public boolean[] getBooleans(String name)
      Return an array of booleans for the given name. If the name does not exist, return null.
      Angegeben von:
      getBooleans in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A boolean[].
    • getBooleanObject

      public Boolean getBooleanObject(String name)
      Returns a Boolean object for the given name. If the parameter does not exist or can not be parsed as a boolean, null is returned.

      Valid values for true: true, on, 1, yes
      Valid values for false: false, off, 0, no

      The string is compared without reguard to case.

      Angegeben von:
      getBooleanObject in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A Boolean.
    • getBooleanObject

      public Boolean getBooleanObject(String name, Boolean defaultValue)
      Returns a Boolean object for the given name. If the parameter does not exist or can not be parsed as a boolean, null is returned.

      Valid values for true: true, on, 1, yes
      Valid values for false: false, off, 0, no

      The string is compared without reguard to case.

      Angegeben von:
      getBooleanObject in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      defaultValue - The default value.
      Gibt zurück:
      A Boolean.
    • getBooleanObjects

      public Boolean[] getBooleanObjects(String name)
      Return an array of Booleans for the given name. If the name does not exist, return null.
      Angegeben von:
      getBooleanObjects in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A Boolean[].
    • getDouble

      public double getDouble(String name, double defaultValue)
      Return a double for the given name. If the name does not exist, return defaultValue.
      Angegeben von:
      getDouble in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      defaultValue - The default value.
      Gibt zurück:
      A double.
    • getDouble

      public double getDouble(String name)
      Return a double for the given name. If the name does not exist, return 0.0.
      Angegeben von:
      getDouble in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A double.
    • getDoubles

      public double[] getDoubles(String name)
      Return an array of doubles for the given name. If the name does not exist, return null.
      Angegeben von:
      getDoubles in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A double[].
    • getDoubleObject

      public Double getDoubleObject(String name, Double defaultValue)
      Return a Double for the given name. If the name does not exist, return defaultValue.
      Angegeben von:
      getDoubleObject in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      defaultValue - The default value.
      Gibt zurück:
      A double.
    • getDoubleObject

      public Double getDoubleObject(String name)
      Return a Double for the given name. If the name does not exist, return null.
      Angegeben von:
      getDoubleObject in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A double.
    • getDoubleObjects

      public Double[] getDoubleObjects(String name)
      Return an array of doubles for the given name. If the name does not exist, return null.
      Angegeben von:
      getDoubleObjects in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A double[].
    • getFloat

      public float getFloat(String name, float defaultValue)
      Return a float for the given name. If the name does not exist, return defaultValue.
      Angegeben von:
      getFloat in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      defaultValue - The default value.
      Gibt zurück:
      A float.
    • getFloat

      public float getFloat(String name)
      Return a float for the given name. If the name does not exist, return 0.0.
      Angegeben von:
      getFloat in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A float.
    • getFloats

      public float[] getFloats(String name)
      Return an array of floats for the given name. If the name does not exist, return null.
      Angegeben von:
      getFloats in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A float[].
    • getFloatObject

      public Float getFloatObject(String name, Float defaultValue)
      Return a Float for the given name. If the name does not exist, return defaultValue.
      Angegeben von:
      getFloatObject in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      defaultValue - The default value.
      Gibt zurück:
      A Float.
    • getFloatObject

      public Float getFloatObject(String name)
      Return a float for the given name. If the name does not exist, return null.
      Angegeben von:
      getFloatObject in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A Float.
    • getFloatObjects

      public Float[] getFloatObjects(String name)
      Return an array of floats for the given name. If the name does not exist, return null.
      Angegeben von:
      getFloatObjects in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A float[].
    • getBigDecimal

      public BigDecimal getBigDecimal(String name, BigDecimal defaultValue)
      Return a BigDecimal for the given name. If the name does not exist, return defaultValue.
      Angegeben von:
      getBigDecimal in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      defaultValue - The default value.
      Gibt zurück:
      A BigDecimal.
    • getBigDecimal

      public BigDecimal getBigDecimal(String name)
      Return a BigDecimal for the given name. If the name does not exist, return null.
      Angegeben von:
      getBigDecimal in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A BigDecimal.
    • getBigDecimals

      public BigDecimal[] getBigDecimals(String name)
      Return an array of BigDecimals for the given name. If the name does not exist, return null.
      Angegeben von:
      getBigDecimals in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A BigDecimal[].
    • getInt

      public int getInt(String name, int defaultValue)
      Return an int for the given name. If the name does not exist, return defaultValue.
      Angegeben von:
      getInt in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      defaultValue - The default value.
      Gibt zurück:
      An int.
    • getInt

      public int getInt(String name)
      Return an int for the given name. If the name does not exist, return 0.
      Angegeben von:
      getInt in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      An int.
    • getInts

      public int[] getInts(String name)
      Return an array of ints for the given name. If the name does not exist, return null.
      Angegeben von:
      getInts in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      An int[].
    • getIntObject

      public Integer getIntObject(String name, Integer defaultValue)
      Return an Integer for the given name. If the name does not exist, return defaultValue.
      Angegeben von:
      getIntObject in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      defaultValue - The default value.
      Gibt zurück:
      An Integer.
    • getIntObject

      public Integer getIntObject(String name)
      Return an Integer for the given name. If the name does not exist, return null.
      Angegeben von:
      getIntObject in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      An Integer.
    • getIntObjects

      public Integer[] getIntObjects(String name)
      Return an array of Integers for the given name. If the name does not exist, return null.
      Angegeben von:
      getIntObjects in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      An Integer[].
    • getLong

      public long getLong(String name, long defaultValue)
      Return a long for the given name. If the name does not exist, return defaultValue.
      Angegeben von:
      getLong in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      defaultValue - The default value.
      Gibt zurück:
      A long.
    • getLong

      public long getLong(String name)
      Return a long for the given name. If the name does not exist, return 0.
      Angegeben von:
      getLong in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A long.
    • getLongs

      public long[] getLongs(String name)
      Return an array of longs for the given name. If the name does not exist, return null.
      Angegeben von:
      getLongs in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A long[].
    • getLongObjects

      public Long[] getLongObjects(String name)
      Return an array of Longs for the given name. If the name does not exist, return null.
      Angegeben von:
      getLongObjects in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A Long[].
    • getLongObject

      public Long getLongObject(String name)
      Return a Long for the given name. If the name does not exist, return null.
      Angegeben von:
      getLongObject in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A Long.
    • getLongObject

      public Long getLongObject(String name, Long defaultValue)
      Return a Long for the given name. If the name does not exist, return the default value.
      Angegeben von:
      getLongObject in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      defaultValue - The default value.
      Gibt zurück:
      A Long.
    • getByte

      public byte getByte(String name, byte defaultValue)
      Return a byte for the given name. If the name does not exist, return defaultValue.
      Angegeben von:
      getByte in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      defaultValue - The default value.
      Gibt zurück:
      A byte.
    • getByte

      public byte getByte(String name)
      Return a byte for the given name. If the name does not exist, return 0.
      Angegeben von:
      getByte in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A byte.
    • getBytes

      public byte[] getBytes(String name) throws UnsupportedEncodingException
      Return an array of bytes for the given name. If the name does not exist, return null. The array is returned according to the HttpRequest's character encoding.
      Angegeben von:
      getBytes in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A byte[].
      Löst aus:
      UnsupportedEncodingException - Generic exception
    • getByteObject

      public Byte getByteObject(String name, Byte defaultValue)
      Return a byte for the given name. If the name does not exist, return defaultValue.
      Angegeben von:
      getByteObject in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      defaultValue - The default value.
      Gibt zurück:
      A byte.
    • getByteObject

      public Byte getByteObject(String name)
      Return a byte for the given name. If the name does not exist, return 0.
      Angegeben von:
      getByteObject in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A byte.
    • getString

      public String getString(String name)
      Return a String for the given name. If the name does not exist, return null.
      Angegeben von:
      getString in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A String or null if the key is unknown.
    • get

      public String get(String name)
      Return a String for the given name. If the name does not exist, return null. It is the same as the getString() method however has been added for simplicity when working with template tools such as Velocity which allow you to do something like this: $data.Parameters.form_variable_name
      Angegeben von:
      get in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A String.
    • getString

      public String getString(String name, String defaultValue)
      Return a String for the given name. If the name does not exist, return the defaultValue.
      Angegeben von:
      getString in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      defaultValue - The default value.
      Gibt zurück:
      A String.
    • setString

      public void setString(String name, String value)
      Set a parameter to a specific value. This is useful if you want your action to override the values of the parameters for the screen to use.
      Angegeben von:
      setString in Schnittstelle ValueParser
      Parameter:
      name - The name of the parameter.
      value - The value to set.
    • getStrings

      public String[] getStrings(String name)
      Return an array of Strings for the given name. If the name does not exist, return null.
      Angegeben von:
      getStrings in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A String[].
    • getStrings

      public String[] getStrings(String name, String[] defaultValue)
      Return an array of Strings for the given name. If the name does not exist, return the defaultValue.
      Angegeben von:
      getStrings in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      defaultValue - The default value.
      Gibt zurück:
      A String[].
    • setStrings

      public void setStrings(String name, String[] values)
      Set a parameter to a specific value. This is useful if you want your action to override the values of the parameters for the screen to use.
      Angegeben von:
      setStrings in Schnittstelle ValueParser
      Parameter:
      name - The name of the parameter.
      values - The value to set.
    • getObject

      public Object getObject(String name)
      Return an Object for the given name. If the name does not exist, return null.
      Angegeben von:
      getObject in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      An Object.
    • getObjects

      public Object[] getObjects(String name)
      Return an array of Objects for the given name. If the name does not exist, return null.
      Angegeben von:
      getObjects in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      An Object[].
    • getDate

      public Date getDate(String name, DateFormat df, Date defaultValue)
      Returns a Date object. String is parsed by supplied DateFormat. If the name does not exist or the value could not be parsed into a date return the defaultValue.
      Angegeben von:
      getDate in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      df - A DateFormat.
      defaultValue - The default value.
      Gibt zurück:
      A Date.
    • getDate

      public Date getDate(String name)
      Returns a Date object. If there are DateSelector or TimeSelector style parameters then these are used. If not and there is a parameter 'name' then this is parsed by DateFormat. If the name does not exist, return null.
      Angegeben von:
      getDate in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      Gibt zurück:
      A Date.
    • getDate

      public Date getDate(String name, DateFormat df)
      Returns a Date object. String is parsed by supplied DateFormat. If the name does not exist, return null.
      Angegeben von:
      getDate in Schnittstelle ValueParser
      Parameter:
      name - A String with the name.
      df - A DateFormat.
      Gibt zurück:
      A Date.
    • setProperties

      public void setProperties(Object bean) throws Exception
      Uses bean introspection to set writable properties of bean from the parameters, where a (case-insensitive) name match between the bean property and the parameter is looked for.
      Angegeben von:
      setProperties in Schnittstelle ValueParser
      Parameter:
      bean - An Object.
      Löst aus:
      Exception - a generic exception.
    • toString

      public String toString()
      Simple method that attempts to get a textual representation of this object's name/value pairs. String[] handling is currently a bit rough.
      Angegeben von:
      toString in Schnittstelle ValueParser
      Setzt außer Kraft:
      toString in Klasse Object
      Gibt zurück:
      A textual representation of the parsed name/value pairs.
    • getToStringParam

      protected Object[] getToStringParam(String name)
      This method is only used in toString() and can be used by derived classes to add their local parameters to the toString()
      Parameter:
      name - A string with the name
      Gibt zurück:
      the value object array or null if not set
    • setProperty

      protected void setProperty(Object bean, PropertyDescriptor prop) throws Exception
      Set the property 'prop' in the bean to the value of the corresponding parameters. Supports all types supported by getXXX methods plus a few more that come for free because primitives have to be wrapped before being passed to invoke anyway.
      Parameter:
      bean - An Object.
      prop - A PropertyDescriptor.
      Löst aus:
      Exception - a generic exception.
    • putParam

      protected void putParam(String name, String[] value)
      Puts a key into the parameters map. Makes sure that the name is always mapped correctly. This method also enforces the usage of arrays for the parameters.
      Parameter:
      name - A String with the name.
      value - An array of Objects with the values.
    • getParam

      protected String[] getParam(String name)
      fetches a key from the parameters map. Makes sure that the name is always mapped correctly.
      Parameter:
      name - A string with the name
      Gibt zurück:
      the value object array or null if not set
    • isDisposed

      public boolean isDisposed()
      Checks whether the object is disposed.
      Gibt zurück:
      true, if the object is disposed.
    • convertAndTrim

      public String convertAndTrim(String value)
      Convert a String value according to the url-case-folding property.
      Angegeben von:
      convertAndTrim in Schnittstelle ValueParser
      Parameter:
      value - the String to convert
      Gibt zurück:
      a new String.
    • convertAndTrim

      public String convertAndTrim(String value, ValueParser.URLCaseFolding fold)
      A convert method, which trims the string data and applies the conversion specified in the parameter given. It returns a new string so that it does not destroy the value data.
      Angegeben von:
      convertAndTrim in Schnittstelle ValueParser
      Parameter:
      value - A String to be processed.
      fold - The parameter folding to be applied (see ParserService)
      Gibt zurück:
      A new String converted to the correct case and trimmed.
    • getUrlFolding

      public ValueParser.URLCaseFolding getUrlFolding()
      Gets the folding value from the ParserService configuration
      Angegeben von:
      getUrlFolding in Schnittstelle ValueParser
      Gibt zurück:
      The current Folding Value
    • isValid

      public boolean isValid()