Class CurrencyField

java.lang.Object
com.inet.taskplanner.server.api.field.Field
com.inet.taskplanner.server.api.field.CurrencyField

@JsonData public class CurrencyField extends Field
A field that takes a float number as input and displays the currency symbol. The field supports place holders from the TaskPlanner, which has to be accounted for
Since:
taskplanner 24.4
  • Constructor Details

    • CurrencyField

      public CurrencyField(String key, String label)
      Construct the currency field for the given key and label. Will internally set the currency symbol according to the current locale.
      Parameters:
      key - the key of the field
      label - the label of the field
      Since:
      taskplanner 24.4
  • Method Details

    • isValidValue

      public static boolean isValidValue(String value)
      Returns true, if the value is valid
      Parameters:
      value - the value to check
      Returns:
      true, if the value is valid
      Since:
      taskplanner 24.4
    • patchResultPlaceholderInValue

      public String patchResultPlaceholderInValue(String value, List<JobResultContainer> results)
      Override to replace the placeholders with the values from the results
      Overrides:
      patchResultPlaceholderInValue in class Field
      Parameters:
      value - the value to be patched
      results - the results that contain the meta properties that are replaced
      Returns:
      the new value with replaced placeholders
    • patchSeriesPlaceholderInValue

      public String patchSeriesPlaceholderInValue(String value, Map<String,String> seriesProperties)
      Override to replace the placeholders with the values from the series
      Overrides:
      patchSeriesPlaceholderInValue in class Field
      Parameters:
      value - the value to be patched
      seriesProperties - properties from the current series set
      Returns:
      the new value with replaced placeholders