Class CvValueUtils
java.lang.Object
org.bidib.wizard.mvc.common.view.cvdefinition.CvValueUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 booleanCheck if the new value is available.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.
-
Constructor Details
-
CvValueUtils
public CvValueUtils()
-
-
Method Details
-
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
-
hasChangedNewValue
public static boolean hasChangedNewValue(CvNode cvNode, String newValue, Map<String, CvNode> cvNumberToNodeMap) Check if the new value is available.- Parameters:
cvNode- the cvNodenewValue- the new valuecvNumberToNodeMap- the cv number to cvNode map
-
getConfigVarByteValue
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
-
getConfigVarLongValue
-
getConfigVarStringValue
-