Interface FunctionDefinitionContract
- All Superinterfaces:
Identifiable,Inactivatable,Versioned
- All Known Implementing Classes:
FunctionDefinition,FunctionDefinition.Builder
Defines the contract for a function definition. A function definition can be
defined by clients integrating with KRMS in order to implement custom logic
which they may require as part of rule execution and evaluation. These can
then be used in simple propositions.
The function definition itself defines various metadata about the function
including it's name, return type, and expected parameter types. The actual
implementation of the function is retrieved through the type defined by
getTypeId().
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Method Summary
Modifier and TypeMethodDescriptionList<? extends CategoryDefinitionContract> Returns an ordered list of the categories which this function definition requires.Returns the description of this function definition.getName()Returns the name of this function definition.Returns the namespace code of this function definition.List<? extends FunctionParameterDefinitionContract> Returns an ordered, immutable list of the parameters which this function definition requires.Returns the type of the return value of the function defined by this function definition.Returns the id of theKrmsTypeDefinitionwhich defines the actual implementation of this function such that it can be loaded into the engine and executed.Methods inherited from interface org.kuali.rice.core.api.mo.common.Identifiable
getIdMethods inherited from interface org.kuali.rice.core.api.mo.common.active.Inactivatable
isActiveMethods inherited from interface org.kuali.rice.core.api.mo.common.Versioned
getVersionNumber
-
Method Details
-
getNamespace
String getNamespace()Returns the namespace code of this function definition. All functions have a namespace and this value can never be null or blank. The combination of namespace plus name must be unique within the entire repository of functions.- Returns:
- the namespace code of this function definition
-
getName
String getName()Returns the name of this function definition. All functions have a name and this value can never be null or blank. The combination of namespace plus name must be unique within the entire repository of functions.- Returns:
- the name of this function definition
-
getDescription
String getDescription()Returns the description of this function definition. The description is intended to provide more information about a function and it's appropriate usage. The description is optional.- Returns:
- the description of this function definition
-
getReturnType
String getReturnType()Returns the type of the return value of the function defined by this function definition. This can be one of a set of "built-in" data types or a custom data type represented as a fully qualified java class name. All functions must have a return type so this method should never return null or blank.- Returns:
- the return type of this function definition
-
getTypeId
String getTypeId()Returns the id of theKrmsTypeDefinitionwhich defines the actual implementation of this function such that it can be loaded into the engine and executed.- Returns:
- the type id of this function definition
-
getParameters
List<? extends FunctionParameterDefinitionContract> getParameters()Returns an ordered, immutable list of the parameters which this function definition requires. This list can be empty (in the case of a function which has no arguments) but will never be null.- Returns:
- the list of parameters for this function definition
-
getCategories
List<? extends CategoryDefinitionContract> getCategories()Returns an ordered list of the categories which this function definition requires. This list can be empty (in the case of a function which has no arguments) but will never be null.- Returns:
- the list of categories for this function definition
-