Class AddOnProcedure

java.lang.Object
org.rapidcontext.core.proc.AddOnProcedure
All Implemented Interfaces:
Procedure

public abstract class AddOnProcedure extends Object implements Procedure
An add-on procedure base class. All procedures that are not built-in must extend this base class, since it serves as a marker for standard security, modification and serialization support. It also provides default implementations for some of the methods in the procedure interface. Subclasses to this class should meet the following requirements:
  • The class must have a public constructor taking no arguments.
  • The constructor should only throw ProcedureException:s.
  • A unique procedure type name must be registered for the procedure class. See Library.registerProcedureType().
  • All configurable aspects of the procedure must be stored as string values in the default procedure bindings. This is the only procedure data handled in the serialization process.
  • The procedure should preferably not manage connections to other systems by itself when called. A better model is to use declared adapter connection pool names, which is handled transparently by the framework.
Version:
1.0
  • Field Details

    • defaults

      protected Bindings defaults
      The default procedure bindings. These are normally modified and thereafter sealed by the subclass constructors. The procedure bindings returned will always inherit the default bindings.
  • Constructor Details

    • AddOnProcedure

      public AddOnProcedure() throws ProcedureException
      The default public constructor required for serialization support.
      Throws:
      ProcedureException - if the initialization failed
  • Method Details

    • getData

      public Dict getData()
      Returns the procedure data object. This object contains all the required procedure configuration data and is used when serializing the procedure.
      Returns:
      the procedure data object
    • setData

      public void setData(Dict data)
      Sets the procedure data object. This method will completely reset this procedure to whatever the contents of the data object is. It is called when procedures are unserialized or changed due to user action.
      Parameters:
      data - the procedure data object
    • getName

      public String getName()
      Returns the procedure name.
      Specified by:
      getName in interface Procedure
      Returns:
      the procedure name
    • getDescription

      public String getDescription()
      Returns the procedure description.
      Specified by:
      getDescription in interface Procedure
      Returns:
      the procedure description
    • getType

      public String getType()
      Returns the procedure type name.
      Returns:
      procedure type name
    • getLastModified

      public Date getLastModified()
      Returns the timestamp for the last modification of this procedure. Note that this will be reset to the current system time whenever a change is made to the procedure, such as when initially created or similar.
      Returns:
      the timestamp for the last modification
    • 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