Exemple #1
0
 public UpdateConfigCommand modifyAdminPrivilegesCommand(
     List<String> users, TriStateSelection adminPrivilege) {
   GoConfigDao.CompositeConfigCommand command = new GoConfigDao.CompositeConfigCommand();
   for (String user : users) {
     command.addCommand(new GoConfigDao.ModifyAdminPrivilegeCommand(user, adminPrivilege));
   }
   return command;
 }
Exemple #2
0
 public GoConfigDao.CompositeConfigCommand modifyRolesCommand(
     List<String> users, List<TriStateSelection> roleSelections) {
   GoConfigDao.CompositeConfigCommand command = new GoConfigDao.CompositeConfigCommand();
   for (String user : users) {
     for (TriStateSelection roleSelection : roleSelections) {
       command.addCommand(new GoConfigDao.ModifyRoleCommand(user, roleSelection));
     }
   }
   return command;
 }
Exemple #3
0
 public void modifyEnvironments(List<AgentInstance> agents, List<TriStateSelection> selections) {
   GoConfigDao.CompositeConfigCommand command = new GoConfigDao.CompositeConfigCommand();
   for (AgentInstance agentInstance : agents) {
     String uuid = agentInstance.getUuid();
     if (hasAgent(uuid)) {
       for (TriStateSelection selection : selections) {
         command.addCommand(
             new ModifyEnvironmentCommand(uuid, selection.getValue(), selection.getAction()));
       }
     }
   }
   updateConfig(command);
 }