| 1 package org.ozoneDB.adminGui.feature.account.groups; 8 9 import java.util.Vector ; 10 11 import org.ozoneDB.adminGui.feature.account.AccountItem; 12 import org.ozoneDB.adminGui.feature.account.users.UserItem; 13 14 15 24 26 public class GroupItem extends AccountItem { 27 28 34 public GroupItem(String name, int id) { 35 super(name, id); 36 } 37 38 43 public Vector getAssignedUsers() { 44 Vector users = new Vector (); 45 46 for (int i = 0; i < this.getChildCount(); i++) { 48 users.add(this.getChildAt(i).toString()); 49 } 50 51 return users; 52 } 53 54 61 public UserItem getUser(String name) { 62 UserItem uItem = null; 63 64 if (name != null) { 65 for (int i = 0; i < this.getChildCount(); i++) { 66 if (this.getChildAt(i).toString().equals(name)) { 67 uItem = (UserItem) this.getChildAt(i); 68 break; 69 } 70 } 71 } 72 return uItem; 73 } 74 75 } 77 | Popular Tags |