Class EntityBuilder
java.lang.Object
com.inductiveautomation.ignition.gateway.model.entity.EntityBuilder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()<C> EntityBuilderchildren(IntSupplier total, Supplier<Stream<C>> childrenSupplier, Function<C, String> toString, BiConsumer<C, EntityBuilder> childEntityBuilder) children(IntSupplier total, Supplier<Stream<Entity>> childrenSupplier) description(String description) description(Consumer<EntityBuilder.DescriptionComponentBuilder> descriptionBuilder) diagnostics(com.codahale.metrics.MetricRegistry metricRegistry, com.codahale.metrics.health.HealthCheckRegistry healthCheckRegistry, Consumer<EntityBuilder.DiagnosticComponentBuilder> diagnosticsBuilder) diagnostics(DiagnosticComponent diagnosticComponent) diagnostics(GatewayContext context, Consumer<EntityBuilder.DiagnosticComponentBuilder> diagnosticsBuilder) Adds aDiagnosticComponentto this entity.diagnostics(Consumer<EntityBuilder.DiagnosticComponentBuilder> diagnosticsBuilder) Adds aDiagnosticComponentto this entity.enablement(BooleanSupplier isEnabled) Adds an immutableEnablementComponentto this entity with the given supplier of enabled state.enablement(BooleanSupplier isEnabled, BiFunction<Boolean, String, CompletableFuture<Void>> setEnabled) Adds a mutableEnablementComponentwith the given state getter and setter.lastModified(Date lastModified, String lastModifiedBy) navigation(String sectionLabel, Consumer<EntityBuilder.NavigationComponentBuilder> navigationBuilder) Adds aNavigationComponentto this entity.
-
Constructor Details
-
EntityBuilder
-
-
Method Details
-
enablement
Adds an immutableEnablementComponentto this entity with the given supplier of enabled state.- Parameters:
isEnabled- Provides view into enabled state
-
enablement
public EntityBuilder enablement(BooleanSupplier isEnabled, BiFunction<Boolean, String, CompletableFuture<Void>> setEnabled) Adds a mutableEnablementComponentwith the given state getter and setter.- Parameters:
isEnabled- Provides view into enabled statesetEnabled- Used to change the enabled state (enable or disable). This method should return a future that completes when the operation is complete.
-
description
-
description
public EntityBuilder description(Consumer<EntityBuilder.DescriptionComponentBuilder> descriptionBuilder) -
iconUrl
-
lastModified
-
children
-
children
public <C> EntityBuilder children(IntSupplier total, Supplier<Stream<C>> childrenSupplier, Function<C, String> toString, BiConsumer<C, EntityBuilder> childEntityBuilder) -
children
-
diagnostics
public EntityBuilder diagnostics(@Nonnull Consumer<EntityBuilder.DiagnosticComponentBuilder> diagnosticsBuilder) Adds aDiagnosticComponentto this entity. Use this method only if you add on-demand metrics and healthchecks that don't use the registries. -
diagnostics
public EntityBuilder diagnostics(@Nonnull GatewayContext context, @Nonnull Consumer<EntityBuilder.DiagnosticComponentBuilder> diagnosticsBuilder) Adds aDiagnosticComponentto this entity. Use this method if you want to add metrics and healthchecks that are registered with the gateway-wide registries. -
diagnostics
public EntityBuilder diagnostics(@Nullable com.codahale.metrics.MetricRegistry metricRegistry, @Nullable com.codahale.metrics.health.HealthCheckRegistry healthCheckRegistry, @Nonnull Consumer<EntityBuilder.DiagnosticComponentBuilder> diagnosticsBuilder) -
diagnostics
-
build