Examples of pullItemFromList()


Examples of org.keycloak.connections.mongo.api.MongoStore.pullItemFromList()

                .get();

        List<MongoUserEntity> users = mongoStore.loadEntities(MongoUserEntity.class, query, invContext);
        for (MongoUserEntity user : users) {
            //logger.info("Removing role " + getName() + " from user " + user.getUsername());
            mongoStore.pullItemFromList(user, "roleIds", getId(), invContext);
        }

        // Remove this scope from all users, which has it
        query = new QueryBuilder()
                .and("scopeIds").is(getId())
View Full Code Here

Examples of org.keycloak.connections.mongo.api.MongoStore.pullItemFromList()

                .get();

        users = mongoStore.loadEntities(MongoUserEntity.class, query, invContext);
        for (MongoUserEntity user : users) {
            //logger.info("Removing scope " + getName() + " from user " + user.getUsername());
            mongoStore.pullItemFromList(user, "scopeIds", getId(), invContext);
        }

        // Remove defaultRoles from realm
        if (getRealmId() != null) {
            MongoRealmEntity realmEntity = mongoStore.loadEntity(MongoRealmEntity.class, getRealmId(), invContext);
View Full Code Here

Examples of org.keycloak.connections.mongo.api.MongoStore.pullItemFromList()

        if (getRealmId() != null) {
            MongoRealmEntity realmEntity = mongoStore.loadEntity(MongoRealmEntity.class, getRealmId(), invContext);

            // Realm might be already removed at this point
            if (realmEntity != null) {
                mongoStore.pullItemFromList(realmEntity, "defaultRoles", getId(), invContext);
            }
        }

        // Remove defaultRoles from application
        if (getApplicationId() != null) {
View Full Code Here

Examples of org.keycloak.connections.mongo.api.MongoStore.pullItemFromList()

        if (getApplicationId() != null) {
            MongoApplicationEntity appEntity = mongoStore.loadEntity(MongoApplicationEntity.class, getApplicationId(), invContext);

            // Application might be already removed at this point
            if (appEntity != null) {
                mongoStore.pullItemFromList(appEntity, "defaultRoles", getId(), invContext);
            }
        }

        // Remove this role from others who has it as composite
        query = new QueryBuilder()
View Full Code Here

Examples of org.keycloak.connections.mongo.api.MongoStore.pullItemFromList()

        query = new QueryBuilder()
                .and("compositeRoleIds").is(getId())
                .get();
        List<MongoRoleEntity> parentRoles = mongoStore.loadEntities(MongoRoleEntity.class, query, invContext);
        for (MongoRoleEntity role : parentRoles) {
            mongoStore.pullItemFromList(role, "compositeRoleIds", getId(), invContext);
        }
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.