model/file/src/main/java/org/keycloak/models/file/adapter/RoleAdapter.java
/**
     * Recursively remove composite roles for the specified app
     * @param appId
     */
Recursively remove composite roles for the specified app
@param appId
Recursively remove composite roles for the specified app @param appId
public void removeApplicationComposites(String appId) {
        if (!isComposite()) return;
        Set<RoleModel> toBeRemoved = new HashSet<RoleModel>();
        for (RoleModel compositeRole : getComposites()) {
            RoleAdapter roleAdapter = (RoleAdapter)compositeRole;
            if (appId.equals(roleAdapter.getRoleEntity().getClientId())) {
                toBeRemoved.add(compositeRole);
            } else {
                roleAdapter.removeApplicationComposites(appId);
            }
        }
        for (RoleModel compositeRole : toBeRemoved) {
            removeCompositeRole(compositeRole);
        }
    }
public void removeApplicationComposites ( String appId ) { if ( ! isComposite ( ) ) return ; Set < RoleModel > toBeRemoved = new HashSet < RoleModel > ( ) ; for ( RoleModel compositeRole : getComposites ( ) ) { RoleAdapter roleAdapter = ( RoleAdapter ) compositeRole ; if ( appId . equals ( roleAdapter . getRoleEntity ( ) . getClientId ( ) ) ) { toBeRemoved . add ( compositeRole ) ; } else { roleAdapter . removeApplicationComposites ( appId ) ; } } for ( RoleModel compositeRole : toBeRemoved ) { removeCompositeRole ( compositeRole ) ; } }
Recursively remove composite roles for the specified app
 @param appId
Recursively remove composite roles for the specified app @param appId