Class ExtensionPointRecordMigrationStrategy.Builder
java.lang.Object
com.inductiveautomation.ignition.gateway.config.migration.ExtensionPointRecordMigrationStrategy.Builder
- Enclosing class:
- ExtensionPointRecordMigrationStrategy
Builder for
ExtensionPointRecordMigrationStrategy
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
descriptionField
(SFieldString descriptionField) Sets the field of the profile record that represents the description of the profile.enabledField
(SFieldBoolean enabledField) Sets the field of the profile record that represents the enabled state of the profile.migratedField
(SFieldBoolean migratedField) Sets the field of the profile record that represents whether the record has been migrated or not.nameField
(SFieldString nameField) The field of the profile record that represents the name of the profile.profileEncoder
(Consumer<DefaultRecordEncodingDelegate.Builder> encoderCustomizer) Allows for customization of the profile record encoder.profileMeta
(RecordMeta<?> profileMeta) Sets the record meta for the profile record.profilePredicate
(Predicate<PersistentRecord> predicate) Sets a predicate that will be used to determine whether a profile record should be migrated or not.resourceMigrationAugmenter
(ExtensionPointRecordMigrationStrategy.ResourceMigrationAugmenter augmenter) resourceType
(ResourceType resourceType) Set the resource type for the extension point.settingsEncoder
(Consumer<DefaultRecordEncodingDelegate.Builder> encoderCustomizer) Allows for customization of the settings record encoder.settingsMeta
(RecordMeta<?> settingsMeta) Sets the record meta for the settings record.settingsRecordForeignKey
(SFieldReference<?> settingsRecordForeignKey) Sets the foreign key field on the settings record that points to the profile record.typeField
(SFieldString typeField) Sets the field of the profile record that represents the type-id of the extension point.withProfileEncoder
(RecordEncodingDelegate profileEncoder) Specifies a custom encoder for the profile record.withSettingsEncoder
(RecordEncodingDelegate settingsEncoder) Specifies a custom encoder for the settings record.
-
Method Details
-
resourceType
Set the resource type for the extension point. This resource type defines the extension point that this type is an instance of.This is required.
-
nameField
The field of the profile record that represents the name of the profile. This is only required if the name field is not automatically discoverable.- See Also:
-
descriptionField
public ExtensionPointRecordMigrationStrategy.Builder descriptionField(SFieldString descriptionField) Sets the field of the profile record that represents the description of the profile. This is optional. If not set, an attempt will be made to discover the description field automatically. -
enabledField
Sets the field of the profile record that represents the enabled state of the profile. This is optional. If not set, an attempt will be made to discover the enabled field automatically. -
typeField
Sets the field of the profile record that represents the type-id of the extension point. This is required, but does not need to be set explicitly. If not set explicitly, the builder will attempt to find this field by looking for an SFieldString named "type" on the profile record. -
migratedField
Sets the field of the profile record that represents whether the record has been migrated or not. This is required, but does not need to be set explicitly. If not set explicitly, the builder will attempt to find this field by looking for an SFieldBoolean named "migrated" on the profile record. -
profileMeta
Sets the record meta for the profile record. This is required. -
withProfileEncoder
public ExtensionPointRecordMigrationStrategy.Builder withProfileEncoder(RecordEncodingDelegate profileEncoder) Specifies a custom encoder for the profile record. This is optional. If not set, aDefaultRecordEncodingDelegate
will be created automatically, which can be customized by callingprofileEncoder(Consumer)
. Don't call both methods. -
profileEncoder
public ExtensionPointRecordMigrationStrategy.Builder profileEncoder(Consumer<DefaultRecordEncodingDelegate.Builder> encoderCustomizer) Allows for customization of the profile record encoder. This is optional. If not set, aDefaultRecordEncodingDelegate
will be created automatically. Do not call both this method andwithProfileEncoder(RecordEncodingDelegate)
. -
settingsRecordForeignKey
public ExtensionPointRecordMigrationStrategy.Builder settingsRecordForeignKey(SFieldReference<?> settingsRecordForeignKey) Sets the foreign key field on the settings record that points to the profile record. This is optional. If not set, the builder will attempt to find this field by looking for an SFieldReference on the settings record named 'profile' that references the profile record. -
settingsMeta
Sets the record meta for the settings record. This is optional (some extension point types may not have settings). -
withSettingsEncoder
public ExtensionPointRecordMigrationStrategy.Builder withSettingsEncoder(RecordEncodingDelegate settingsEncoder) Specifies a custom encoder for the settings record. This is optional. If not set, aDefaultRecordEncodingDelegate
will be created automatically, which can be customized by callingsettingsEncoder(Consumer)
. Don't call both methods. -
settingsEncoder
public ExtensionPointRecordMigrationStrategy.Builder settingsEncoder(Consumer<DefaultRecordEncodingDelegate.Builder> encoderCustomizer) Allows for customization of the settings record encoder. This is optional. If not set, aDefaultRecordEncodingDelegate
will be created automatically. Do not call both this method andwithSettingsEncoder(RecordEncodingDelegate)
. -
profilePredicate
public ExtensionPointRecordMigrationStrategy.Builder profilePredicate(Predicate<PersistentRecord> predicate) Sets a predicate that will be used to determine whether a profile record should be migrated or not. This is optional. If not set, all records of the specified type will be migrated. -
resourceMigrationAugmenter
public ExtensionPointRecordMigrationStrategy.Builder resourceMigrationAugmenter(ExtensionPointRecordMigrationStrategy.ResourceMigrationAugmenter augmenter) -
build
-