try {
jbInit();
int permissions = 0;
AccessManagerClient manager = new AccessManagerClient(col.getClient());
if ( roleID == null ) {
Set set = new TreeSet();
String[] roles = manager.listRoles();
for ( int i = 0; i < roles.length; i++ )
set.add(roles[i]);
Map acl = manager.listAccessControl(col.getCanonicalName());
Iterator iter = acl.keySet().iterator();
while ( iter.hasNext() )
set.remove((String)iter.next());
roles = (String[])set.toArray(EmptyStrings);
for ( int i = 0; i < roles.length; i++ ) {
cmbRole.addItem(roles[i]);
if ( roles[i].equals(roleID) )
cmbRole.setSelectedIndex(i);
}
pnlRoleLayout.show(pnlRole, "combo");
}
else {
Map permMap = manager.listAccessControl(col.getCanonicalName());
Integer permInt = (Integer)permMap.get(roleID);
if ( permInt != null )
permissions = permInt.intValue();
lblRoleID.setText(roleID);