Class CvValueUtils
- java.lang.Object
-
- org.bidib.wizard.mvc.common.view.cvdefinition.CvValueUtils
-
public class CvValueUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description CvValueUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddNewValueToList(CvNode cvNode, List<org.bidib.jbidibc.core.node.ConfigurationVariable> cvList)Add a newConfigurationVariableitem to the list if the new value is available.static voidcompareAndAddNewValue(CvNode cvNode, String newValue, List<org.bidib.jbidibc.core.node.ConfigurationVariable> cvList, Map<String,CvNode> cvNumberToNodeMap)Add a newConfigurationVariableitem to the list if the new value is available.static voidcompareAndAddNewValue(LongCvNode cvNode, Integer newValue, List<org.bidib.jbidibc.core.node.ConfigurationVariable> cvList)Add a newConfigurationVariableitem to the list if the new value is available.static IntegergetConfigVarByteValue(CvNode cvNode, Map<String,CvNode> cvNumberToNodeMap)Return the byte value in the CV as integer value.static IntegergetConfigVarIntValue(CvNode cvNode, Map<String,CvNode> cvNumberToNodeMap)static LonggetConfigVarLongValue(CvNode cvNode)static StringgetConfigVarStringValue(CvNode cvNode)static voidwriteCvValues(org.bidib.wizard.api.model.NodeInterface selectedNode, com.jidesoft.grid.DefaultExpandableRow treeNode, Map<String,CvNode> cvNumberToNodeMap, CvDefinitionPanelProvider cvDefintionPanelProvider)Write the CV values provided intreeNodeparameter and sub-treeNodes via thecvDefinitionPanelProviderto the node.static voidwriteCvValues(org.bidib.wizard.api.model.NodeInterface selectedNode, List<org.bidib.jbidibc.core.node.ConfigurationVariable> cvList, Map<String,CvNode> cvNumberToNodeMap, CvDefinitionPanelProvider cvDefinitionPanelProvider)Write the CV values provided incvListparameter via thecvDefinitionPanelProviderto the node.
-
-
-
Method Detail
-
writeCvValues
public static void writeCvValues(org.bidib.wizard.api.model.NodeInterface selectedNode, com.jidesoft.grid.DefaultExpandableRow treeNode, Map<String,CvNode> cvNumberToNodeMap, CvDefinitionPanelProvider cvDefintionPanelProvider)Write the CV values provided intreeNodeparameter and sub-treeNodes via thecvDefinitionPanelProviderto the node.- Parameters:
selectedNode- the selected nodetreeNode- the tree nodecvNumberToNodeMap- the mapcvDefinitionPanelProvider- the CV definition panel provider
-
writeCvValues
public static void writeCvValues(org.bidib.wizard.api.model.NodeInterface selectedNode, List<org.bidib.jbidibc.core.node.ConfigurationVariable> cvList, Map<String,CvNode> cvNumberToNodeMap, CvDefinitionPanelProvider cvDefinitionPanelProvider)Write the CV values provided incvListparameter via thecvDefinitionPanelProviderto the node.- Parameters:
selectedNode- the selected nodecvList- the list of new CV valuescvNumberToNodeMap- the mapcvDefinitionPanelProvider- the CV definition panel provider
-
addNewValueToList
public static void addNewValueToList(CvNode cvNode, List<org.bidib.jbidibc.core.node.ConfigurationVariable> cvList)
Add a newConfigurationVariableitem to the list if the new value is available.- Parameters:
cvNode- the cvNodecvList- the list
-
compareAndAddNewValue
public static void compareAndAddNewValue(CvNode cvNode, String newValue, List<org.bidib.jbidibc.core.node.ConfigurationVariable> cvList, Map<String,CvNode> cvNumberToNodeMap)
Add a newConfigurationVariableitem to the list if the new value is available.- Parameters:
cvNode- the cvNodecvList- the list
-
compareAndAddNewValue
public static void compareAndAddNewValue(LongCvNode cvNode, Integer newValue, List<org.bidib.jbidibc.core.node.ConfigurationVariable> cvList)
Add a newConfigurationVariableitem to the list if the new value is available.- Parameters:
cvNode- the cvNodecvList- the list
-
getConfigVarByteValue
public static Integer getConfigVarByteValue(CvNode cvNode, Map<String,CvNode> cvNumberToNodeMap)
Return the byte value in the CV as integer value. If no CV is assigned the value0is returned.- Parameters:
cvNode- the cv nodecvNumberToNodeMap- the map of cv number to node- Returns:
- the value
-
getConfigVarIntValue
public static Integer getConfigVarIntValue(CvNode cvNode, Map<String,CvNode> cvNumberToNodeMap)
-
-