예제 #1
0
 public void launchAssignContentDialog(Content content) {
   Set<String> assignedServerGroupNames =
       Sets.newHashSet(Lists.transform(content.getAssignments(), Assignment::getServerGroup));
   Set<String> serverGroupNames =
       Sets.newHashSet(
           Lists.transform(serverGroupStore.getServerGroups(), ServerGroupRecord::getName));
   serverGroupNames.removeAll(assignedServerGroupNames);
   if (serverGroupNames.isEmpty()) {
     Console.warning(content.getName() + " is already assigned to all server groups.");
   } else {
     assignContentDialog.open(content, Ordering.natural().immutableSortedCopy(serverGroupNames));
   }
 }
예제 #2
0
 public void loadServerGroups() {
   getView().updateServerGroups(serverGroupStore.getServerGroups());
 }