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 Details

    • getRouteFilter

      default RouteFilter 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

      Optional<String> getOpenApiGroupName()
    • getOpenApiTagName

      Optional<String> getOpenApiTagName()
    • getConfigSchema

      default com.inductiveautomation.ignition.common.gson.JsonObject getConfigSchema()
    • getReadPermission

      default PermissionType getReadPermission()
      Returns:
      the permission type required to read this resource type. Default is READ.
    • getWritePermission

      default PermissionType getWritePermission()
      Returns:
      the permission type required to write to this resource type. Default is WRITE.
    • findFieldValue

      Optional<Object> findFieldValue(R resource, String field)
      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

      Set<String> 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 the JsonResourceCodec 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 serialized Resource form, and the configuration object form represented by <R>