Class DefaultResourceRouteDelegate.Builder<R>
java.lang.Object
com.inductiveautomation.ignition.gateway.config.DefaultResourceRouteDelegate.Builder<R>
- Enclosing class:
- DefaultResourceRouteDelegate<R>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSearchField
(String fieldName) Adds a field to the searchable fields set.build()
codec
(JsonResourceCodec<R> codec) Sets theJsonResourceCodec
for the route delegate.codec
(UnaryOperator<JsonResourceCodec<R>> codecWrapper) Wraps theJsonResourceCodec
for the route delegate.configSchema
(com.inductiveautomation.ignition.common.gson.JsonObject configSchema) Supply a JSON schema for the configuration of this resource type.configSchema
(Class<?> configClass) Provide the JSON schema for the configuration by reflectively examining the record class.configSchema
(Consumer<SchemaUtil.Builder> builderConsumer) Build a JSON schema for the configuration of this resource type.openApiGroupName
(String openApiGroupName) openApiTagName
(String openApiTagName) readPermission
(PermissionType readPermission) Sets the permission type required to read this resource type.routeFilter
(RouteFilter routeFilter) Sets the route filter.setSearchFields
(Set<String> searchFields) Calling this method will set (and overwrite) the searchable fields set.supportsExtraDataFiles
(boolean supportsExtraDataFiles) Indicates whether this resource expects any "extra" data files beyond "config.json".writePermission
(PermissionType writePermission) Sets the permission type required to write to this resource type.
-
Constructor Details
-
Builder
-
-
Method Details
-
codec
Sets theJsonResourceCodec
for the route delegate. This is optional, and only should be used if you have a custom codec that you want to use for encoding and decoding resources via REST API. Must not be null. -
codec
public DefaultResourceRouteDelegate.Builder<R> codec(UnaryOperator<JsonResourceCodec<R>> codecWrapper) Wraps theJsonResourceCodec
for the route delegate. This is optional, and only should be used if you have a custom codec that you want to use for encoding and decoding resources via REST API. Must not be null.- Parameters:
codecWrapper
- the codec wrapperFunction
whose input is the currently installed codec and the output should be the wrapped codec- Returns:
- this
DefaultResourceRouteDelegate.Builder
instance
-
configSchema
public DefaultResourceRouteDelegate.Builder<R> configSchema(com.inductiveautomation.ignition.common.gson.JsonObject configSchema) Supply a JSON schema for the configuration of this resource type. Use this overload if you have built the schema already. -
configSchema
public DefaultResourceRouteDelegate.Builder<R> configSchema(Consumer<SchemaUtil.Builder> builderConsumer) Build a JSON schema for the configuration of this resource type. Use this overload if you want to build the schema programmatically. -
configSchema
Provide the JSON schema for the configuration by reflectively examining the record class. This is useful when the configuration is a record type. -
supportsExtraDataFiles
public DefaultResourceRouteDelegate.Builder<R> supportsExtraDataFiles(boolean supportsExtraDataFiles) Indicates whether this resource expects any "extra" data files beyond "config.json". Default is false. -
routeFilter
Sets the route filter. Default route filter allows all routes. -
openApiGroupName
-
openApiTagName
-
addField
-
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
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
Sets the permission type required to read this resource type. Default is READ. -
writePermission
Sets the permission type required to write to this resource type. Default is WRITE. -
build
-