Class ValueUtils

java.lang.Object
com.priint.pubserver.util.ValueUtils

public class ValueUtils extends Object
  • Constructor Details

    • ValueUtils

      public ValueUtils()
  • Method Details

    • sortAscending

      public static final void sortAscending(List<ValueItem> items)
      This method sorts the values in ascending order
      Parameters:
      items - list of values
    • sortDescending

      public static final void sortDescending(List<ValueItem> items)
      This method sorts the values in descending order
      Parameters:
      items - list of values
    • isDefined

      public static final boolean isDefined(Value var)
      This method checks if the Values is defined.
      Parameters:
      var - - Value to be checked
      Returns:
      true if the Value is defined. False otherwise.
    • hasValueDefinition

      public static final boolean hasValueDefinition(PluginMethod.Parameter parameter)
      Checks if the parameter has a value definition
      Parameters:
      parameter - PluginMethod parameter
      Returns:
      true if the Value is defined. False otherwise.
    • getValueIdentifier

      public static final String getValueIdentifier(PluginMethod.Parameter parameter)
      This method gets the value identifier of the parameter
      Parameters:
      parameter - PluginMethod parameter
      Returns:
      Value identifier as String
    • getValueLabel

      public static final String getValueLabel(PluginMethod.Parameter parameter)
      This method gets the value label of the parameter
      Parameters:
      parameter - PluginMethod parameter
      Returns:
      Value label as String
    • getValueItemLabel

      public static final String getValueItemLabel(ValueItem value)
      This method gets the label of the value
      Parameters:
      value - Value item
      Returns:
      Value label as String
    • getValueItems

      public static final List<ValueItem> getValueItems(PluginMethod.Parameter parameter, Map<String,Object> environment) throws PubServerException
      This method get the Value items from the parameter
      Parameters:
      parameter -
      environment - Map<String, Object>, can be empty.
      Returns:
      Value Items as a List
      Throws:
      PubServerException
    • getValueItems

      public static final List<ValueItem> getValueItems(PluginMethod.Parameter parameter) throws PubServerException
      Throws:
      PubServerException