Class DynamicPropertyUtil
java.lang.Object
com.inductiveautomation.factorypmi.application.binding.util.DynamicPropertyUtil
This class can be used to delegate the functions that a MutableDynamicPropertyProvider needs to implement.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidDeprecated.static voidcheckRemovalLegality(DynamicPropertyProvider thiz, String name, Collection<String> ignoreSiblingsList) Checks to see if it is legal to remove the named property from the given dynamic property provider.static booleanclassHasProperty(Class clz, String name) static intcountDependencies(Component component, String propertyName) Counts the number of interactions that are dependent on the named property of the given componentstatic voidfirePropertyChange(JComponent parent, String name, Object oldValue, Object newValue) static Set<PropertyAdapter>getDependencies(DynamicPropertyProvider thiz, String name, Collection<String> ignoreSiblingsList) Finds all property adapters that have an interaction to the given property name, ignoring adapters whose target is the given source and whose target prop name is in the ignore list.static InteractionControllerFetches the interaction controller given a component.static DynamicPropertyDescriptor[]getProperties(TreeMap<String, DynamicPropertyDescriptor> dynamicProps) static ClassgetPropertyType(MutableDynamicPropertyProvider thiz, String name) static ObjectgetPropertyValue(MutableDynamicPropertyProvider thiz, String name) static booleanisPropertyDefined(MutableDynamicPropertyProvider thiz, String name) static booleanReturns true if the given property's name is unique to the property provider, checking both static and dynamic propertiesstatic StringlistToHTML(Collection<PropertyAdapter> list) static voidremoveProperty(MutableDynamicPropertyProvider thiz, String name) Deprecated.static voidremoveProperty(MutableDynamicPropertyProvider thiz, String name, Collection<String> ignoreSiblingsList) static voidsetPropertyValue(MutableDynamicPropertyProvider thiz, String name, Object value) protected static boolean
- 
Constructor Details- 
DynamicPropertyUtilpublic DynamicPropertyUtil()
 
- 
- 
Method Details- 
getPropertiespublic static DynamicPropertyDescriptor[] getProperties(TreeMap<String, DynamicPropertyDescriptor> dynamicProps) 
- 
checkRemovalLegalitypublic static void checkRemovalLegality(DynamicPropertyProvider thiz, String name, Collection<String> ignoreSiblingsList) throws IllegalArgumentException Checks to see if it is legal to remove the named property from the given dynamic property provider. If another component's property is bound to this property, legality fails, and an IllegalArgumentException is thrown. If legality succeeds, this function simply returns.- Parameters:
- thiz- The dynamic property provider that contains the property to remove
- name- The name of the property to remove
- ignoreSiblingsList- An optional (null-OK) list of names of properties that will also be deleted from the same property provider, so their dependencies can be ignored
- Throws:
- IllegalArgumentException
 
- 
getDependenciespublic static Set<PropertyAdapter> getDependencies(DynamicPropertyProvider thiz, String name, Collection<String> ignoreSiblingsList) Finds all property adapters that have an interaction to the given property name, ignoring adapters whose target is the given source and whose target prop name is in the ignore list.
- 
countDependenciesCounts the number of interactions that are dependent on the named property of the given component
- 
getInteractionControllerFetches the interaction controller given a component. Can return null if you pass in a null component or if theBindingRootcannot be found in the component's ancestors.- Parameters:
- comp- The component whose ancestors we want to search for the interaction controller
- Returns:
- The interaction controller for the given component's ancestor chain
 
- 
listToHTML
- 
removeProperty@Deprecated public static void removeProperty(MutableDynamicPropertyProvider thiz, String name) throws IllegalArgumentException Deprecated.- Throws:
- IllegalArgumentException
 
- 
removePropertypublic static void removeProperty(MutableDynamicPropertyProvider thiz, String name, Collection<String> ignoreSiblingsList) throws IllegalArgumentException - Throws:
- IllegalArgumentException
 
- 
addProperty@Deprecated public static void addProperty(MutableDynamicPropertyProvider thiz, DynamicPropertyDescriptor prop) throws InvalidNameException Deprecated.- Throws:
- InvalidNameException
 
- 
getPropertyValue
- 
getPropertyType
- 
typesEqual
- 
setPropertyValuepublic static void setPropertyValue(MutableDynamicPropertyProvider thiz, String name, Object value) throws ClassCastException - Throws:
- ClassCastException
 
- 
firePropertyChangepublic static void firePropertyChange(JComponent parent, String name, Object oldValue, Object newValue) 
- 
isPropertyNameUniquepublic static boolean isPropertyNameUnique(DynamicPropertyProvider thiz, DynamicPropertyDescriptor prop) Returns true if the given property's name is unique to the property provider, checking both static and dynamic properties
- 
classHasProperty
- 
isPropertyDefined
 
-