Class ReferencePropertyBuilder<C>

java.lang.Object
com.inductiveautomation.ignition.gateway.config.ReferencePropertyBuilder<C>
Type Parameters:
C - The type of the configuration object. This may be the config type "R" that matches a ResourceTypeMeta, or it may be the profile type "P" (profile) of an extension point or the type "S" (settings) of an ExtensionPoint, depending on the context of where this reference property is used.

public class ReferencePropertyBuilder<C> extends Object
Helps build a ReferenceProperty, which represents a property on a config resource that references another resource by name.
  • Constructor Details

    • ReferencePropertyBuilder

      public ReferencePropertyBuilder(@Nonnull ResourceType sourceType, @Nonnull String propertyName)
  • Method Details

    • targetType

      public ReferencePropertyBuilder<C> targetType(ResourceType targetResourceType)
      Parameters:
      targetResourceType - The resource type of the target resource that this reference finder is looking for.
    • value

      public ReferencePropertyBuilder<C> value(Function<C,String> getValueFn)
      Parameters:
      getValueFn - A function that extracts the value of the reference. In other words, the name of the resource that this reference property references on the given resource config object. May return null.
    • onUpdate

      public ReferencePropertyBuilder<C> onUpdate(BiFunction<C,String,C> updateConfig)
      Parameters:
      updateConfig - A callback that returns a new copy of the configuration object with the reference updated.
    • caseSensitive

      public ReferencePropertyBuilder<C> caseSensitive(boolean caseSensitiveMatch)
      Sets case sensitivity for the reference match. If not called, will default to case-insensitive match.