net.sf.mmm.util.pojo.path.base
Class DefaultPojoPathFunctionManager

java.lang.Object
  extended by net.sf.mmm.util.component.base.AbstractComponent
      extended by net.sf.mmm.util.pojo.path.base.DefaultPojoPathFunctionManager
All Implemented Interfaces:
PojoPathFunctionManager
Direct Known Subclasses:
PojoPathFunctionManagerImpl

public class DefaultPojoPathFunctionManager
extends AbstractComponent
implements PojoPathFunctionManager

This is the default implementation of the PojoPathFunctionManager.

Since:
1.1.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Field Summary
private  Map<String,PojoPathFunction> functionMap
           
 
Constructor Summary
DefaultPojoPathFunctionManager()
          The constructor.
DefaultPojoPathFunctionManager(Map<String,PojoPathFunction> functionMap)
          The constructor.
 
Method Summary
 PojoPathFunction getFunction(String functionName)
          This method gets a PojoPathFunction by its name.
 PojoPathFunction registerFunction(PojoPathFunction function, String functionName)
          This method registers the given function for the given functionName so it is available via getFunction(String).
 
Methods inherited from class net.sf.mmm.util.component.base.AbstractComponent
doInitialize, doInitialized, getInitializationState, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

functionMap

private final Map<String,PojoPathFunction> functionMap
See Also:
getFunction(String)
Constructor Detail

DefaultPojoPathFunctionManager

public DefaultPojoPathFunctionManager()
The constructor.


DefaultPojoPathFunctionManager

public DefaultPojoPathFunctionManager(Map<String,PojoPathFunction> functionMap)
The constructor.

Parameters:
functionMap - is the underlying Map with the functions.
Method Detail

getFunction

public PojoPathFunction getFunction(String functionName)
This method gets a PojoPathFunction by its name. Therefore the PojoPathFunction instance has to be registered somehow in the implementation of this interface.

Specified by:
getFunction in interface PojoPathFunctionManager
Parameters:
functionName - is the name of the requested PojoPathFunction excluding the prefix.
Returns:
the requested PojoPathFunction or null if no PojoPathFunction is registered for the given functionName.

registerFunction

public PojoPathFunction registerFunction(PojoPathFunction function,
                                         String functionName)
This method registers the given function for the given functionName so it is available via getFunction(String).

Parameters:
function - is the PojoPathFunction to register.
functionName - is the associated name.
Returns:
the PojoPathFunction that was registered before for the given functionName and has now been replaced.
See Also:
getFunction(String)


Copyright © 2001-2010 mmm-Team. All Rights Reserved.