本文整理了Java中org.springframework.webflow.engine.Flow.getAttributes()
方法的一些代码示例,展示了Flow.getAttributes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.getAttributes()
方法的具体详情如下:
包路径:org.springframework.webflow.engine.Flow
类名称:Flow
方法名:getAttributes
暂无
代码示例来源:origin: org.springframework.webflow/spring-webflow
public boolean inDevelopment() {
return getAttributes().getBoolean("development", false);
}
代码示例来源:origin: org.springframework.webflow/spring-webflow
/**
* Create a new flow with the given id and attributes.
* @param id the flow id
* @param attributes the attributes
* @return the flow
*/
public static Flow create(String id, AttributeMap<?> attributes) {
Flow flow = new Flow(id);
flow.getAttributes().putAll(attributes);
return flow;
}
代码示例来源:origin: spring-projects/spring-webflow
public boolean inDevelopment() {
return getAttributes().getBoolean("development", false);
}
代码示例来源:origin: org.springframework.webflow/org.springframework.webflow
public boolean inDevelopment() {
return getAttributes().getBoolean("development", Boolean.FALSE).booleanValue();
}
代码示例来源:origin: spring-projects/spring-webflow
/**
* Create a new flow with the given id and attributes.
* @param id the flow id
* @param attributes the attributes
* @return the flow
*/
public static Flow create(String id, AttributeMap<?> attributes) {
Flow flow = new Flow(id);
flow.getAttributes().putAll(attributes);
return flow;
}
代码示例来源:origin: org.springframework.webflow/org.springframework.webflow
/**
* Create a new flow with the given id and attributes.
* @param id the flow id
* @param attributes the attributes
* @return the flow
*/
public static Flow create(String id, AttributeMap attributes) {
Flow flow = new Flow(id);
flow.getAttributes().putAll(attributes);
return flow;
}
代码示例来源:origin: spring-projects/spring-webflow
public void testPersistenceContextFlow() {
model.setPersistenceContext(new PersistenceContextModel());
model.setStates(asList(new EndStateModel("end")));
Flow flow = getFlow(model);
assertNotNull(flow.getAttributes().get("persistenceContext"));
assertTrue((Boolean) flow.getAttributes().get("persistenceContext"));
}
代码示例来源:origin: spring-projects/spring-webflow
public void testCustomFlowAttribute() {
AttributeModel attribute1 = new AttributeModel("foo", "bar");
AttributeModel attribute2 = new AttributeModel("number", "1");
attribute2.setType("integer");
model.setAttributes(asList(attribute1, attribute2));
model.setStates(asList(new EndStateModel("end")));
Flow flow = getFlow(model);
assertEquals("bar", flow.getAttributes().get("foo"));
assertEquals(1, flow.getAttributes().get("number"));
}
代码示例来源:origin: spring-projects/spring-webflow
public void testFlowSecured() {
model.setSecured(new SecuredModel("ROLE_USER"));
model.setStates(asList(new EndStateModel("end")));
Flow flow = getFlow(model);
SecurityRule rule = (SecurityRule) flow.getAttributes().get(SecurityRule.SECURITY_ATTRIBUTE_NAME);
assertNotNull(rule);
assertEquals(SecurityRule.COMPARISON_ANY, rule.getComparisonType());
assertEquals(1, rule.getAttributes().size());
assertTrue(rule.getAttributes().contains("ROLE_USER"));
}
代码示例来源:origin: spring-projects/spring-webflow
public void testSessionCreatingWithSecurity() {
SecurityFlowExecutionListener listener = new SecurityFlowExecutionListener();
RequestContext context = new MockRequestContext();
Flow flow = new Flow("flow");
SecurityRule rule = getSecurityRuleAnyAuthorized();
flow.getAttributes().put(SecurityRule.SECURITY_ATTRIBUTE_NAME, rule);
configureSecurityContext();
listener.sessionCreating(context, flow);
}
内容来源于网络,如有侵权,请联系作者删除!