当前位置 : 主页 > 网络编程 > 其它编程 >

org.keycloak.models.GroupModel.getParent()方法的使用及代码示例

来源:互联网 收集:自由互联 发布时间:2023-07-02
本文整理了Java中org.keycloak.models.GroupModel.getParent()方法的一些代码示例,展示了GroupModel.ge 本文整理了Java中org.keycloak.models.GroupModel.getParent()方法的一些代码示例,展示了GroupModel.getParent(
本文整理了Java中org.keycloak.models.GroupModel.getParent()方法的一些代码示例,展示了GroupModel.ge

本文整理了Java中org.keycloak.models.GroupModel.getParent()方法的一些代码示例,展示了GroupModel.getParent()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GroupModel.getParent()方法的具体详情如下:包路径:org.keycloak.models.GroupModel类名称:GroupModel方法名:getParent

GroupModel.getParent介绍

暂无

代码示例

代码示例来源:origin: org.keycloak/keycloak-server-spi

/** * * @param groups * @param targetGroup * @return true if targetGroup is in groups (directly or indirectly via parent child relationship) */public static boolean isMember(Set groups, GroupModel targetGroup) { if (groups.contains(targetGroup)) return true; for (GroupModel mapping : groups) { GroupModel child = mapping; while(child.getParent() != null) { if (child.getParent().equals(targetGroup)) return true; child = child.getParent(); } } return false;}

代码示例来源:origin: org.keycloak/keycloak-model-api

public static List resolveAttribute(GroupModel group, String name) { List values = group.getAttribute(name); if (values != null if (group.getParentId() == null) return null; return resolveAttribute(group.getParent(), name);}

代码示例来源:origin: org.keycloak/keycloak-model-api

public static String resolveFirstAttribute(GroupModel group, String name) { String value = group.getFirstAttribute(name); if (value != null) return value; if (group.getParentId() == null) return null; return resolveFirstAttribute(group.getParent(), name);}

代码示例来源:origin: org.keycloak/keycloak-model-api

/** * * @param groups * @param targetGroup * @return true if targetGroup is in groups (directly or indirectly via parent child relationship) */public static boolean isMember(Set groups, GroupModel targetGroup) { if (groups.contains(targetGroup)) return true; for (GroupModel mapping : groups) { GroupModel child = mapping; while(child.getParent() != null) { if (child.getParent().equals(targetGroup)) return true; child = child.getParent(); } } return false;}// USER FEDERATION RELATED STUFF

代码示例来源:origin: org.keycloak/keycloak-server-spi

private static void addGroupRoles(GroupModel group, Set roleMappings) { roleMappings.addAll(group.getRoleMappings()); if (group.getParentId() == null) return; addGroupRoles(group.getParent(), roleMappings);}

代码示例来源:origin: org.keycloak/keycloak-model-api

public static void buildGroupPath(StringBuilder sb, GroupModel group) { if (group.getParent() != null) { buildGroupPath(sb, group.getParent()); } sb.append('/').append(group.getName());}

代码示例来源:origin: org.keycloak/keycloak-model-mongo

@Overridepublic void moveGroup(RealmModel realm, GroupModel group, GroupModel toParent) { if (toParent != null } if (group.getParentId() != null) { group.getParent().removeChild(group); } group.setParent(toParent); if (toParent != null) toParent.addChild(group); else session.realms().addTopLevelGroup(realm, group);}

代码示例来源:origin: org.keycloak/keycloak-invalidation-cache-infinispan

@Overridepublic List getTopLevelGroups() { List all = getGroups(); Iterator it = all.iterator(); while (it.hasNext()) { GroupModel group = it.next(); if (group.getParent() != null) { it.remove(); } } return all;}

代码示例来源:origin: org.keycloak/keycloak-model-jpa

@Overridepublic void moveGroup(RealmModel realm, GroupModel group, GroupModel toParent) { if (toParent != null } if (group.getParentId() != null) { group.getParent().removeChild(group); } group.setParent(toParent); if (toParent != null) toParent.addChild(group); else session.realms().addTopLevelGroup(realm, group);}

代码示例来源:origin: org.keycloak/keycloak-server-spi

/** * Checks whether the {@code targetRole} is contained in the given group or its parents * (if requested) * @param group Group to check role for * @param targetRole * @param checkParentGroup When {@code true}, also parent group is recursively checked for role * @return true if targetRole is in roles (directly or indirectly via composite role) */public static boolean hasRoleFromGroup(GroupModel group, RoleModel targetRole, boolean checkParentGroup) { if (group.hasRole(targetRole)) return true; if (checkParentGroup) { GroupModel parent = group.getParent(); return parent != null } return false;}

代码示例来源:origin: org.keycloak/keycloak-invalidation-cache-infinispan

@Overridepublic GroupModel getParent() { if (updated != null) return updated.getParent(); if (cached.getParentId() == null) return null; return keycloakSession.realms().getGroupById(cached.getParentId(), realm);}

代码示例来源:origin: org.keycloak/keycloak-model-infinispan

@Overridepublic GroupModel getParent() { if (isUpdated()) return updated.getParent(); if (cached.getParentId() == null) return null; return keycloakSession.realms().getGroupById(cached.getParentId(), realm);}

上一篇:图像处理的Dither和Banding
下一篇:没有了
网友评论