org.kuali.rice.krms.impl.repository.mock
Class FunctionRepositoryServiceMockImpl

java.lang.Object
  extended by org.kuali.rice.krms.impl.repository.mock.FunctionRepositoryServiceMockImpl
All Implemented Interfaces:
FunctionRepositoryService

public class FunctionRepositoryServiceMockImpl
extends Object
implements FunctionRepositoryService


Constructor Summary
FunctionRepositoryServiceMockImpl()
           
 
Method Summary
 void clear()
           
 FunctionDefinition getFunction(String functionId)
          Retrieves the function for the given functionId.
 Map<String,FunctionDefinition> getFunctionDefinitionMap()
           
 List<FunctionDefinition> getFunctions(List<String> functionIds)
          Retrieves all of the functions for the given list of functionIds.
 void setFunctionDefinitionMap(Map<String,FunctionDefinition> functionDefinitionMap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionRepositoryServiceMockImpl

public FunctionRepositoryServiceMockImpl()
Method Detail

getFunctionDefinitionMap

public Map<String,FunctionDefinition> getFunctionDefinitionMap()

setFunctionDefinitionMap

public void setFunctionDefinitionMap(Map<String,FunctionDefinition> functionDefinitionMap)

clear

public void clear()

getFunction

public FunctionDefinition getFunction(String functionId)
                               throws RiceIllegalArgumentException
Description copied from interface: FunctionRepositoryService
Retrieves the function for the given functionId. The function can be used when constructing propositions and defines the type of the parameters to the function as well as it's return type.

Specified by:
getFunction in interface FunctionRepositoryService
Parameters:
functionId - the id of the function to retrieve
Returns:
the function definition, or null if no function could be located for the given functionId
Throws:
RiceIllegalArgumentException - if the given functionId is null

getFunctions

public List<FunctionDefinition> getFunctions(List<String> functionIds)
                                      throws RiceIllegalArgumentException
Description copied from interface: FunctionRepositoryService
Retrieves all of the functions for the given list of functionIds. The function can be used when constructing propositions and defines the type of the parameters to the function as well as it's return type.

The list which is returned from this operation may not be the same size as the list which is passed to this method. If a function doesn't exist for a given function id then no result for that id will be returned in the list. As a result of this, the returned list can be empty, but it will never be null.

Specified by:
getFunctions in interface FunctionRepositoryService
Parameters:
functionIds - the list of function ids for which to retrieve the functions
Returns:
the list of functions for the given ids, this list will only contain functions for the ids that were resolved successfully, it will never return null but could return an empty list if no functions could be loaded for the given set of ids
Throws:
RiceIllegalArgumentException - if the given list of functionIds is null


Copyright © 2005-2015 The Kuali Foundation. All Rights Reserved.