Class ValueUtils


  • public class ValueUtils
    extends java.lang.Object
    • Constructor Detail

      • ValueUtils

        public ValueUtils()
    • Method Detail

      • sortAscending

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

        public static final void sortDescending​(java.util.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 java.lang.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 java.lang.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 java.lang.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 java.util.List<ValueItem> getValueItems​(PluginMethod.Parameter parameter,
                                                                    java.util.Map<java.lang.String,​java.lang.Object> environment)
                                                             throws PubServerException
        This method get the Value items from the parameter
        Parameters:
        parameter -
        environment - Map, can be empty.
        Returns:
        Value Items as a List
        Throws:
        PubServerException