Package com.priint.pubserver.util
Class ValueUtils
- java.lang.Object
-
- com.priint.pubserver.util.ValueUtils
-
public class ValueUtils extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classValueUtils.ValueItemComparator
-
Constructor Summary
Constructors Constructor Description ValueUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetValueIdentifier(PluginMethod.Parameter parameter)This method gets the value identifier of the parameterstatic java.lang.StringgetValueItemLabel(ValueItem value)This method gets the label of the valuestatic java.util.List<ValueItem>getValueItems(PluginMethod.Parameter parameter)static java.util.List<ValueItem>getValueItems(PluginMethod.Parameter parameter, java.util.Map<java.lang.String,java.lang.Object> environment)This method get the Value items from the parameterstatic java.lang.StringgetValueLabel(PluginMethod.Parameter parameter)This method gets the value label of the parameterstatic booleanhasValueDefinition(PluginMethod.Parameter parameter)Checks if the parameter has a value definitionstatic booleanisDefined(Value var)This method checks if the Values is defined.static voidsortAscending(java.util.List<ValueItem> items)This method sorts the values in ascending orderstatic voidsortDescending(java.util.List<ValueItem> items)This method sorts the values in descending order
-
-
-
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
-
getValueItems
public static final java.util.List<ValueItem> getValueItems(PluginMethod.Parameter parameter) throws PubServerException
- Throws:
PubServerException
-
-