Class SystemFilter

java.lang.Object
org.simpleframework.xml.filter.SystemFilter
All Implemented Interfaces:
Filter

public class SystemFilter extends Object implements Filter
The SystemFilter object is used to provide a filter that will replace the specified values with system properties. This can be given a delegate filter which can be used to resolve replacements should the value requested not match a property.
  • Field Details

    • filter

      private Filter filter
      Filter delegated to if no system property can be resolved.
  • Constructor Details

    • SystemFilter

      public SystemFilter()
      Constructor for the SystemFilter object. This creates a filter that will resolve replacements using system properties. Should the system properties not contain the requested mapping this will return a null value.
    • SystemFilter

      public SystemFilter(Filter filter)
      Constructor for the SystemFilter object. This creates a filter that will resolve replacements using system properties. Should the system properties not contain the requested mapping this delegates to the specified filter.
      Parameters:
      filter - the filter delegated to if resolution fails
  • Method Details

    • replace

      public String replace(String text)
      Replaces the text provided with the value resolved from the system properties. If the system properties fails this will delegate to the specified Filter if it is not a null object. If no match is found a null is returned.
      Specified by:
      replace in interface Filter
      Parameters:
      text - this is the text value to be replaced
      Returns:
      this will return the replacement text resolved