コード例 #1
0
ファイル: GoConfigService.java プロジェクト: jyotisingh/gocd
 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;
 }
コード例 #2
0
ファイル: GoConfigService.java プロジェクト: jyotisingh/gocd
 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;
 }
コード例 #3
0
ファイル: GoConfigService.java プロジェクト: jyotisingh/gocd
 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);
 }