org.mmbase.util.functions |
org.mmbase.util.functions - The MMBase 'function framework'.
The function framework is all about the creation of {@link org.mmbase.util.functions.Function} instances, from which
then, subsequently, function values can be acquired. To do that you need to supply the
{@link org.mmbase.util.functions.Parameters} to the function.
Functions come in several different variants. There are completely stand alone functions,
e.g. {@link org.mmbase.util.functions.Functions} (of which a limited number of instances
can exists), but they can also be associated with some object (in OO speak: they mimic
instance member functions of that object then). {@link
org.mmbase.util.functions.NodeFunction} Function objects can e.g. be associated with {@link
org.mmbase.bridge.Node} objects. Such function objects can exists very many (for every
possible node, for every function on it, there can be a Function object). Other object
instance related functions may be associated with Modules and NodeManager.
How to use functions
Taglib users would use the function tags. Those are documented in the taglib reference
documentation (and a bit of small example code can be found in javadoc of {@link
org.mmbase.util.functions.ExampleBuilder}). More taglib examples for functions can be found in
/mmexamples/taglib/functions.jsp of the distro.
A programmer needs to know several things.
-
Functions are basically bridge things. So nodes are bridge Nodes.
-
FunctionProviders have {@link org.mmbase.util.functions.FunctionProvider#addFunction(Function)}
-
{@link org.mmbase.util.functions.AbstractFunction} is available to quickly define a function.
-
{@link org.mmbase.util.functions.NodeFunction} is available to quickly define a function on a Node.
-
An example of a node and builder function implementation can be found in {@link org.mmbase.util.functions.ExampleBuilder}.
-
You can also add functions to a builder in the builder XML. E.g. based on a method in another class, or other FunctionProvider.
@since MMBase-1.7
|
Java Source File Name | Type | Comment |
AbstractFunction.java | Class | An abstract representation of a piece of functionality (a 'function'). |
AutodefiningParameters.java | Class | If there is no Parameter definition array available you could try it with this specialization, which does not need one.
You loose al checking on type and availability. |
BeanFunction.java | Class | One or more functions based on a Java-bean. |
BeanFunctionProvider.java | Class | |
ClassFunctionProvider.java | Class | Maintains all methods of a certain class as function object (as long as they have unique names). |
CombinedFunction.java | Class | A combined function combines other function object. |
DescribedFunctionProvider.java | Class | A described function provider maintains a set of
Function objects, and also contains functionality to add
gui information to the provider itself. |
ExampleBean.java | Class | A bean can be accessed through the function framework. |
ExampleBuilder.java | Class | Example builder implementation implementing functions. |
Function.java | Interface | A representation of a piece of functionality (a 'function'). |
FunctionFactory.java | Class | The FunctionFactory instanciates
Function objects. |
FunctionProvider.java | Class | A function provider maintains a set of
Function objects. |
Functions.java | Class | This class defines static methods for defining Function and Parameters objects. |
FunctionSet.java | Class | The implementation of one set ('namespace') of functions. |
FunctionSets.java | Class | A utility class for maintaining and querying functionsets. |
GuiFunction.java | Class | |
IndexFunction.java | Class | The index node functions can be assigned to nodes which are connected by an 'index' relation. |
MethodFunction.java | Class | A function based on an abritrary method. |
Name.java | Annotation | The name of a parameter as a annotation interface. |
NodeFunction.java | Class | A NodeFunction represents a function on a node instances of this builder. |
Parameter.java | Class | Each (function) argument is specified by a Parameter object.
A Parameter contains a name and type (it does not contain a value). |
Parameters.java | Class | This class implemements the Parameters interface.
It provides a convenient way to create a List that allows the use of 'named parameters'.
This List is therefore backed by a HashMap, but it behaves as a list. |
PatternNodeFunctionProvider.java | Class | This Function provider creates function objects , which can create a String function based on a
pattern. |
Required.java | Annotation | |
ReturnType.java | Class | Description of the return type of certain function. |
SetFunction.java | Class | A SetFunction is a
Function which wraps precisely one method of a class. |
Utils.java | Class | Several utility methods. |
WrappedFunction.java | Class | A wrapped function is a base class for function objects based on an other function object. |