col.remove(tx, roleID);
roleCache.remove(roleID);
col = getUsersCollection();
String queryString = "/user[role[.='"+roleID+"']]/@id";
ResultSet rs = col.queryCollection(tx, XPathQueryResolver.STYLE_XPATH, queryString, null);
while ( rs.next() ) {
try {
String userID = DTSMHelper.tableToText(rs.getResult());
User user = readUser(userID);
user.removeRole(role);
storeUser(user);
}
catch ( DTSMException e ) {
// Should never happen
}
}
col = getAccessCollection();
queryString = "/access[role[.='"+roleID+"']]/path/text()";
rs = col.queryCollection(tx, XPathQueryResolver.STYLE_XPATH, queryString, null);
while ( rs.next() ) {
try {
String path = DTSMHelper.tableToText(rs.getResult());
Access access = readAccess(path);
access.removePermissions(role);
storeAccess(access);
}
catch ( DTSMException e ) {