Class BindUtilities
java.lang.Object
com.inductiveautomation.factorypmi.application.binding.util.BindUtilities
Contains various static functions used to create bindings
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidstatic voidconnectBindings(BindingRoot window, TagManager manager, Expression expr, Adapter adapter, InteractionListener interactionListener) Recursively goes through the given expression, connecting all BoundVariableExpressions up with PropertyListenerDescriptors.static QueryHoldercreateQueryHolder(String query, TagManager manager, BindingRoot selectedWindow, PropertyAdapter adapter, String thisPath) static QueryHoldercreateQueryHolderForTagBinding(String query, TagManager manager, TagPath localPath) static BoundValueHoldercreateValueHolder(String expression, TagManager manager, BindingRoot selectedWindow, PropertyAdapter adapter, String thisPath) static TagPathderelativezie(TagPath tagPath, TagPath parentPath) Deprecated.static List<PropertyNode>static List<PropertyNode>static ObjectgetCurrentValue(PropertyNode property) Deprecated.Use PropertyNode.getQValue().getValue() insteadstatic FeatureDescriptorgetFeatureDescriptor(Component parent, String propName) Returns the FeatureDescriptor for the given property name on the given component or null if the property is not found.static PropertyListenerDescriptorgetPLDForPath(BindingRoot selectedWindow, String path) Creates a new PropertyListenerDescriptor for the given path.static PropertyNodegetPropertyNode(Component parent, FeatureDescriptor fd) Returns a PropertyNode (Dynamic or Static) for the given feature descriptor on the given componentstatic PropertyNodegetPropertyNode(Component source, String propName, boolean onlyBindable) Finds the PropertyNode for the given component+name.static PropertyNodegetPropertyNodeForPath(BindingRoot window, String path, boolean onlyBindable) For the given path (with or without path delimiters { and }) in the given window, returns the PropertyNode.static PropertyNodegetPropertyNodeForRelativePath(JComponent relativeTo, String path, boolean onlyBindable) static Classstatic QualifiedValuegetQValue(Component component, FeatureDescriptor property) static booleanstatic booleanisBound(JComponent component, String propertyName) Checks to see if the property of the given component is bound or not.static booleanisDBBound(JComponent component, String propertyName) Checks to see if the property of the given component has a database binding.static booleanReturns true if the string seems to be a path (absolute OR relative).static booleanstatic booleanisPropertyDefined(BindingRoot window, String path) static booleanMatches something like "{$...}"static voidstatic ExpressionParseContextnewBinder(BindingRoot selectedWindow, TagManager tagManager, TagPath localPath, FunctionFactory funcFactory) static voidpullCurrentValues(PropertyAdapter adapter) 
- 
Field Details- 
OPEN_DELIM- See Also:
 
- 
CLOSE_DELIM- See Also:
 
- 
RELPATH_SOURCE- See Also:
 
- 
RELPATH_PARENT- See Also:
 
 
- 
- 
Constructor Details- 
BindUtilitiespublic BindUtilities()
 
- 
- 
Method Details- 
addAllInteractions
- 
getPropertyType
- 
isBoundChecks to see if the property of the given component is bound or not.
- 
isBound
- 
isDBBoundChecks to see if the property of the given component has a database binding. Used by Edge to check if db binding should show for a component.
- 
derelativezie@Deprecated public static TagPath derelativezie(TagPath tagPath, TagPath parentPath) throws RuntimeException Deprecated.UseTagPathParserderelativezie(TagPath, TagPath)instead (this calls through to that).- Throws:
- RuntimeException
 
- 
newBinderpublic static ExpressionParseContext newBinder(BindingRoot selectedWindow, TagManager tagManager, TagPath localPath, FunctionFactory funcFactory) 
- 
getPLDForPathpublic static PropertyListenerDescriptor getPLDForPath(BindingRoot selectedWindow, String path) throws Exception Creates a new PropertyListenerDescriptor for the given path. Only the initial value, source component, and source property will be configured on the PLD- Throws:
- Exception- if it can't pull the current value for the property.
 
- 
connectBindingspublic static void connectBindings(BindingRoot window, TagManager manager, Expression expr, Adapter adapter, InteractionListener interactionListener) throws RuntimeException Recursively goes through the given expression, connecting all BoundVariableExpressions up with PropertyListenerDescriptors. Multiple BVEs that share the same path will share one PLD, so that an expression isn't re-evaluated multiple times for one property change event from component.- Throws:
- RuntimeException
 
- 
createQueryHolderForTagBindingpublic static QueryHolder createQueryHolderForTagBinding(String query, TagManager manager, TagPath localPath) throws Exception - Throws:
- Exception
 
- 
createQueryHolderpublic static QueryHolder createQueryHolder(String query, TagManager manager, BindingRoot selectedWindow, PropertyAdapter adapter, String thisPath) throws Exception - Throws:
- Exception
 
- 
createValueHolderpublic static BoundValueHolder createValueHolder(String expression, TagManager manager, BindingRoot selectedWindow, PropertyAdapter adapter, String thisPath) throws Exception - Throws:
- Exception
 
- 
getBoundProperties
- 
getAllProperties
- 
isPropertyBindable
- 
main
- 
isPropertyDefined
- 
isPathReturns true if the string seems to be a path (absolute OR relative). Simply checks if the string starts with { and ends with }
- 
isRelativePathMatches something like "{$...}"
- 
getPropertyNodeForPathpublic static PropertyNode getPropertyNodeForPath(BindingRoot window, String path, boolean onlyBindable) throws RuntimeException For the given path (with or without path delimiters { and }) in the given window, returns the PropertyNode.- Parameters:
- window- The window in which the path resides. Throws a RuntimeException if the path isn't valid.
- path- The path to the property
- onlyBindable- If true, only bindable properties will be considered
- Throws:
- RuntimeException
 
- 
getPropertyNodeForRelativePathpublic static PropertyNode getPropertyNodeForRelativePath(JComponent relativeTo, String path, boolean onlyBindable) throws RuntimeException - Throws:
- RuntimeException
 
- 
getPropertyNodepublic static PropertyNode getPropertyNode(Component source, String propName, boolean onlyBindable) throws RuntimeException Finds the PropertyNode for the given component+name. If the property doesn't exist, a RuntimeException is thrown.- Parameters:
- source- The component to look for the property on.
- propName- The name of the property. Can be in the format "name:path.to.subprop" for UDT sub-properties.
- onlyBindable- If true, only bindable properties will be accepted.
- Throws:
- RuntimeException
 
- 
getCurrentValueDeprecated.Use PropertyNode.getQValue().getValue() instead- Throws:
- Exception
 
- 
getQValuepublic static QualifiedValue getQValue(Component component, FeatureDescriptor property) throws Exception - Throws:
- Exception
 
- 
pullCurrentValues
- 
getFeatureDescriptorReturns the FeatureDescriptor for the given property name on the given component or null if the property is not found.
- 
getPropertyNodeReturns a PropertyNode (Dynamic or Static) for the given feature descriptor on the given component
 
-