Java Code Examples for org.keycloak.models.GroupModel#setParent()
The following examples show how to use
org.keycloak.models.GroupModel#setParent() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GroupAdapter.java From keycloak with Apache License 2.0 | 5 votes |
@Override public void addChild(GroupModel subGroup) { if (subGroup.getId().equals(getId())) { return; } subGroup.setParent(this); }
Example 2
Source File: GroupAdapter.java From keycloak with Apache License 2.0 | 5 votes |
@Override public void removeChild(GroupModel subGroup) { if (subGroup.getId().equals(getId())) { return; } subGroup.setParent(null); }
Example 3
Source File: JpaRealmProvider.java From keycloak with Apache License 2.0 | 5 votes |
@Override public void moveGroup(RealmModel realm, GroupModel group, GroupModel toParent) { if (toParent != null && group.getId().equals(toParent.getId())) { return; } if (group.getParentId() != null) { group.getParent().removeChild(group); } group.setParent(toParent); if (toParent != null) toParent.addChild(group); else session.realms().addTopLevelGroup(realm, group); }
Example 4
Source File: JpaRealmProvider.java From keycloak with Apache License 2.0 | 4 votes |
@Override public void addTopLevelGroup(RealmModel realm, GroupModel subGroup) { subGroup.setParent(null); }