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


Java LastaWebKey类代码示例

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


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

示例1: verifyToken

import org.lastaflute.web.LastaWebKey; //导入依赖的package包/类
@Override
public void verifyToken() {
    requestManager.getHeader(getTokenHeaderName()).ifPresent(headerToken -> {
        sessionManager.getAttribute(LastaWebKey.CSRF_TOKEN_KEY, String.class).ifPresent(savedToken -> {
            if (!headerToken.equals(savedToken)) {
                throwCsrfHeaderSavedTokenNotMatchedException(headerToken, savedToken);
            }
        }).orElse(() -> {
            throwCsrfHeaderSavedTokenNotMatchedException(headerToken, null);
        });
    }).orElse(() -> {
        throwCsrfHeaderNotFoundException();
    });
}
 
开发者ID:lastaflute,项目名称:lastaflute,代码行数:15,代码来源:SimpleCsrfManager.java

示例2: doPrepare

import org.lastaflute.web.LastaWebKey; //导入依赖的package包/类
protected static InOutLogKeeper doPrepare(RequestManager requestManager) {
    final String key = LastaWebKey.INOUT_LOGGING_KEY;
    final OptionalThing<NonShowAttribute> optAttr = requestManager.getAttribute(key, NonShowAttribute.class);
    if (optAttr.isPresent()) {
        final NonShowAttribute attr = optAttr.get();
        return (InOutLogKeeper) attr.getAttribute();
    } else {
        final InOutLogKeeper keeper = new InOutLogKeeper();
        keeper.acceptOption(requestManager.getActionAdjustmentProvider().adjustInOutLogging()); // null allowed
        requestManager.setAttribute(key, new NonShowAttribute(keeper));
        return keeper;
    }
}
 
开发者ID:lastaflute,项目名称:lastaflute,代码行数:14,代码来源:InOutLogKeeper.java

示例3: setupPushedActionForm

import org.lastaflute.web.LastaWebKey; //导入依赖的package包/类
protected void setupPushedActionForm(HtmlResponse response) {
    response.getPushedFormInfo().ifPresent(formInfo -> {
        final String formKey = LastaWebKey.PUSHED_ACTION_FORM_KEY;
        VirtualForm form = createPushedActionForm(formInfo, formKey);
        runtime.manageActionForm(OptionalThing.of(form)); // to export properties to request attribute
        requestManager.setAttribute(formKey, form);
    });
}
 
开发者ID:lastaflute,项目名称:lastaflute,代码行数:9,代码来源:ActionResponseReflector.java

示例4: prepareTransactionMemoriesIfExists

import org.lastaflute.web.LastaWebKey; //导入依赖的package包/类
protected void prepareTransactionMemoriesIfExists() {
    final SavedTransactionMemories memories = ThreadCacheContext.findTransactionMemories();
    if (memories != null) {
        final List<TransactionMemoriesProvider> providerList = memories.getOrderedProviderList();
        final StringBuilder sb = new StringBuilder();
        for (TransactionMemoriesProvider provider : providerList) {
            provider.provide().ifPresent(result -> sb.append("\n*").append(result));
        }
        final WholeShowAttribute attribute = new WholeShowAttribute(sb.toString().trim());
        requestManager.setAttribute(LastaWebKey.DBFLUTE_TRANSACTION_MEMORIES_KEY, attribute);
    }
}
 
开发者ID:lastaflute,项目名称:lastaflute,代码行数:13,代码来源:GodHandableAction.java

示例5: getReqeustUserLocaleKey

import org.lastaflute.web.LastaWebKey; //导入依赖的package包/类
protected String getReqeustUserLocaleKey() {
    return LastaWebKey.USER_LOCALE_KEY;
}
 
开发者ID:lastaflute,项目名称:lastaflute,代码行数:4,代码来源:SimpleRequestManager.java

示例6: getSessionUserLocaleKey

import org.lastaflute.web.LastaWebKey; //导入依赖的package包/类
protected String getSessionUserLocaleKey() {
    return LastaWebKey.USER_LOCALE_KEY;
}
 
开发者ID:lastaflute,项目名称:lastaflute,代码行数:4,代码来源:SimpleRequestManager.java

示例7: getReqeustUserTimeZoneKey

import org.lastaflute.web.LastaWebKey; //导入依赖的package包/类
protected String getReqeustUserTimeZoneKey() {
    return LastaWebKey.USER_TIMEZONE_KEY;
}
 
开发者ID:lastaflute,项目名称:lastaflute,代码行数:4,代码来源:SimpleRequestManager.java

示例8: getSessionUserTimeZoneKey

import org.lastaflute.web.LastaWebKey; //导入依赖的package包/类
protected String getSessionUserTimeZoneKey() {
    return LastaWebKey.USER_TIMEZONE_KEY;
}
 
开发者ID:lastaflute,项目名称:lastaflute,代码行数:4,代码来源:SimpleRequestManager.java

示例9: getErrorMessagesKey

import org.lastaflute.web.LastaWebKey; //导入依赖的package包/类
protected String getErrorMessagesKey() {
    return LastaWebKey.ACTION_ERRORS_KEY;
}
 
开发者ID:lastaflute,项目名称:lastaflute,代码行数:4,代码来源:SimpleRequestManager.java

示例10: getInfoMessagesKey

import org.lastaflute.web.LastaWebKey; //导入依赖的package包/类
protected String getInfoMessagesKey() {
    return LastaWebKey.ACTION_INFO_KEY;
}
 
开发者ID:lastaflute,项目名称:lastaflute,代码行数:4,代码来源:SimpleRequestManager.java

示例11: initModuleConfig

import org.lastaflute.web.LastaWebKey; //导入依赖的package包/类
protected void initModuleConfig(ServletContext servletContext) throws UnavailableException {
    servletContext.setAttribute(LastaWebKey.MODULE_CONFIG_KEY, newModuleConfig());
}
 
开发者ID:lastaflute,项目名称:lastaflute,代码行数:4,代码来源:LastaPrepareFilter.java

示例12: saveMessageResourcesToContext

import org.lastaflute.web.LastaWebKey; //导入依赖的package包/类
protected void saveMessageResourcesToContext(ServletContext context) {
    context.setAttribute(LastaWebKey.MESSAGE_RESOURCES_KEY, newMessageResources());
}
 
开发者ID:lastaflute,项目名称:lastaflute,代码行数:4,代码来源:LastaPrepareFilter.java

示例13: getMessageResources

import org.lastaflute.web.LastaWebKey; //导入依赖的package包/类
protected MessageResources getMessageResources(ServletContext context) {
    return (MessageResources) context.getAttribute(LastaWebKey.MESSAGE_RESOURCES_KEY);
}
 
开发者ID:lastaflute,项目名称:lastaflute,代码行数:4,代码来源:LastaPrepareFilter.java

示例14: saveRequestedSqlCount

import org.lastaflute.web.LastaWebKey; //导入依赖的package包/类
protected void saveRequestedSqlCount(ExecutedSqlCounter counter) {
    requestManager.setAttribute(LastaWebKey.DBFLUTE_SQL_COUNT_KEY, createRequestedSqlCount(counter)); // logged by logging filter
}
 
开发者ID:lastaflute,项目名称:lastaflute,代码行数:4,代码来源:GodHandEpilogue.java

示例15: saveRequestedMailCount

import org.lastaflute.web.LastaWebKey; //导入依赖的package包/类
protected void saveRequestedMailCount(PostedMailCounter counter) {
    requestManager.setAttribute(LastaWebKey.MAILFLUTE_MAIL_COUNT_KEY, createRequestedMailCount(counter));
}
 
开发者ID:lastaflute,项目名称:lastaflute,代码行数:4,代码来源:GodHandEpilogue.java


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