本文整理汇总了Java中org.kuali.rice.krms.api.repository.term.TermDefinition.getParameters方法的典型用法代码示例。如果您正苦于以下问题:Java TermDefinition.getParameters方法的具体用法?Java TermDefinition.getParameters怎么用?Java TermDefinition.getParameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.krms.api.repository.term.TermDefinition
的用法示例。
在下文中一共展示了TermDefinition.getParameters方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: from
import org.kuali.rice.krms.api.repository.term.TermDefinition; //导入方法依赖的package包/类
/**
* Converts a immutable object to it's mutable bo counterpart
*
* @param im immutable object
* @return the mutable bo
*/
public static TermBo from(TermDefinition im) {
if (im == null) {
return null;
}
TermBo bo = new TermBo();
bo.id = im.getId();
bo.specificationId = im.getSpecification().getId();
bo.description = im.getDescription();
bo.specification = TermSpecificationBo.from(im.getSpecification());
bo.parameters = new ArrayList<TermParameterBo>();
for (TermParameterDefinition parm : im.getParameters()) {
TermParameterBo termParmBo = TermParameterBo.from(parm);
bo.parameters.add(termParmBo);
termParmBo.setTerm(bo);
}
bo.versionNumber = im.getVersionNumber();
return bo;
}
示例2: buildSimplePropositionContextMap
import org.kuali.rice.krms.api.repository.term.TermDefinition; //导入方法依赖的package包/类
protected Map<String, Object> buildSimplePropositionContextMap(PropositionDefinition proposition) {
if (!proposition.getPropositionTypeCode().equals(PropositionType.SIMPLE.getCode())) {
throw new RiceIllegalArgumentException("proposition is not simple " + proposition.getPropositionTypeCode() + " " + proposition.getId() + proposition.getDescription());
}
Map<String, Object> contextMap = new LinkedHashMap<String, Object>();
for (PropositionParameter param : proposition.getParameters()) {
if (param.getParameterType().equals(PropositionParameterType.TERM.getCode())) {
TermDefinition term = param.getTermValue();
if ((term == null) && (StringUtils.isNotBlank(param.getValue()))) {
term = this.termRepositoryService.getTerm(param.getValue());
}
if (term != null) {
for (TermParameterDefinition termParam : term.getParameters()) {
contextMap.put(termParam.getName(), termParam.getValue());
}
} else {
contextMap.put(param.getParameterType(), param.getValue());
}
} else {
contextMap.put(param.getParameterType(), param.getValue());
}
}
return contextMap;
}
示例3: translateTermDefinition
import org.kuali.rice.krms.api.repository.term.TermDefinition; //导入方法依赖的package包/类
protected Term translateTermDefinition(TermDefinition termDefinition) {
if (termDefinition == null) {
throw new RepositoryDataException("Given TermDefinition is null");
}
TermSpecificationDefinition termSpecificationDefinition = termDefinition.getSpecification();
if (termSpecificationDefinition == null) { throw new RepositoryDataException("term with id " + termDefinition.getId() + " has a null specification"); }
List<TermParameterDefinition> params = termDefinition.getParameters();
Map<String,String> paramsMap = new TreeMap<String,String>();
if (!CollectionUtils.isEmpty(params)) for (TermParameterDefinition param : params) {
if (StringUtils.isBlank(param.getName())) {
throw new RepositoryDataException("TermParameterDefinition.name may not be blank");
}
paramsMap.put(param.getName(), param.getValue());
}
return new Term(termSpecificationDefinition.getName(), paramsMap);
}