Exemple #1
0
 public final boolean save(XObject input) {
   if (input instanceof XGroup) {
     XGroup group = (XGroup) input;
     group.clearRoles();
     for (XRole role : getSelectedRoles()) group.addRoleID(role.getId());
   }
   return true;
 }
Exemple #2
0
 public void set(XObject input) {
   if (input instanceof XGroup) {
     XGroup group = (XGroup) input;
     membersTable.removeAll();
     List<String> userIDs = Arrays.asList(group.getUserIDs());
     setUsers(userIDs);
   }
 }
Exemple #3
0
 public final boolean save(XObject input) {
   if (input instanceof XGroup) {
     XGroup group = (XGroup) input;
     group.setName(name.getValue());
     group.setDescription(description.getValue());
   }
   return true;
 }
Exemple #4
0
 public String getTitle(XObject input) {
   if (input instanceof XGroup) {
     XGroup group = (XGroup) input;
     String name = group.getName();
     if (name != null && !name.equals("")) return messages.group(name);
   }
   return constants.newGroup();
 }
Exemple #5
0
 public void set(XObject input) {
   if (input instanceof XGroup) {
     XGroup group = (XGroup) input;
     rolesTable.removeAll();
     boolean isAdm = group != null && group.getName() != null && group.getName().equals("admin");
     ((CheckBoxTableColumn) rolesTable.getColumnModel().getColumn(0)).setEnabled(!isAdm);
     List<String> roleIDs = Arrays.asList(group.getRoleIDs());
     setRoles(roleIDs);
   }
 }
Exemple #6
0
 public void set(XObject input) {
   if (input instanceof XGroup) {
     XGroup group = (XGroup) input;
     name.setValue(group.getName());
     description.setValue(translateDescription(group.getDescription()));
     if (group != null
         && group.getName() != null
         && (group.getName().equals("admin")
             || group.getName().equals("editor")
             || group.getName().equals("creator")
             || group.getName().equals("viewer")
             || group.getName().equals("poweruser")
             || group.getName().equals("publisher"))) {
       name.setEnabled(false);
       description.setEnabled(false);
     } else {
       name.setEnabled(true);
       description.setEnabled(true);
     }
   }
 }
Exemple #7
0
 public final boolean save(XObject input) {
   if (input instanceof XGroup) {
     XGroup group = (XGroup) input;
     group.clearUsers();
     if (group.getId() == null) {
       ((GroupEditor) editor).needsUpdate = true;
       return true;
     }
     for (XUser user : getAllUsers()) {
       if (isSelected(user)) {
         group.addUserID(user.getId());
         user.addGroupID(group.getId());
       } else {
         group.removeUserID(user.getId());
         user.removeGroupID(group.getId());
       }
       ((GroupEditor) editor).adminController.updateUser(user);
     }
   }
   return true;
 }