Interface ResourceRouteDelegate<R>
- All Known Implementing Classes:
DefaultResourceRouteDelegate
public interface ResourceRouteDelegate<R>
Contains various meta information used by the system that automatically creates routes for a resource type.
-
Method Summary
Modifier and TypeMethodDescriptionfindFieldValue
(R resource, String field) Attempts to find the value of a named field for a resource instance.getCodec()
Get theJsonResourceCodec
used by the automatically created resource type routes to encode and decode resources of this type.default com.inductiveautomation.ignition.common.gson.JsonObject
default PermissionType
default RouteFilter
default PermissionType
default boolean
Indicates whether this resource expects any "extra" data files beyond "config.json".
-
Method Details
-
getRouteFilter
- Returns:
- a route filter used to decide which routes to expose for this resource type. Default is to expose all routes.
-
supportsExtraDataFiles
default boolean supportsExtraDataFiles()Indicates whether this resource expects any "extra" data files beyond "config.json". Used to simplify the route structure created for this resource.- Returns:
- true if this resource type supports extra data files. Default is false.
-
getOpenApiGroupName
-
getOpenApiTagName
-
getConfigSchema
default com.inductiveautomation.ignition.common.gson.JsonObject getConfigSchema() -
getReadPermission
- Returns:
- the permission type required to read this resource type. Default is READ.
-
getWritePermission
- Returns:
- the permission type required to write to this resource type. Default is WRITE.
-
findFieldValue
Attempts to find the value of a named field for a resource instance. Used by the route system for filtering and sorting. Default implementation looks for top-level keys in the configuration JSON object. -
getSearchFields
- Returns:
- the set of fields that can be searched on for this resource type. See
RouteGroup.ListRouteMounter.searchFields(Set)
-
getCodec
JsonResourceCodec<R> getCodec()Get theJsonResourceCodec
used by the automatically created resource type routes to encode and decode resources of this type.- Returns:
- The
JsonResourceCodec
that can be used to encode and decode resources of this type between their serializedResource
form, and the configuration object form represented by<R>
-