Class AbstractPropertyAdapter
- java.lang.Object
- 
- com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter
 
- 
- All Implemented Interfaces:
- Adapter,- Adapter.ValueHolder,- PropertyAdapter
 - Direct Known Subclasses:
- AbstractQueryAdapter,- AbstractTagAdapter,- CellUpdateAdapter,- ExpressionPropertyAdapter,- SimpleBoundColorAdapter,- SimpleBoundPropertyAdapter
 
 public abstract class AbstractPropertyAdapter extends java.lang.Object implements PropertyAdapter, Adapter.ValueHolder 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected classAbstractPropertyAdapter.EdtUpdateValue- 
Nested classes/interfaces inherited from interface com.inductiveautomation.factorypmi.application.binding.AdapterAdapter.ValueHolder
 - 
Nested classes/interfaces inherited from interface com.inductiveautomation.factorypmi.application.binding.PropertyAdapterPropertyAdapter.PAType
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected VisionClientContextappContextprotected booleanisTargetPropertyDynamicprotected LoggerExlogprotected booleanoverlayOptOutOverlay opt out notifies the adapter that this binding's quality shouldn't affect the overlay systemprotected java.awt.Componenttargetprotected java.lang.StringtargetPropertyNameprotected QualifiedValuevalueprotected java.lang.ClassvalueClass
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractPropertyAdapter()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidconnect(VisionClientContext appContext)Calls connect() on all interaction descriptorsvoiddisconnect()Calls disconnect() on all interaction descriptorsQualifiedValuegetQValue()java.awt.ComponentgetTarget()The target component is the component that this adapter serves.protected java.lang.StringgetTargetDesc()java.lang.StringgetTargetFullPath()Returns the full path to the target componentjava.lang.StringgetTargetPropertyName()java.lang.ClassgetValueClass()protected voidhandleError(java.lang.Exception ex, QualityCode quality)protected voidhandleNullToPrimitive()protected LoggerExinitLogger()protected booleanisDataUsed(QualifiedValue qv)Returns whether or not the data portion of the qualified value should be used, or whether only the quality portion should be used instead.static booleanisDataUsed(QualifiedValue qv, java.lang.Class<?> targetType)Returns whether or not the data portion of the qualified value should be used, or whether only the quality portion should be used instead.booleanisOverlayOptOut()booleanisTargetPropertyDynamic()booleanisValid()Returns true if the target isn't null and the target has a parent.protected booleanisValueClassPrimitive()voidsetOverlayOptOut(boolean overlayOptOut)voidsetQValue(QualifiedValue qualifiedValue)Sets this adapter's value.voidsetSetterMethodName(java.lang.String string)Deprecated.voidsetTarget(java.awt.Component component)voidsetTargetPropertyDynamic(boolean b)voidsetTargetPropertyName(java.lang.String string)voidsetValue(java.lang.Object value)Deprecated.Use setQValue() instead.voidsetValueClass(java.lang.Class class1)voidshutdown()Notifies the adapter that it is becoming inactive, and should cease any polling/threaded activities.voidstartup()Notifies the adapter that it is becoming active, and should start any polling/threaded activities.java.lang.StringtoString()protected voidupdateQuality(QualityCode quality)protected voidupdateTarget()Sets the target property to the value.protected voidupdateValue(QualifiedValue qv)Sets the property adapter value to the given QualifiedValue, and updates the data quality, then calls updateTarget().protected booleanuseQuality()Called to determine whether or not to push qualities to the target.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface com.inductiveautomation.factorypmi.application.binding.AdaptergetInteractions
 - 
Methods inherited from interface com.inductiveautomation.factorypmi.application.binding.PropertyAdaptergetReferenceType
 
- 
 
- 
- 
- 
Field Detail- 
targetprotected java.awt.Component target 
 - 
targetPropertyNameprotected java.lang.String targetPropertyName 
 - 
valueprotected QualifiedValue value 
 - 
valueClassprotected java.lang.Class valueClass 
 - 
isTargetPropertyDynamicprotected boolean isTargetPropertyDynamic 
 - 
overlayOptOutprotected boolean overlayOptOut Overlay opt out notifies the adapter that this binding's quality shouldn't affect the overlay system
 - 
appContextprotected VisionClientContext appContext 
 - 
logprotected LoggerEx log 
 
- 
 - 
Method Detail- 
isDataUsedpublic static boolean isDataUsed(QualifiedValue qv, java.lang.Class<?> targetType) Returns whether or not the data portion of the qualified value should be used, or whether only the quality portion should be used instead.
 - 
isDataUsedprotected boolean isDataUsed(QualifiedValue qv) Returns whether or not the data portion of the qualified value should be used, or whether only the quality portion should be used instead.
 - 
initLoggerprotected LoggerEx initLogger() 
 - 
startuppublic void startup() Description copied from interface:AdapterNotifies the adapter that it is becoming active, and should start any polling/threaded activities.
 - 
shutdownpublic void shutdown() Description copied from interface:AdapterNotifies the adapter that it is becoming inactive, and should cease any polling/threaded activities.
 - 
disconnectpublic void disconnect() Calls disconnect() on all interaction descriptors- Specified by:
- disconnectin interface- Adapter
 
 - 
connectpublic void connect(VisionClientContext appContext) Calls connect() on all interaction descriptors
 - 
getTargetDescprotected java.lang.String getTargetDesc() 
 - 
isValidpublic boolean isValid() Returns true if the target isn't null and the target has a parent.
 - 
getTargetFullPathpublic java.lang.String getTargetFullPath() Returns the full path to the target component
 - 
getTargetpublic java.awt.Component getTarget() Description copied from interface:AdapterThe target component is the component that this adapter serves. This means it is the target of a property adapter or the source of events for an action adapter.
 - 
setTargetpublic void setTarget(java.awt.Component component) 
 - 
getTargetPropertyNamepublic java.lang.String getTargetPropertyName() - Specified by:
- getTargetPropertyNamein interface- PropertyAdapter
 
 - 
setTargetPropertyNamepublic void setTargetPropertyName(java.lang.String string) - Specified by:
- setTargetPropertyNamein interface- PropertyAdapter
 
 - 
setSetterMethodName@Deprecated public void setSetterMethodName(java.lang.String string) Deprecated.This is no longer used, but is here for serialization. The setter is now looked up dynamically based on the target property name.
 - 
getQValuepublic QualifiedValue getQValue() - Specified by:
- getQValuein interface- Adapter.ValueHolder
 
 - 
setValue@Deprecated public void setValue(java.lang.Object value) Deprecated.Use setQValue() instead. Kept for serialization.
 - 
setQValuepublic void setQValue(QualifiedValue qualifiedValue) Sets this adapter's value. Doesn't push the value to the target or update the quality if the target is a quality monitor. For that, use updateValue()- Specified by:
- setQValuein interface- Adapter.ValueHolder
 
 - 
updateQualityprotected void updateQuality(QualityCode quality) 
 - 
useQualityprotected boolean useQuality() Called to determine whether or not to push qualities to the target. Default implementation is:return !isOverlayOptOut() && target instanceof QualityMonitor; If overridden, make sure that you AND-in super(). 
 - 
updateValueprotected void updateValue(QualifiedValue qv) Sets the property adapter value to the given QualifiedValue, and updates the data quality, then calls updateTarget().This function is Non-EDT safe. It will re-call itself on the EDT if not called on EDT. 
 - 
updateTargetprotected void updateTarget() Sets the target property to the value. If a problem occurs, the problem is displayed, not thrown. Note that updateValue() is probably a better bet, as it updates both value and quality.
 - 
handleNullToPrimitiveprotected void handleNullToPrimitive() 
 - 
handleErrorprotected void handleError(java.lang.Exception ex, QualityCode quality)
 - 
isValueClassPrimitiveprotected boolean isValueClassPrimitive() 
 - 
getValueClasspublic java.lang.Class getValueClass() 
 - 
setValueClasspublic void setValueClass(java.lang.Class class1) 
 - 
isTargetPropertyDynamicpublic boolean isTargetPropertyDynamic() 
 - 
setTargetPropertyDynamicpublic void setTargetPropertyDynamic(boolean b) 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
isOverlayOptOutpublic boolean isOverlayOptOut() 
 - 
setOverlayOptOutpublic void setOverlayOptOut(boolean overlayOptOut) 
 
- 
 
-