@Override public final void onSubmit() { final Collection<TeamCalDO> assignedItems = teamCalCache.getAllOwnCalendars(); calendarsListHelper.setAssignedItems(assignedItems); } }, getString("plugins.teamcal.own"), SingleButtonPanel.NORMAL));
private Collection<Integer> getCalendarIds(String calendarIds) { final Collection<Integer> cals = new LinkedList<>(); if (StringUtils.isBlank(calendarIds) == true) { final Collection<TeamCalDO> ownCals = teamCalCache.getAllOwnCalendars(); if (ownCals != null && ownCals.size() > 0) { for (final TeamCalDO cal : ownCals) { cals.add(cal.getId()); } } } else { final Integer[] ids = StringHelper.splitToIntegers(calendarIds, ",;:"); if (ids != null && ids.length > 0) { for (final Integer id : ids) { if (id != null) { cals.add(id); } } } } return cals; }