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 Object
implements PropertyAdapter, Adapter.ValueHolder
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from interface com.inductiveautomation.factorypmi.application.binding.AdapterAdapter.ValueHolderNested classes/interfaces inherited from interface com.inductiveautomation.factorypmi.application.binding.PropertyAdapterPropertyAdapter.PAType
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected VisionClientContextprotected booleanprotected LoggerExprotected booleanOverlay opt out notifies the adapter that this binding's quality shouldn't affect the overlay systemprotected Componentprotected Stringprotected QualifiedValueprotected Class
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidconnect(VisionClientContext appContext) Calls connect() on all interaction descriptorsvoidCalls disconnect() on all interaction descriptorsThe target component is the component that this adapter serves.protected StringReturns the full path to the target componentprotected voidhandleError(Exception ex, QualityCode quality) protected voidprotected LoggerExprotected booleanReturns 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, 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.booleanbooleanbooleanisValid()Returns true if the target isn't null and the target has a parent.protected booleanvoidsetOverlayOptOut(boolean overlayOptOut) voidsetQValue(QualifiedValue qualifiedValue) Sets this adapter's value.voidsetSetterMethodName(String string) Deprecated.voidvoidsetTargetPropertyDynamic(boolean b) voidsetTargetPropertyName(String string) voidDeprecated.Use setQValue() instead.voidsetValueClass(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.toString()protected voidupdateQuality(QualityCode quality) protected voidSets the target property to the value.protected voidSets the property adapter value to the given QualifiedValue, and updates the data quality, then calls updateTarget().protected booleanCalled 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, waitMethods inherited from interface com.inductiveautomation.factorypmi.application.binding.AdaptergetInteractionsMethods inherited from interface com.inductiveautomation.factorypmi.application.binding.PropertyAdaptergetReferenceType
- 
Field Details- 
target
- 
targetPropertyName
- 
value
- 
valueClass
- 
isTargetPropertyDynamicprotected boolean isTargetPropertyDynamic
- 
overlayOptOutprotected boolean overlayOptOutOverlay opt out notifies the adapter that this binding's quality shouldn't affect the overlay system
- 
appContext
- 
log
 
- 
- 
Constructor Details- 
AbstractPropertyAdapterprotected AbstractPropertyAdapter()
 
- 
- 
Method Details- 
isDataUsedReturns whether or not the data portion of the qualified value should be used, or whether only the quality portion should be used instead.
- 
isDataUsedReturns whether or not the data portion of the qualified value should be used, or whether only the quality portion should be used instead.
- 
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
 
- 
connectCalls connect() on all interaction descriptors
- 
getTargetDesc
- 
isValidpublic boolean isValid()Returns true if the target isn't null and the target has a parent.
- 
getTargetFullPathReturns the full path to the target component
- 
getTargetDescription 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.
- 
setTarget
- 
getTargetPropertyName- Specified by:
- getTargetPropertyNamein interface- PropertyAdapter
 
- 
setTargetPropertyName- Specified by:
- setTargetPropertyNamein interface- PropertyAdapter
 
- 
setSetterMethodNameDeprecated.This is no longer used, but is here for serialization. The setter is now looked up dynamically based on the target property name.
- 
getQValue- Specified by:
- getQValuein interface- Adapter.ValueHolder
 
- 
setValueDeprecated.Use setQValue() instead. Kept for serialization.
- 
setQValueSets 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
 
- 
updateQuality
- 
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(). 
- 
updateValueSets 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()
- 
handleError
- 
isValueClassPrimitiveprotected boolean isValueClassPrimitive()
- 
getValueClass
- 
setValueClass
- 
isTargetPropertyDynamicpublic boolean isTargetPropertyDynamic()
- 
setTargetPropertyDynamicpublic void setTargetPropertyDynamic(boolean b) 
- 
toString
- 
isOverlayOptOutpublic boolean isOverlayOptOut()
- 
setOverlayOptOutpublic void setOverlayOptOut(boolean overlayOptOut) 
 
-