org.kuali.kpme.core.krms.function
Class FunctionTermResolver

java.lang.Object
  extended by org.kuali.kpme.core.krms.function.FunctionTermResolver
All Implemented Interfaces:
org.kuali.rice.krms.api.engine.TermResolver<Object>
Direct Known Subclasses:
JavaFunctionResolver

public abstract class FunctionTermResolver
extends Object
implements org.kuali.rice.krms.api.engine.TermResolver<Object>

Copied from Kuali Coeus.


Constructor Summary
FunctionTermResolver(List<String> orderedInputParams, Set<String> parameterNames, String output)
           
 
Method Summary
protected abstract  Object executeFunction(String serviceName, String methodName, Map<String,Object> resolvedPrereqs, Map<String,String> resolvedParameters)
          This method execute the function/method and return 'true' or 'false'
protected  List<Object> extractParamValues(Map<String,Object> resolvedPrereqs, Map<String,String> resolvedParameters)
           
 int getCost()
           
 org.kuali.rice.krms.api.repository.function.FunctionDefinition getFunctionTerm()
          Gets the functionTerm attribute.
 List<String> getOrderedInputParams()
           
 String getOutput()
          Returns the name of the function needs to be executed as part of the Term
 Set<String> getParameterNames()
           
 Set<String> getPrerequisites()
           
 Object resolve(Map<String,Object> resolvedPrereqs, Map<String,String> parameters)
          This method executes the stored function and returns the result.
 void setFunctionTerm(org.kuali.rice.krms.api.repository.function.FunctionDefinition functionTerm)
          Sets the functionTerm attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionTermResolver

public FunctionTermResolver(List<String> orderedInputParams,
                            Set<String> parameterNames,
                            String output)
Method Detail

getOrderedInputParams

public List<String> getOrderedInputParams()

getPrerequisites

public Set<String> getPrerequisites()
Specified by:
getPrerequisites in interface org.kuali.rice.krms.api.engine.TermResolver<Object>

getOutput

public String getOutput()
Returns the name of the function needs to be executed as part of the Term

Specified by:
getOutput in interface org.kuali.rice.krms.api.engine.TermResolver<Object>
See Also:
TermResolver.getOutput()

getParameterNames

public Set<String> getParameterNames()
Specified by:
getParameterNames in interface org.kuali.rice.krms.api.engine.TermResolver<Object>

getCost

public int getCost()
Specified by:
getCost in interface org.kuali.rice.krms.api.engine.TermResolver<Object>

resolve

public Object resolve(Map<String,Object> resolvedPrereqs,
                      Map<String,String> parameters)
This method executes the stored function and returns the result. Parameters to Stored Function are getting passed through resolvedPrereqs.

Specified by:
resolve in interface org.kuali.rice.krms.api.engine.TermResolver<Object>
See Also:
TermResolver.resolve(java.util.Map, java.util.Map)

executeFunction

protected abstract Object executeFunction(String serviceName,
                                          String methodName,
                                          Map<String,Object> resolvedPrereqs,
                                          Map<String,String> resolvedParameters)
This method execute the function/method and return 'true' or 'false'

Parameters:
resolvedPrereqs -
Returns:

extractParamValues

protected List<Object> extractParamValues(Map<String,Object> resolvedPrereqs,
                                          Map<String,String> resolvedParameters)

getFunctionTerm

public org.kuali.rice.krms.api.repository.function.FunctionDefinition getFunctionTerm()
Gets the functionTerm attribute.

Returns:
Returns the functionTerm.

setFunctionTerm

public void setFunctionTerm(org.kuali.rice.krms.api.repository.function.FunctionDefinition functionTerm)
Sets the functionTerm attribute value.

Parameters:
functionTerm - The functionTerm to set.


Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.