Class DefaultResourceReferenceDelegate.Builder<T>
java.lang.Object
com.inductiveautomation.ignition.gateway.config.DefaultResourceReferenceDelegate.Builder<T>
- Enclosing class:
DefaultResourceReferenceDelegate<R>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()listReferenceProperty(String propertyName, Consumer<ListReferencePropertyBuilder<T>> builderConsumer) Use this method to add a reference property whose value is an ordered list of resource names.referenceProperty(ReferenceProperty<T> refProp) Use this method to add a reference property if you have a custom implementation.referenceProperty(String propertyName, Consumer<ReferencePropertyBuilder<T>> builderConsumer) Use this method to add a reference property to your reference delegate.
-
Constructor Details
-
Builder
-
-
Method Details
-
referenceProperty
public DefaultResourceReferenceDelegate.Builder<T> referenceProperty(String propertyName, Consumer<ReferencePropertyBuilder<T>> builderConsumer) Use this method to add a reference property to your reference delegate. Example:.referenceProperty("databaseName", builder -> builder .targetType(DatabaseConnectionResource.RESOURCE_TYPE) .value(MyConfigObject::databaseName) .onUpdate((newName, config) -> config.createCopyWithNewDbName(newName)); -
listReferenceProperty
public DefaultResourceReferenceDelegate.Builder<T> listReferenceProperty(String propertyName, Consumer<ListReferencePropertyBuilder<T>> builderConsumer) Use this method to add a reference property whose value is an ordered list of resource names. When the referenced resource is renamed, only the matching element(s) of the list are rewritten; the order and other elements are preserved. Example:.listReferenceProperty("identityProviders", builder -> builder .targetType(IdentityProviderConfig.RESOURCE_TYPE) .values(MyConfigObject::identityProviders) .onUpdate((config, newList) -> config.withIdentityProviders(newList))); -
referenceProperty
Use this method to add a reference property if you have a custom implementation. Otherwise, usereferenceProperty(String, Consumer). -
build
-