public abstract class DriverType extends BaseExtensionPointType
description, name, typeId
Constructor and Description |
---|
DriverType(java.lang.String typeId,
java.lang.String nameKey,
java.lang.String descriptionKey) |
Modifier and Type | Method and Description |
---|---|
abstract Driver |
createDriver(DriverContext driverContext,
DeviceSettingsRecord deviceSettings)
Instantiate a
Driver instance. |
java.util.List<LinkEntry> |
getLinks() |
abstract ReferenceField<?> |
getSettingsRecordForeignKey()
Returns the ReferenceField linking the extension point's settings record to the parent profile record.
|
addRecordInstanceActions, compareTo, findProfileSettingsRecord, getDescription, getName, getTypeId, isEnabled, newRecordConfigPanel, onRecordDestroyed
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSettingsRecordType
public DriverType(java.lang.String typeId, java.lang.String nameKey, java.lang.String descriptionKey)
typeId
- A unique identifier for this DriverType
.nameKey
- The key to use when retrieving a name for this type from BundleUtil
.descriptionKey
- The key to use when retrieving a description for this type from BundleUtil
.public java.util.List<LinkEntry> getLinks()
LinkEntry
s that should appear next to entries for this driver type.public abstract ReferenceField<?> getSettingsRecordForeignKey()
BaseExtensionPointType
getSettingsRecordForeignKey
in interface ExtensionPointType
getSettingsRecordForeignKey
in class BaseExtensionPointType
ReferenceField
in your PersistentRecord
pointing to the parent DeviceSettingsRecord
. If you don't have a settings record, return null
.public abstract Driver createDriver(DriverContext driverContext, DeviceSettingsRecord deviceSettings)
Driver
instance.
Use BaseExtensionPointType.findProfileSettingsRecord(GatewayContext, PersistentRecord)
, using the provided DeviceSettingsRecord
, to look up your driver-specific settings record.driverContext
- The DriverContext
.deviceSettings
- The DeviceSettingsRecord
for this instance.Driver
instance.