Class PerspectiveModule

java.lang.Object
com.inductiveautomation.perspective.common.PerspectiveModule

public class PerspectiveModule extends Object
Contains common configuration and const definitions for things like module ID, and also provides a registry for components.
  • Field Details

    • MODULE_ID

      public static final String MODULE_ID
      See Also:
    • LOG_PREFIX

      public static final String LOG_PREFIX
      See Also:
    • DESIGNER_SESSION_ID_HEADER

      public static final String DESIGNER_SESSION_ID_HEADER
      Header the Gateway reads to associate a request with the shared Designer session.

      A request carrying this header is given SessionScope.Designer, so the Gateway must verify that the value resolves to a session which is genuinely a Designer session and is still valid before honoring it. Any live session id -- including one minted by a Vision client login -- otherwise reaches Designer scope.

      See Also:
    • SESSION_PROPS_SCHEMA

      public static final JsonSchema SESSION_PROPS_SCHEMA
    • VIEW_SCHEMA

      public static final JsonSchema VIEW_SCHEMA
    • META_SCHEMA

      public static final JsonSchema META_SCHEMA
  • Constructor Details

    • PerspectiveModule

      public PerspectiveModule()
  • Method Details

    • getLogger

      public static LoggerEx getLogger(String name)
    • createPerspectiveCompatibleGson

      public static @NonNull com.inductiveautomation.ignition.common.gson.Gson createPerspectiveCompatibleGson()
      Creates a Gson instance with the correct type adapters registered to serialize and deserialize views
    • createPerspectiveCompatibleGson

      public static @NonNull com.inductiveautomation.ignition.common.gson.Gson createPerspectiveCompatibleGson(Consumer<com.inductiveautomation.ignition.common.gson.GsonBuilder> customize)
      Creates a Gson instance with the correct type adapters registered to serialize and deserialize views
    • defaultMetaProps

      public static com.inductiveautomation.ignition.common.gson.JsonObject defaultMetaProps()
      Returns:
      the default object parsed from the common meta-schema resource.
    • defaultViewProps

      public static com.inductiveautomation.ignition.common.gson.JsonObject defaultViewProps()
      Returns:
      the default object parsed from the common view-props-schema resource.
    • defaultSessionProps

      public static com.inductiveautomation.ignition.common.gson.JsonObject defaultSessionProps()
      Returns:
      the default object parsed from the common session-props schema resource.