Package com.priint.pubserver.util
Class ValueUtils
java.lang.Object
com.priint.pubserver.util.ValueUtils
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final StringgetValueIdentifier(PluginMethod.Parameter parameter) This method gets the value identifier of the parameterstatic final StringgetValueItemLabel(ValueItem value) This method gets the label of the valuegetValueItems(PluginMethod.Parameter parameter) getValueItems(PluginMethod.Parameter parameter, Map<String, Object> environment) This method get the Value items from the parameterstatic final StringgetValueLabel(PluginMethod.Parameter parameter) This method gets the value label of the parameterstatic final booleanhasValueDefinition(PluginMethod.Parameter parameter) Checks if the parameter has a value definitionstatic final booleanThis method checks if the Values is defined.static final voidsortAscending(List<ValueItem> items) This method sorts the values in ascending orderstatic final voidsortDescending(List<ValueItem> items) This method sorts the values in descending order
-
Constructor Details
-
ValueUtils
public ValueUtils()
-
-
Method Details
-
sortAscending
This method sorts the values in ascending order- Parameters:
items- list of values
-
sortDescending
This method sorts the values in descending order- Parameters:
items- list of values
-
isDefined
This method checks if the Values is defined.- Parameters:
var- - Value to be checked- Returns:
- true if the Value is defined. False otherwise.
-
hasValueDefinition
Checks if the parameter has a value definition- Parameters:
parameter- PluginMethod parameter- Returns:
- true if the Value is defined. False otherwise.
-
getValueIdentifier
This method gets the value identifier of the parameter- Parameters:
parameter- PluginMethod parameter- Returns:
- Value identifier as String
-
getValueLabel
This method gets the value label of the parameter- Parameters:
parameter- PluginMethod parameter- Returns:
- Value label as String
-
getValueItemLabel
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 PubServerExceptionThis 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
-