* @see org.apache.jetspeed.security.spi.SecurityMappingHandler#removeRolePrincipalInGroup(java.lang.String,
* java.lang.String)
*/
public void removeRolePrincipalInGroup(String groupFullPathName, String roleFullPathName) throws SecurityException
{
InternalGroupPrincipal internalGroup = commonQueries.getInternalGroupPrincipal(GroupPrincipalImpl
.getFullPathFromPrincipalName(groupFullPathName));
boolean isMappingOnly = false;
if (null == internalGroup)
{
// This is a record for mapping only.
isMappingOnly = true;
internalGroup = new InternalGroupPrincipalImpl(groupFullPathName);
}
if (null == internalGroup)
{
throw new SecurityException(SecurityException.GROUP_DOES_NOT_EXIST.create(internalGroup));
}
Collection internalRoles = internalGroup.getRolePrincipals();
InternalRolePrincipal internalRole = commonQueries.getInternalRolePrincipal(RolePrincipalImpl
.getFullPathFromPrincipalName(roleFullPathName));
internalRoles.remove(internalRole);
internalGroup.setRolePrincipals(internalRoles);
commonQueries.setInternalGroupPrincipal(internalGroup, isMappingOnly);
}