コード例 #1
0
 public void appendRecentLocation(String location) {
   if (StringUtils.isBlank(location) == true) {
     return;
   }
   ensureRecentLocations();
   recentLocations.setMaxSize(
       MAX_RECENT); // Needed, because max size will be set via xstream deserialization.
   recentLocations.append(location);
 }
コード例 #2
0
 public void appendRecentTask(Integer taskId) {
   if (taskId == null) {
     return;
   }
   ensureRecentTasks();
   recentTasks.setMaxSize(
       MAX_RECENT); // Needed, because max size will be set via xstream deserialization.
   recentTasks.append(taskId);
 }
コード例 #3
0
 public void init(List<TimesheetDO> list) {
   if (CollectionUtils.isNotEmpty(list) == true) {
     ensureRecents();
     ensureRecentTasks();
     for (TimesheetDO timesheet : list) {
       TimesheetPrefEntry prefEntry = new TimesheetPrefEntry(timesheet);
       recents.addOnly(prefEntry);
       if (timesheet.getId() == null) {
         return;
       }
       recentTasks.addOnly(timesheet.getTaskId());
     }
   }
 }
コード例 #4
0
 public void initLocations(Collection<String> locations) {
   if (CollectionUtils.isNotEmpty(locations) == true) {
     ensureRecentLocations();
     for (String location : locations) {
       if (StringUtils.isBlank(location) == true) {
         return;
       }
       recentLocations.addOnly(location);
     }
   }
 }
コード例 #5
0
 public List<TimesheetPrefEntry> getRecents() {
   if (recents == null) {
     return null;
   }
   return recents.getRecents();
 }
コード例 #6
0
 public void appendRecentEntry(TimesheetPrefEntry entry) {
   ensureRecents();
   recents.setMaxSize(MAX_RECENT); // Needed, because size will be set via xstream deserialization.
   recents.append(entry);
 }
コード例 #7
0
 public TimesheetPrefEntry getRecentEntry(Integer pos) {
   ensureRecents();
   return recents.get(pos);
 }
コード例 #8
0
 public List<String> getRecentLocations() {
   if (recentLocations == null) {
     return null;
   }
   return recentLocations.getRecents();
 }
コード例 #9
0
 public List<Integer> getRecentTasks() {
   if (recentTasks == null) {
     return null;
   }
   return recentTasks.getRecents();
 }
コード例 #10
0
 public Integer getRecentTask(Integer pos) {
   ensureRecentTasks();
   return recentTasks.get(pos);
 }