當前位置: 首頁>>代碼示例>>Java>>正文


Java CookieUtils類代碼示例

本文整理匯總了Java中org.apache.wicket.util.cookies.CookieUtils的典型用法代碼示例。如果您正苦於以下問題:Java CookieUtils類的具體用法?Java CookieUtils怎麽用?Java CookieUtils使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CookieUtils類屬於org.apache.wicket.util.cookies包,在下文中一共展示了CookieUtils類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: SyncopeEnduserSession

import org.apache.wicket.util.cookies.CookieUtils; //導入依賴的package包/類
public SyncopeEnduserSession(final Request request) {
    super(request);
    // define cookie utility to manage application cookies
    cookieUtils = new CookieUtils();

    anonymousClient = SyncopeEnduserApplication.get().getClientFactory().
            create(new AnonymousAuthenticationHandler(
                    SyncopeEnduserApplication.get().getAnonymousUser(),
                    SyncopeEnduserApplication.get().getAnonymousKey()));
    platformInfo = anonymousClient.getService(SyncopeService.class).platform();

    datePlainSchemas = anonymousClient.getService(SchemaService.class).
            list(new SchemaQuery.Builder().type(SchemaType.PLAIN).build());
    datePlainSchemas.removeAll(datePlainSchemas.stream().
            filter(object -> object.getType() != AttrSchemaType.Date).collect(Collectors.toSet()));
}
 
開發者ID:apache,項目名稱:syncope,代碼行數:17,代碼來源:SyncopeEnduserSession.java

示例2: setTabCookie

import org.apache.wicket.util.cookies.CookieUtils; //導入依賴的package包/類
/**
 * Set the cookie that stores the current tab index.
 *
 * @param tabIndex the current tab index.
 */
protected void setTabCookie(final int tabIndex) {

	final CookieDefaults defaults = new CookieDefaults();
	defaults.setMaxAge(-1);

	final CookieUtils utils = new CookieUtils(defaults);
	utils.save(ProfileConstants.TAB_COOKIE, String.valueOf(tabIndex));
}
 
開發者ID:sakaiproject,項目名稱:sakai,代碼行數:14,代碼來源:BasePage.java

示例3: getCookieUtils

import org.apache.wicket.util.cookies.CookieUtils; //導入依賴的package包/類
public CookieUtils getCookieUtils() {
    return cookieUtils;
}
 
開發者ID:apache,項目名稱:syncope,代碼行數:4,代碼來源:SyncopeEnduserSession.java


注:本文中的org.apache.wicket.util.cookies.CookieUtils類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。