当前位置: 首页>>代码示例>>Java>>正文


Java AttributeMap类代码示例

本文整理汇总了Java中org.springframework.webflow.core.collection.AttributeMap的典型用法代码示例。如果您正苦于以下问题:Java AttributeMap类的具体用法?Java AttributeMap怎么用?Java AttributeMap使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AttributeMap类属于org.springframework.webflow.core.collection包,在下文中一共展示了AttributeMap类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: sessionEnded

import org.springframework.webflow.core.collection.AttributeMap; //导入依赖的package包/类
@Override
public void sessionEnded(final RequestContext context, final FlowSession session, final String outcome,
                         final AttributeMap output) {

    if ( session.isRoot() ) {
        final HttpServletRequest request = WebUtils.getHttpServletRequest(context);
        // get session but don't create it if it doesn't already exist
        final HttpSession webSession = request.getSession(false);

        if (webSession != null) {
            LOGGER.debug("Terminate web session {} in {} seconds", webSession.getId(), this.timeToDieInSeconds);
            // set the web session to die in timeToDieInSeconds
            webSession.setMaxInactiveInterval(this.timeToDieInSeconds);
        }
    }
}
 
开发者ID:luotuo,项目名称:cas4.0.x-server-wechat,代码行数:17,代码来源:TerminateWebSessionListener.java

示例2: validateEventIdForMatchingTransitionInContext

import org.springframework.webflow.core.collection.AttributeMap; //导入依赖的package包/类
/**
 * Validate event for transition.
 *
 * @param eventId    the event id
 * @param context    the context
 * @param attributes the attributes
 * @return the event
 */
protected Event validateEventIdForMatchingTransitionInContext(final String eventId, final RequestContext context, final Map<String, Object> attributes) {
    try {
        final AttributeMap<Object> attributesMap = new LocalAttributeMap<>(attributes);
        final Event event = new Event(this, eventId, attributesMap);

        LOGGER.debug("Resulting event id is [{}]. Locating transitions in the context for that event id...", event.getId());

        final TransitionDefinition def = context.getMatchingTransition(event.getId());
        if (def == null) {
            LOGGER.warn("Transition definition cannot be found for event [{}]", event.getId());
            throw new AuthenticationException();
        }
        LOGGER.debug("Found matching transition [{}] with target [{}] for event [{}] with attributes [{}].",
                def.getId(), def.getTargetStateId(), event.getId(), event.getAttributes());
        return event;
    } catch (final Exception e) {
        throw Throwables.propagate(e);
    }
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:28,代码来源:AbstractCasWebflowEventResolver.java

示例3: testBookHotel

import org.springframework.webflow.core.collection.AttributeMap; //导入依赖的package包/类
public void testBookHotel() {
setCurrentState("reviewHotel");

Hotel hotel = new Hotel();
hotel.setId(1L);
hotel.setName("Jameson Inn");
getFlowScope().put("hotel", hotel);

Flow mockBookingFlow = new Flow("booking");
mockBookingFlow.setInputMapper(new Mapper() {
    public MappingResults map(Object source, Object target) {
	assertEquals(new Long(1), ((AttributeMap) source).get("hotelId"));
	return null;
    }
});
new EndState(mockBookingFlow, "bookingConfirmed");
getFlowDefinitionRegistry().registerFlowDefinition(mockBookingFlow);

MockExternalContext context = new MockExternalContext();
context.setEventId("book");
resumeFlow(context);

assertFlowExecutionEnded();
assertFlowExecutionOutcomeEquals("finish");
   }
 
开发者ID:websphere,项目名称:SpringPrimeFacesShowcase,代码行数:26,代码来源:MainFlowExecutionTests.java

示例4: createMockAddRoleSubflow

import org.springframework.webflow.core.collection.AttributeMap; //导入依赖的package包/类
public Flow createMockAddRoleSubflow() {
    Flow mockAddRoleFlow = new Flow("add-role");
    mockAddRoleFlow.setInputMapper(new Mapper() {
        public MappingResults map(Object source, Object target) {
            assertNotNull(((AttributeMap) source).get("sorPerson"));
            return null;
        }
    });
    new EndState(mockAddRoleFlow, "roleWasAdded");
    return mockAddRoleFlow;
}
 
开发者ID:Jasig,项目名称:openregistry,代码行数:12,代码来源:AddSoRPersonFlowTests.java

示例5: doExecute

import org.springframework.webflow.core.collection.AttributeMap; //导入依赖的package包/类
@Override
protected Event doExecute(final RequestContext context) {
    final FlowSession session = context.getFlowExecutionContext().getActiveSession();
    LOGGER.debug("Authentication has entered the flow [{}] executing state [{}",
            context.getActiveFlow().getId(), session.getState().getId());
    final Credential creds = WebUtils.getCredential(context);
    final String id = creds != null ? creds.getId() : null;

    final Credential mfaCreds = createCredentials(context, creds, id);
    final AttributeMap map = new LocalAttributeMap(ATTRIBUTE_ID_MFA_CREDENTIALS, mfaCreds);
    return new Event(this, EVENT_ID_SUCCESS, map);
}
 
开发者ID:Unicon,项目名称:cas-mfa,代码行数:13,代码来源:GenerateMultiFactorCredentialsAction.java

示例6: sessionEnded

import org.springframework.webflow.core.collection.AttributeMap; //导入依赖的package包/类
public void sessionEnded(RequestContext context, FlowSession session, String outcome, AttributeMap output) {
    if (isParentPersistenceContext(session)) {
        if (!isPersistenceContext(session.getDefinition())) {
            bind(getHibernateSession(session.getParent()));
        }
    }
}
 
开发者ID:OpenHDS,项目名称:openhds-server,代码行数:8,代码来源:Hibernate4FlowExecutionListener.java

示例7: createFlowDefinitionUrl

import org.springframework.webflow.core.collection.AttributeMap; //导入依赖的package包/类
@Override
public String createFlowDefinitionUrl(final String flowId, final AttributeMap input, final HttpServletRequest request) {
    return request.getRequestURI()
        + (request.getQueryString() != null ? '?'
        + request.getQueryString() : "");
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:7,代码来源:CasDefaultFlowUrlHandler.java

示例8: createFlowDefinitionUrl

import org.springframework.webflow.core.collection.AttributeMap; //导入依赖的package包/类
@Override
public String createFlowDefinitionUrl(final String flowId, final AttributeMap input, final HttpServletRequest request) {
    return request.getRequestURI()
        + (request.getQueryString() != null ? '?'
        + request.getQueryString() : StringUtils.EMPTY);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:7,代码来源:CasDefaultFlowUrlHandler.java

示例9: createFlowDefinitionUrl

import org.springframework.webflow.core.collection.AttributeMap; //导入依赖的package包/类
@Override
public String createFlowDefinitionUrl(final String flowId, final AttributeMap input, final HttpServletRequest request) {
    return request.getRequestURI()
        + (request.getQueryString() != null ? "?"
        + request.getQueryString() : "");
}
 
开发者ID:luotuo,项目名称:cas4.0.x-server-wechat,代码行数:7,代码来源:CasDefaultFlowUrlHandler.java

示例10: getAttributes

import org.springframework.webflow.core.collection.AttributeMap; //导入依赖的package包/类
public AttributeMap getAttributes() {
    return attributes;
}
 
开发者ID:e-gov,项目名称:TARA-Server,代码行数:4,代码来源:TaraCredential.java


注:本文中的org.springframework.webflow.core.collection.AttributeMap类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。