本文整理匯總了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()));
}
示例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));
}
示例3: getCookieUtils
import org.apache.wicket.util.cookies.CookieUtils; //導入依賴的package包/類
public CookieUtils getCookieUtils() {
return cookieUtils;
}