Class DefaultResourceRouteDelegate.ExtensionPointBuilder<P extends ExtensionPointProfileConfig>
java.lang.Object
com.inductiveautomation.ignition.gateway.config.DefaultResourceRouteDelegate.ExtensionPointBuilder<P>
- Enclosing class:
- DefaultResourceRouteDelegate<R>
public static class DefaultResourceRouteDelegate.ExtensionPointBuilder<P extends ExtensionPointProfileConfig>
extends Object
-
Constructor Summary
ConstructorsConstructorDescriptionExtensionPointBuilder
(ResourceType resourceType, JsonResourceCodec<ExtensionPointConfig<P, ?>> codec, ExtensionPointCollection<? extends ExtensionPoint<?>> extensionPointCollection) -
Method Summary
Modifier and TypeMethodDescriptionAdd a field resolver for the extension point profile.addSearchField
(String fieldName) Adds a field to the searchable fields set.build()
filter
(RouteFilter routeFilter) openApiGroupName
(String openApiGroupName) openApiTagName
(String openApiTagName) profileSchema
(com.inductiveautomation.ignition.common.gson.JsonObject profileSchema) Supply a JSON schema for the profile of this extension point.profileSchema
(Class<P> profileClass) profileSchema
(Consumer<SchemaUtil.Builder> profileSchemaBuilder) Build a JSON schema for the profile of this extension point.readPermission
(PermissionType readPermission) Sets the permission type required to read this resource type.setSearchFields
(Set<String> searchFields) Calling this method will set (and overwrite) the searchable fields set.supportsExtraDataFiles
(boolean supportsExtraDataFiles) writePermission
(PermissionType writePermission) Sets the permission type required to write to this resource type.
-
Constructor Details
-
ExtensionPointBuilder
public ExtensionPointBuilder(ResourceType resourceType, JsonResourceCodec<ExtensionPointConfig<P, ?>> codec, ExtensionPointCollection<? extends ExtensionPoint<?>> extensionPointCollection)
-
-
Method Details
-
profileSchema
public DefaultResourceRouteDelegate.ExtensionPointBuilder<P> profileSchema(com.inductiveautomation.ignition.common.gson.JsonObject profileSchema) Supply a JSON schema for the profile of this extension point. Use this overload if you have built the schema already. -
profileSchema
public DefaultResourceRouteDelegate.ExtensionPointBuilder<P> profileSchema(Consumer<SchemaUtil.Builder> profileSchemaBuilder) Build a JSON schema for the profile of this extension point. Use this overload if you want to build the schema programmatically. -
profileSchema
-
supportsExtraDataFiles
public DefaultResourceRouteDelegate.ExtensionPointBuilder<P> supportsExtraDataFiles(boolean supportsExtraDataFiles) -
filter
-
openApiGroupName
public DefaultResourceRouteDelegate.ExtensionPointBuilder<P> openApiGroupName(String openApiGroupName) -
openApiTagName
-
addField
public DefaultResourceRouteDelegate.ExtensionPointBuilder<P> addField(String fieldName, Function<P, Object> resolver) Add a field resolver for the extension point profile. Note that a field resolver for"type" ->
ExtensionPointProfileConfig.type()
is automatically added. -
addSearchField
Adds a field to the searchable fields set. Note that "name", "description", "enabled", and "mode" are automatically added. Also, any field added throughaddField(String, Function)
will be automatically added as a searchable field. To opt-out of this automatic behavior, callsetSearchFields(Set)
instead. -
setSearchFields
public DefaultResourceRouteDelegate.ExtensionPointBuilder<P> setSearchFields(Set<String> searchFields) Calling this method will set (and overwrite) the searchable fields set. By calling this method, you can gain complete control over the set of searchable fields - "name", "description", "enabled", "mode", and any fields added through addField will not be automatically added. -
readPermission
public DefaultResourceRouteDelegate.ExtensionPointBuilder<P> readPermission(PermissionType readPermission) Sets the permission type required to read this resource type. Default is READ. -
writePermission
public DefaultResourceRouteDelegate.ExtensionPointBuilder<P> writePermission(PermissionType writePermission) Sets the permission type required to write to this resource type. Default is WRITE. -
build
-