List of usage examples for com.google.gwt.user.client Cookies setCookie
public static void setCookie(String name, String value, Date expires)
From source file:org.unitime.timetable.gwt.client.admin.AdminCookie.java
License:Apache License
private void save() { String cookie = iSortTasksBy + "|" + iSortTaskExecutionsBy; Date expires = new Date(new Date().getTime() + 604800000l); // expires in 7 days Cookies.setCookie("UniTime:Admin", cookie, expires); }
From source file:org.unitime.timetable.gwt.client.events.EventCookie.java
License:Apache License
private void save() { String cookie = String.valueOf(iFlags) + "|" + (iShowDeltedMeetings ? "T" : "F") + "|" + iSortRoomsBy + "|" + (iRoomsHorizontal ? "T" : "F") + "|" + (iExpandRoomConflicts ? "T" : "F") + "|" + (iAutomaticallyApproveNewMeetings ? "T" : "F") + "|" + (iHideDuplicitiesForMeetings ? "T" : "F"); for (Map.Entry<String, String> entry : iHash.entrySet()) cookie += "|" + entry.getKey() + ":" + entry.getValue(); Date expires = new Date(new Date().getTime() + 604800000l); // expires in 7 days Cookies.setCookie("UniTime:Event", cookie, expires); }
From source file:org.unitime.timetable.gwt.client.instructor.InstructorCookie.java
License:Apache License
private void save() { String cookie = iSortAttributesBy + "|" + iSortInstructorsBy + "|" + iSortTeachingRequestsBy[0] + "|" + iSortTeachingRequestsBy[1] + "|" + iSortTeachingRequestsBy[2] + "|" + iTeachingRequestsColumns[0] + "|" + iTeachingRequestsColumns[1] + "|" + iTeachingRequestsColumns[2] + "|" + iSortTeachingAssignmentsBy + "|" + iTeachingAssignmentsColumns + "|" + iAssignmentChangesBase + "|" + iSortAssignmentChangesBy + "|" + iAssignmentChangesColumns + "|" + (iShowTeachingRequests ? "T" : "F") + "|" + (iShowTeachingAssignments ? "T" : "F") + "|" + (iQuery[0] == null ? "" : iQuery[0]) + "|" + (iQuery[1] == null ? "" : iQuery[1]) + "|" + (iQuery[2] == null ? "" : iQuery[2]); Date expires = new Date(new Date().getTime() + 604800000l); // expires in 7 days Cookies.setCookie("UniTime:Instructor", cookie, expires); }
From source file:org.unitime.timetable.gwt.client.rooms.RoomCookie.java
License:Apache License
private void save() { String cookie = iSortRoomsBy + "|" + iSortRoomGroupsBy + "|" + iSortRoomFeaturesBy + "|" + getOrientation() + "|" + iDeptMode; for (int i = 0; i < iFlags.length; i++) { cookie += "|" + iFlags[i] + "|" + (iHash[i] == null ? "" : iHash[i]); }/*from w w w . j av a 2 s. c o m*/ for (Map.Entry<Long, Integer> e : iFutures.entrySet()) { cookie += "|" + e.getKey() + ":" + e.getValue(); } Date expires = new Date(new Date().getTime() + 604800000l); // expires in 7 days Cookies.setCookie("UniTime:Room", cookie, expires); }
From source file:org.unitime.timetable.gwt.client.sectioning.SectioningStatusCookie.java
License:Apache License
private void save() { String cookie = iOnlineTab + "|" + iOnlineQuery + "|" + iBashTab + "|" + iBashQuery; for (int i = 0; i < iSortBy.length; i++) cookie += "|" + iSortBy[i]; Date expires = new Date(new Date().getTime() + 604800000l); // expires in 7 days Cookies.setCookie("UniTime:StudentStatus", cookie, expires); }
From source file:org.unitime.timetable.gwt.client.solver.SolverCookie.java
License:Apache License
private void save() { String cookie = iLogLevel + "|" + (iTimeGridFilter ? "1" : "0") + "|" + (iAssignedClassesFilter ? "1" : "0") + "|" + iAssignedClassesSort + "|" + (iNotAssignedClassesFilter ? "1" : "0") + "|" + iNotAssignedClassesSort + "|" + iSelectedAssignmentsSort + "|" + iConflictingAssignmentsSort + "|" + iSuggestionsSort + "|" + iPlacementsSort + "|" + (iShowSuggestions ? "1" : "0") + "|" + (iShowConflicts ? "1" : "0") + "|" + iConflictsSort + "|" + (iShowAllStudentConflicts ? "1" : "0") + "|" + (iShowAllDistributionConflicts ? "1" : "0") + "|" + (iShowCBS ? "1" : "0") + "|" + (iShowCBSFilter ? "1" : "0") + "|" + (iSolutionChangesFilter ? "1" : "0") + "|" + iSolutionChangesSort + "|" + (iAssignmentHistoryFilter ? "1" : "0") + "|" + iAssignmentHistorySort + "|" + iListSolutionsSort + "|" + (iSuggestionsFilter == null ? "" : iSuggestionsFilter); Date expires = new Date(new Date().getTime() + 604800000l); // expires in 7 days Cookies.setCookie("UniTime:Solver", cookie, expires); }
From source file:tv.dyndns.kishibe.qmaclone.client.UserData.java
License:Open Source License
public void save() { Cookies.setCookie(KEY_USER_CODE, Integer.toString(data.userCode), getExpireTime()); Service.Util.getInstance().saveUserData(data, callbackSaveUserData); }
From source file:tv.dyndns.kishibe.qmaclone.client.UserData.java
License:Open Source License
public void setUserCode(int userCode) { data.userCode = userCode;/*w ww.j ava2 s .c o m*/ if (GWT.isClient()) { Cookies.setCookie(KEY_USER_CODE, "" + data.userCode, getExpireTime()); } }
From source file:uk.ac.ebi.sail.client.ConfigManager.java
License:Open Source License
public static void sync() { StringBuilder sb = new StringBuilder(1000); for (Map.Entry<String, String> me : cfg.entrySet()) { if (!me.getKey().startsWith("-")) sb.append(M1codec.encode(me.getKey(), "=;")).append('=').append(M1codec.encode(me.getValue(), "=;")) .append(';'); }//from w w w . java2s . com if (sb.length() < 2) return; sb.setLength(sb.length() - 1); Cookies.setCookie(cookieName, sb.toString(), new Date(System.currentTimeMillis() + 365L * 24L * 3600L * 1000L)); }
From source file:votes.client.oauth.CookieStoreImpl.java
License:Apache License
@SuppressWarnings("deprecation") @Override//w w w . ja va 2s . c o m public void set(String key, String value) { Cookies.setCookie(COOKIE_PREFIX + key, value, new Date(2030, 12, 31)); }