本文整理汇总了Java中org.kuali.rice.krms.api.repository.function.FunctionDefinition类的典型用法代码示例。如果您正苦于以下问题:Java FunctionDefinition类的具体用法?Java FunctionDefinition怎么用?Java FunctionDefinition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FunctionDefinition类属于org.kuali.rice.krms.api.repository.function包,在下文中一共展示了FunctionDefinition类的24个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getOperatorFunctionDefinition
点赞 3
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
/**
* Returns the FunctionDefinition for the custom function the executable portion of this CustomOperator will
* call.
*
* <p>If the FunctionDefinition hasn't been persisted yet, this method will persist it and then return it.</p>
*
* <p>Note that having the KRMS type for this </p>
*
* @return
*/
@Override
public FunctionDefinition getOperatorFunctionDefinition() {
FunctionBoService functionBoService =
(FunctionBoService) GlobalResourceLoader.getService("functionRepositoryService");
KrmsTypeRepositoryService typeRepository = KrmsApiServiceLocator.getKrmsTypeRepositoryService();
KrmsTypeDefinition containsOperatorType = typeRepository.getTypeByName("KR-SAP", "contains operator");
if (containsOperatorType == null) {
throw new IllegalStateException("There must be a persisted KRMS type with namespace 'KR-SAP', "
+ "name 'contains operator', and serviceName 'sampleAppContainsOperatorService'");
}
FunctionDefinition containsFunction = functionBoService.getFunctionByNameAndNamespace("contains", "KR-SAP");
if (containsFunction == null) {
FunctionDefinition.Builder functionBuilder =
FunctionDefinition.Builder.create("KR-SAP", "contains", "java.lang.Boolean", containsOperatorType.getId());
containsFunction = functionBoService.createFunction(functionBuilder.build());
}
return containsFunction;
}
开发者ID:kuali,
项目名称:kc-rice,
代码行数:35,
代码来源:ContainsOperator.java
示例2: getFunctions
点赞 3
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
@Override
public List<FunctionDefinition> getFunctions(List<String> functionIds) {
if (functionIds == null) {
throw new RiceIllegalArgumentException();
}
List<FunctionDefinition> functionDefinitions = new ArrayList<FunctionDefinition>();
for (String functionId : functionIds) {
if (!StringUtils.isBlank(functionId)) {
FunctionDefinition functionDefinition = getFunctionById(functionId);
if (functionDefinition != null) {
functionDefinitions.add(functionDefinition);
}
}
}
return Collections.unmodifiableList(functionDefinitions);
}
开发者ID:kuali,
项目名称:kc-rice,
代码行数:19,
代码来源:FunctionBoServiceImpl.java
示例3: createFunction
点赞 3
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
/**
* This method will create a {@link FunctionDefinition} as described
* by the function passed in.
*
* @see org.kuali.rice.krms.impl.repository.FunctionBoService#createFunction(org.kuali.rice.krms.api.repository.function.FunctionDefinition)
*/
@Override
public FunctionDefinition createFunction(FunctionDefinition function) {
if (function == null) {
throw new IllegalArgumentException("function is null");
}
final String nameKey = function.getName();
final String namespaceKey = function.getNamespace();
final FunctionDefinition existing = getFunctionByNameAndNamespace(nameKey, namespaceKey);
if (existing != null && existing.getName().equals(nameKey) && existing.getNamespace().equals(namespaceKey)) {
throw new IllegalStateException("the function to create already exists: " + function);
}
FunctionBo functionBo = FunctionBo.from(function);
for (FunctionParameterBo param : functionBo.getParameters()) {
param.setFunction(functionBo);
}
functionBo = dataObjectService.save(functionBo, PersistenceOption.FLUSH);
return FunctionBo.to(functionBo);
}
开发者ID:kuali,
项目名称:kc-rice,
代码行数:30,
代码来源:FunctionBoServiceImpl.java
示例4: getFunctionByNameAndNamespace
点赞 3
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
/**
* This overridden method retrieves a function by the given name and namespace.
*
* @see org.kuali.rice.krms.impl.repository.FunctionBoService#getFunctionByNameAndNamespace(java.lang.String,
* java.lang.String)
*/
public FunctionDefinition getFunctionByNameAndNamespace(String name, String namespace) {
if (StringUtils.isBlank(name)) {
throw new IllegalArgumentException("name is null or blank");
}
if (StringUtils.isBlank(namespace)) {
throw new IllegalArgumentException("namespace is null or blank");
}
final Map<String, Object> map = new HashMap<String, Object>();
map.put("name", name);
map.put("namespace", namespace);
QueryByCriteria query = QueryByCriteria.Builder.andAttributes(map).build();
QueryResults<FunctionBo> results = dataObjectService.findMatching(FunctionBo.class, query);
if (results == null || results.getResults().size() == 0) {
// fall through and return null
} else if (results.getResults().size() == 1) {
return FunctionBo.to(results.getResults().get(0));
} else if (results.getResults().size() > 1) {
throw new IllegalStateException("there can be only one FunctionDefinition for a given name and namespace");
}
return null;
}
开发者ID:kuali,
项目名称:kc-rice,
代码行数:31,
代码来源:FunctionBoServiceImpl.java
示例5: processCustomOperators
点赞 3
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
/**
* walk the proposition tree and process any custom operators found, converting them to custom function invocations.
*
* @param propositionBo the root proposition from which to search and convert
*/
private void processCustomOperators(PropositionBo propositionBo) {
if (StringUtils.isBlank(propositionBo.getCompoundOpCode())) {
// if it is a simple proposition with a custom operator
if (!propositionBo.getParameters().isEmpty() && propositionBo.getParameters().get(2).getValue().startsWith(
KrmsImplConstants.CUSTOM_OPERATOR_PREFIX)) {
PropositionParameterBo operatorParam = propositionBo.getParameters().get(2);
CustomOperator customOperator =
KrmsServiceLocatorInternal.getCustomOperatorUiTranslator().getCustomOperator(operatorParam.getValue());
FunctionDefinition operatorFunctionDefinition = customOperator.getOperatorFunctionDefinition();
operatorParam.setParameterType(PropositionParameterType.FUNCTION.getCode());
operatorParam.setValue(operatorFunctionDefinition.getId());
}
} else {
// recurse
for (PropositionBo childProp : propositionBo.getCompoundComponents()) {
processCustomOperators(childProp);
}
}
}
开发者ID:kuali,
项目名称:kc-rice,
代码行数:28,
代码来源:AgendaEditorMaintainable.java
示例6: getFunctions
点赞 3
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
@Override
public List<FunctionDefinition> getFunctions(List<String> functionIds) {
if (functionIds == null) throw new RiceIllegalArgumentException();
List<FunctionDefinition> functionDefinitions = new ArrayList<FunctionDefinition>();
for (String functionId : functionIds){
if (!StringUtils.isBlank(functionId)) {
FunctionDefinition functionDefinition = getFunctionById(functionId);
if (functionDefinition != null) {
functionDefinitions.add(functionDefinition);
}
}
}
return Collections.unmodifiableList(functionDefinitions);
}
开发者ID:aapotts,
项目名称:kuali_rice,
代码行数:17,
代码来源:FunctionBoServiceImpl.java
示例7: createFunction
点赞 3
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
/**
* This method will create a {@link FunctionDefintion} as described
* by the function passed in.
*
* @see org.kuali.rice.krms.impl.repository.FunctionBoService#createFunction(org.kuali.rice.krms.api.repository.function.FunctionDefinition)
*/
@Override
public FunctionDefinition createFunction(FunctionDefinition function) {
if (function == null){
throw new IllegalArgumentException("function is null");
}
final String nameKey = function.getName();
final String namespaceKey = function.getNamespace();
final FunctionDefinition existing = getFunctionByNameAndNamespace(nameKey, namespaceKey);
if (existing != null && existing.getName().equals(nameKey) && existing.getNamespace().equals(namespaceKey)){
throw new IllegalStateException("the function to create already exists: " + function);
}
FunctionBo functionBo = FunctionBo.from(function);
businessObjectService.save(functionBo);
return FunctionBo.to(functionBo);
}
开发者ID:aapotts,
项目名称:kuali_rice,
代码行数:24,
代码来源:FunctionBoServiceImpl.java
示例8: updateFunction
点赞 3
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
/**
* This overridden method updates an existing Function in the repository
*
* @see org.kuali.rice.krms.impl.repository.FunctionBoService#updateFunction(org.kuali.rice.krms.api.repository.function.FunctionDefinition)
*/
@Override
public void updateFunction(FunctionDefinition function) {
if (function == null){
throw new IllegalArgumentException("function is null");
}
final String functionIdKey = function.getId();
final FunctionDefinition existing = getFunctionById(functionIdKey);
if (existing == null) {
throw new IllegalStateException("the function does not exist: " + function);
}
final FunctionDefinition toUpdate;
if (!existing.getId().equals(function.getId())){
final FunctionDefinition.Builder builder = FunctionDefinition.Builder.create(function);
builder.setId(existing.getId());
toUpdate = builder.build();
} else {
toUpdate = function;
}
businessObjectService.save(FunctionBo.from(toUpdate));
}
开发者ID:aapotts,
项目名称:kuali_rice,
代码行数:28,
代码来源:FunctionBoServiceImpl.java
示例9: loadFunction
点赞 2
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
/**
* Loads the Function object that the KRMS engine can execute during rule evaluation
*
* @param functionDefinition {@link FunctionDefinition} to create the {@link Function} from.
* @return
*/
@Override
public Function loadFunction(FunctionDefinition functionDefinition) {
if (!"contains".equals(functionDefinition.getName()) || "KR-SAP".equals(functionDefinition.getNamespace())) {
throw new IllegalArgumentException("oops, you have the wrong type service, I can't load this function");
}
// return our KRMS engine executable operator function:
return new Function() {
@Override
public Object invoke(Object... arguments) {
if (arguments.length != 2) {
throw new IllegalArgumentException("contains operator expects 2 arguments");
}
if (arguments[0] instanceof String) {
if (arguments[1] instanceof String) {
return Boolean.valueOf(((String)arguments[0]).contains((String)arguments[1]));
} else {
throw new IllegalArgumentException("if the first argument is a String, the second argument "
+ "must be as well");
}
} else if (arguments[0] instanceof Collection) {
return Boolean.valueOf(((Collection)arguments[0]).contains(arguments[1]));
}
throw new IllegalArgumentException("argument types must be either (String, String) or (Collection, Object)");
}
};
}
开发者ID:kuali,
项目名称:kc-rice,
代码行数:36,
代码来源:ContainsOperator.java
示例10: createRuleDefinition3
点赞 2
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
protected RuleDefinition createRuleDefinition3(ContextDefinition contextDefinition, String agendaName, String nameSpace) {
FunctionDefinition gcdFunction = functionBoService.getFunctionByNameAndNamespace("gcd",
contextDefinition.getNamespace());
if (null == gcdFunction) {
// better configure a custom fuction for this
// KrmsType for custom function
KrmsTypeDefinition.Builder krmsFunctionTypeDefnBuilder = KrmsTypeDefinition.Builder.create("KrmsTestFunctionType", nameSpace);
krmsFunctionTypeDefnBuilder.setServiceName("testFunctionTypeService");
KrmsTypeDefinition krmsFunctionTypeDefinition = krmsTypeRepository.createKrmsType(krmsFunctionTypeDefnBuilder.build());
FunctionDefinition.Builder functionBuilder =
FunctionDefinition.Builder.create(contextDefinition.getNamespace(), "gcd", Integer.class.getName(), krmsFunctionTypeDefinition.getId());
functionBuilder.getParameters().add(
FunctionParameterDefinition.Builder.create("arg0", Integer.class.getName(), 0));
functionBuilder.getParameters().add(FunctionParameterDefinition.Builder.create("arg1", Integer.class.getName(), 1));
functionBuilder.setReturnType(Integer.class.getName());
gcdFunction = functionBoService.createFunction(functionBuilder.build());
}
PropositionParametersBuilder params = new PropositionParametersBuilder();
// leverage our stack based evaluation in reverse polish notation
params.add("1024", PropositionParameterType.CONSTANT);
params.add("768", PropositionParameterType.CONSTANT);
params.add(gcdFunction.getId(), PropositionParameterType.FUNCTION); // this should evaluate first: gcd(1024, 768)
params.add("256", PropositionParameterType.CONSTANT);
params.add("=", PropositionParameterType.OPERATOR); // this should evaluate second: gcdResult == 256
return createRuleDefinition(nameSpace, agendaName+"::Rule3", contextDefinition, null, params);
}
开发者ID:kuali,
项目名称:kc-rice,
代码行数:36,
代码来源:AbstractAgendaBoTest.java
示例11: getFunction
点赞 2
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
@Override
public FunctionDefinition getFunction(String functionId)
throws RiceIllegalArgumentException {
// GET_BY_ID
if (!this.functionDefinitionMap.containsKey(functionId)) {
throw new RiceIllegalArgumentException(functionId);
}
return this.functionDefinitionMap.get(functionId);
}
开发者ID:kuali,
项目名称:kc-rice,
代码行数:10,
代码来源:FunctionRepositoryServiceMockImpl.java
示例12: getFunctions
点赞 2
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
@Override
public List<FunctionDefinition> getFunctions(List<String> functionIds)
throws RiceIllegalArgumentException {
List<FunctionDefinition> list = new ArrayList<FunctionDefinition> ();
for (String id : functionIds) {
list.add (this.getFunction(id));
}
return list;
}
开发者ID:kuali,
项目名称:kc-rice,
代码行数:10,
代码来源:FunctionRepositoryServiceMockImpl.java
示例13: to
点赞 2
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
/**
* Converts a mutable bo to it's immutable counterpart
*
* @param bo the mutable business object
* @return the immutable object
*/
public static FunctionDefinition to(FunctionBo bo) {
if (bo == null) {
return null;
}
return FunctionDefinition.Builder.create(bo).build();
}
开发者ID:kuali,
项目名称:kc-rice,
代码行数:14,
代码来源:FunctionBo.java
示例14: from
点赞 2
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
/**
* Converts a immutable object to it's mutable bo counterpart
*
* @param im immutable object
* @return the mutable bo
*/
public static FunctionBo from(FunctionDefinition im) {
if (im == null) {
return null;
}
FunctionBo bo = new FunctionBo();
bo.id = im.getId();
bo.namespace = im.getNamespace();
bo.name = im.getName();
bo.description = im.getDescription();
bo.returnType = im.getReturnType();
bo.typeId = im.getTypeId();
bo.active = im.isActive();
bo.setVersionNumber(im.getVersionNumber());
bo.parameters = new ArrayList<FunctionParameterBo>();
for (FunctionParameterDefinition parm : im.getParameters()) {
FunctionParameterBo functionParameterBo = FunctionParameterBo.from(parm);
functionParameterBo.setFunction(bo);
bo.parameters.add(functionParameterBo);
}
bo.categories = new ArrayList<CategoryBo>();
for (CategoryDefinition category : im.getCategories()) {
bo.categories.add(CategoryBo.from(category));
}
bo.setVersionNumber(im.getVersionNumber());
return bo;
}
开发者ID:kuali,
项目名称:kc-rice,
代码行数:38,
代码来源:FunctionBo.java
示例15: updateFunction
点赞 2
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
/**
* This overridden method updates an existing Function in the repository
*
* @see org.kuali.rice.krms.impl.repository.FunctionBoService#updateFunction(org.kuali.rice.krms.api.repository.function.FunctionDefinition)
*/
@Override
public FunctionDefinition updateFunction(FunctionDefinition function) {
if (function == null) {
throw new IllegalArgumentException("function is null");
}
final String functionIdKey = function.getId();
final FunctionDefinition existing = getFunctionById(functionIdKey);
if (existing == null) {
throw new IllegalStateException("the function does not exist: " + function);
}
final FunctionDefinition toUpdate;
if (!existing.getId().equals(function.getId())) {
final FunctionDefinition.Builder builder = FunctionDefinition.Builder.create(function);
builder.setId(existing.getId());
toUpdate = builder.build();
} else {
toUpdate = function;
}
return FunctionBo.to(dataObjectService.save(FunctionBo.from(toUpdate), PersistenceOption.FLUSH));
// TODO: Do we need to return the updated FunctionDefinition?
}
开发者ID:kuali,
项目名称:kc-rice,
代码行数:32,
代码来源:FunctionBoServiceImpl.java
示例16: getFunctionById
点赞 2
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
/**
* This overridden method retrieves a function by the given function id.
*
* @see org.kuali.rice.krms.impl.repository.FunctionBoService#getFunctionById(java.lang.String)
*/
@Override
public FunctionDefinition getFunctionById(String functionId) {
if (StringUtils.isBlank(functionId)) {
throw new RiceIllegalArgumentException("functionId is null or blank");
}
FunctionBo functionBo = dataObjectService.find(FunctionBo.class, functionId);
return FunctionBo.to(functionBo);
}
开发者ID:kuali,
项目名称:kc-rice,
代码行数:16,
代码来源:FunctionBoServiceImpl.java
示例17: getFunctionsByNamespace
点赞 2
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
/**
* Gets all of the {@link FunctionDefinition}s within the given namespace
*
* @param namespace the namespace in which to get the functions
* @return the list of function definitions, or if none are found, an empty list
*/
public List<FunctionDefinition> getFunctionsByNamespace(String namespace) {
if (StringUtils.isBlank(namespace)) {
throw new IllegalArgumentException("namespace is null or blank");
}
QueryByCriteria criteria = QueryByCriteria.Builder.forAttribute("namespace", namespace).build();
QueryResults<FunctionBo> queryResults = dataObjectService.findMatching(FunctionBo.class, criteria);
List<FunctionBo> functionBos = queryResults.getResults();
return convertFunctionBosToImmutables(functionBos);
}
开发者ID:kuali,
项目名称:kc-rice,
代码行数:18,
代码来源:FunctionBoServiceImpl.java
示例18: convertFunctionBosToImmutables
点赞 2
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
/**
* Converts a Collection of FunctionBos to an Unmodifiable List of Agendas
*
* @param functionBos a mutable List of FunctionBos to made completely immutable.
* @return An unmodifiable List of FunctionDefinitions
*/
private List<FunctionDefinition> convertFunctionBosToImmutables(final Collection<FunctionBo> functionBos) {
if (CollectionUtils.isEmpty(functionBos)) {
return Collections.emptyList();
}
return Collections.unmodifiableList(ModelObjectUtils.transform(functionBos, toFunctionDefinition));
}
开发者ID:kuali,
项目名称:kc-rice,
代码行数:13,
代码来源:FunctionBoServiceImpl.java
示例19: getFunctionParameterTypes
点赞 2
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
private String[] getFunctionParameterTypes(FunctionDefinition functionDefinition) {
String [] argumentTypes = null;
List<FunctionParameterDefinition> functionParameters = functionDefinition.getParameters();
if (!CollectionUtils.isEmpty(functionParameters)) {
argumentTypes = new String[functionParameters.size()];
int argTypesIndex = 0;
for (FunctionParameterDefinition functionParameter : functionParameters) {
argumentTypes[argTypesIndex] = functionParameter.getParameterType();
argTypesIndex += 1;
}
}
return argumentTypes;
}
开发者ID:kuali,
项目名称:kc-rice,
代码行数:15,
代码来源:SimplePropositionTypeService.java
示例20: getFunctionTypeService
点赞 2
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
@Override
public FunctionTypeService getFunctionTypeService(FunctionDefinition functionDefinition) {
if (functionDefinition == null) {
throw new IllegalArgumentException("functionDefinition was null");
}
KrmsTypeDefinition typeDefinition = getTypeDefinition(functionDefinition.getTypeId());
return resolveTypeService(typeDefinition, FunctionTypeService.class);
}
开发者ID:kuali,
项目名称:kc-rice,
代码行数:9,
代码来源:KrmsTypeResolverImpl.java
示例21: loadFunction
点赞 2
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
/**
* Returns the instance of ISBNFunction or PatronMembershipExpiration based on function definition
* @param functionDefinition
* @return Function(isbnFunction/patronMembershipExpiration).
*/
@Override
public Function loadFunction(FunctionDefinition functionDefinition) {
if (functionDefinition.getName().equals(OLEConstants.ISBN_FUNCTION_DEF_NAME)) {
return getISBNFunction();
} else if(functionDefinition.getName().equals(OLEConstants.ISSN_FUNCTION_DEF_NAME)) {
return getISSNFunction();
} else if(functionDefinition.getName().equals(OLEConstants.OCLC_FUNCTION_DEF_NAME)) {
return getOCLCFunction();
} else if (functionDefinition.getName().equals(OLEConstants.OLE_CURRENT_DATE_FUNCTION)) {
return getOleCurrentDateComparison();
} else if(functionDefinition.getName().equals(OLEConstants.CHECK_DIGIT_ROUTINE)) {
return getCheckDigitRoutine();
} else if(functionDefinition.getName().equals(OLEConstants.LOCATION_FUNCTION_DEF_NAME)){
return getLocationFunction();
} else if(functionDefinition.getName().equals(OLEConstants.ITEM_BARCODE_FUNCTION_DEF_NAME)) {
return getItemBarcodeFunction();
}
else if(functionDefinition.getName().equals(OLEConstants.VENDOR_LINEITEM_REF_NUM_FUNCTION_DEF_NAME)){
return getVendorLineItemReferenceFunction();
}
else if(functionDefinition.getName().equals(OLEConstants.OLE_CONTAINS_FUNCTION)){
return getContainsComparison();
} else if(functionDefinition.getName().equals(OLEConstants.OLE_CIRC_POLICY_FOUND_FUNCTION)) {
return new CirculationPolicyFoundFunction();
}
else if(functionDefinition.getName().equals(OLEConstants.OLE_RENEWAL_DATE_FUNCTION)) {
return new OleRenewalDateComparison();
}
throw new IllegalArgumentException("Failed to load function for the given definition: " + functionDefinition.getName());
}
开发者ID:VU-libtech,
项目名称:OLE-INST,
代码行数:36,
代码来源:FunctionLoader.java
示例22: loadFunction
点赞 2
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
@Override
public Function loadFunction(FunctionDefinition functionDefinition) {
if (functionDefinition.getName().equals(OLEConstants.ISBN_FUNCTION_DEF_NAME)) {
return getISBNFunction();
} else if(functionDefinition.getName().equals("issnFunction")) {
return getISSNFunction();
} else if(functionDefinition.getName().equals("oclcFunction")) {
return getOCLCFunction();
} else if(functionDefinition.getName().equals("locationFunction")){
return getLocationFunction();
}
throw new IllegalArgumentException("Failed to load function for the given definition: " + functionDefinition);
}
开发者ID:VU-libtech,
项目名称:OLE-INST,
代码行数:15,
代码来源:MockFunctionLoader.java
示例23: loadTermResolver
点赞 2
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
@Override
public TermResolver<?> loadTermResolver(TermResolverDefinition termResolverDefinition) {
String functionId = termResolverDefinition.getOutput().getName();
FunctionRepositoryService functionRepositoryService = HrServiceLocator.getService("functionRepositoryService");
FunctionDefinition functionTerm = functionRepositoryService.getFunction(functionId);
if(functionTerm==null){
throw new RuntimeException("Not able to find Term for function : "+functionId);
}
List<String> params = getFunctionParameters(functionTerm);
Set<String> paramNames = termResolverDefinition.getParameterNames();
return createFunctionResolver(params,paramNames,functionId,functionTerm);
}
开发者ID:kuali-mirror,
项目名称:kpme,
代码行数:13,
代码来源:FunctionTermResolverTypeServiceBase.java
示例24: getFunctionParameters
点赞 2
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; //导入依赖的package包/类
private List<String> getFunctionParameters(FunctionDefinition functionTerm) {
List<FunctionParameterDefinition> functionParams = functionTerm.getParameters();
List<FunctionParameterDefinition> modifiableParams = new ArrayList<FunctionParameterDefinition>(functionParams);
Collections.sort(modifiableParams, new FunctionParamComparator());
List<String> params = new ArrayList<String>();
for (FunctionParameterDefinition termResolverFunctionParamDefinition : modifiableParams) {
params.add(termResolverFunctionParamDefinition.getName());
}
return params;
}
开发者ID:kuali-mirror,
项目名称:kpme,
代码行数:11,
代码来源:FunctionTermResolverTypeServiceBase.java