org.springframework.webflow.engine.Flow.getVariables()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.1k)|赞(0)|评价(0)|浏览(138)

本文整理了Java中org.springframework.webflow.engine.Flow.getVariables()方法的一些代码示例,展示了Flow.getVariables()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.getVariables()方法的具体详情如下:
包路径:org.springframework.webflow.engine.Flow
类名称:Flow
方法名:getVariables

Flow.getVariables介绍

[英]Returns the flow variables.
[中]返回流变量。

代码示例

代码示例来源:origin: org.apereo.cas/cas-server-core-webflow-api

/**
 * Create flow variable flow variable.
 *
 * @param flow the flow
 * @param id   the id
 * @param type the type
 * @return the flow variable
 */
public FlowVariable createFlowVariable(final Flow flow, final String id, final Class type) {
  val opt = Arrays.stream(flow.getVariables()).filter(v -> v.getName().equalsIgnoreCase(id)).findFirst();
  if (opt.isPresent()) {
    return opt.get();
  }
  val flowVar = new FlowVariable(id, new BeanFactoryVariableValueFactory(type, applicationContext.getAutowireCapableBeanFactory()));
  flow.addVariable(flowVar);
  return flowVar;
}

代码示例来源:origin: org.apereo.cas/cas-server-support-reports

val vars = Arrays.stream(def.getVariables())
  .map(FlowVariable::getName)
  .collect(Collectors.joining(","));

相关文章