Package org.rapidcontext.core.proc
Class AddOnProcedure
java.lang.Object
org.rapidcontext.core.proc.AddOnProcedure
- All Implemented Interfaces:
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 Summary
-
Constructor Summary
ConstructorDescriptionThe default public constructor required for serialization support. -
Method Summary
Modifier and TypeMethodDescriptionReturns the bindings for this procedure.getData()
Returns the procedure data object.Returns the procedure description.Returns the timestamp for the last modification of this procedure.getName()
Returns the procedure name.getType()
Returns the procedure type name.void
Sets the procedure data object.
-
Field Details
-
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
The default public constructor required for serialization support.- Throws:
ProcedureException
- if the initialization failed
-
-
Method Details
-
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
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
Returns the procedure name. -
getDescription
Returns the procedure description.- Specified by:
getDescription
in interfaceProcedure
- Returns:
- the procedure description
-
getType
Returns the procedure type name.- Returns:
- procedure type name
-
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
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 interfaceProcedure
- Returns:
- the bindings for this procedure
-