コード例 #1
0
 private Calendar newPublicCalendar() {
   Calendar calendar = new Calendar();
   calendar.setCalendarOwner(currentUser);
   calendar.setDataInit(true);
   calendar.setName(calRandomWords(5));
   calendar.setDescription(randomWords(20));
   calendar.setCalendarColor(getRandomColor());
   calendar.setEditPermission(groupShare);
   calendar.setGroups(groups);
   calendar.setViewPermission(new String[] {"*.*"});
   calendar.setPrivateUrl(EMPTY);
   calendar.setPublicUrl(EMPTY);
   calendar.setPublic(true);
   calendar.setLocale("VNM");
   calendar.setTimeZone("Asia/Ho_Chi_Minh");
   return calendar;
 }
コード例 #2
0
 private Calendar newPrivateCalendar() {
   Calendar calendar = new Calendar();
   calendar.setCalendarOwner(currentUser);
   calendar.setDataInit(true);
   calendar.setName(calRandomWords(5));
   calendar.setDescription(randomWords(20));
   calendar.setCalendarColor(getRandomColor());
   calendar.setEditPermission(new String[] {});
   calendar.setGroups(new String[] {});
   calendar.setViewPermission(new String[] {});
   calendar.setPrivateUrl(EMPTY);
   calendar.setPublicUrl(EMPTY);
   calendar.setPublic(false);
   calendar.setLocale(DEFAULT_LOCATION);
   calendar.setTimeZone(setting.getTimeZone());
   return calendar;
 }