Class Procedure

All Implemented Interfaces:
Procedure
Direct Known Subclasses:
AppListProcedure, ConnectionListProcedure, ConnectionMetricsProcedure, ConnectionValidateProcedure, JsProcedure, PluginInstallProcedure, PluginListProcedure, PluginLoadProcedure, PluginUninstallProcedure, PluginUnloadProcedure, ProcedureCallProcedure, ProcedureDeleteProcedure, ProcedureListProcedure, ProcedureMetricsProcedure, ProcedureReadProcedure, ProcedureTraceProcedure, ProcedureTypesProcedure, ProcedureWriteProcedure, ResetProcedure, SessionAuthenticateProcedure, SessionAuthenticateTokenProcedure, SessionCurrentProcedure, SessionTerminateProcedure, StatusProcedure, StorageCopyProcedure, StorageDeleteProcedure, StorageListProcedure, StorageQueryProcedure, StorageReadProcedure, StorageWriteProcedure, ThreadContextProcedure, ThreadCreateProcedure, ThreadInterruptProcedure, ThreadListProcedure, TypeListProcedure, UserAccessProcedure, UserAuthenticationTokenProcedure, UserChangeProcedure, UserListProcedure, UserPasswordChangeProcedure, UserSearchProcedure, UserSettingsProcedure

public abstract class Procedure extends StorableObject implements Procedure
A server-side function or operation. Procedures may take arguments, modify data and/or return values. They can be invoked either server-side or client-side (via API) if permissions allow. This generic type is used only for direct Java implementations. A number of subtypes allows creating procedures from configurable parameters (e.g. SQL text, HTTP requests, etc) instead, sharing a common reusable Java implementation. When implementing procedures in Java, care must be taken so that all operations are properly checked for security.
Version:
1.0
  • Field Details

    • KEY_DESCRIPTION

      public static final String KEY_DESCRIPTION
      The dictionary key for the description.
      See Also:
    • KEY_ALIAS

      public static final String KEY_ALIAS
      The dictionary key for the optional alias.
      See Also:
    • KEY_DEPRECATED

      public static final String KEY_DEPRECATED
      The dictionary key for the optional deprecation message.
      See Also:
    • KEY_BINDING

      public static final String KEY_BINDING
      The dictionary key for the binding array.
      See Also:
    • PATH

      public static final Path PATH
      The procedure object storage path.
    • ACTIVE_MILLIS

      public static final long ACTIVE_MILLIS
      The default active procedure time (5 minutes).
      See Also:
  • Constructor Details

    • Procedure

      protected Procedure(String id, String type, Dict dict)
      Creates a new procedure from a serialized representation.
      Parameters:
      id - the object identifier
      type - the object type name
      dict - the serialized representation
      See Also:
  • Method Details

    • all

      public static Stream<Procedure> all(Storage storage)
      Returns a stream of all environments found in the storage.
      Parameters:
      storage - the storage to search
      Returns:
      a stream of environment instances found
    • isActive

      protected boolean isActive()
      Checks if this object is in active use. This method will return true if the object was activated during the last 5 minutes.
      Overrides:
      isActive in class StorableObject
      Returns:
      true if the object is considered active, or false otherwise
    • getName

      @Deprecated(forRemoval=true) public String getName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use id() instead.
      Returns the procedure name.
      Specified by:
      getName in interface Procedure
      Returns:
      the procedure name
    • description

      public String description()
      Returns the procedure description.
      Returns:
      the procedure description
    • getDescription

      @Deprecated(forRemoval=true) public String getDescription()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use description() instead.
      Returns the procedure description.
      Specified by:
      getDescription in interface Procedure
      Returns:
      the procedure description
    • alias

      public String alias()
      Returns the optional procedure alias.
      Returns:
      the procedure alias, or null for none
    • deprecated

      public String deprecated()
      Returns the optional deprecation message.
      Returns:
      the deprecation message, or null for none
    • getBindings

      public Bindings getBindings()
      Returns the bindings for this procedure. If this procedure requires any special data, adapter connection or input argument binding, those bindings should be set (but possibly to null or blank values).
      Specified by:
      getBindings in interface Procedure
      Returns:
      the bindings for this procedure