public void putGroup(String ns, Group group) { Fqn nodeFqn = getFqn(ns, NODE_GROUPS, group.getKey()); Node ioNode = addNode(nodeFqn); if (ioNode != null) { ioNode.put(NODE_OBJECT_KEY, group); if (log.isLoggable(Level.FINER)) { log.finer(this.toString() + "Group stored in cache: " + group.getKey() + ";namespace=" + ns); } } }
public Group getGroup(String ns, String groupType, String groupName) { Fqn nodeFqn = getFqn(ns, NODE_GROUPS, GroupKey.parseKey(groupName, groupType)); Node node = getNode(nodeFqn); if (node != null) { Group group = (Group)node.get(NODE_OBJECT_KEY); if (log.isLoggable(Level.FINER) && group != null) { log.finer(this.toString() + "Group found in cache: id=" + group.getKey() + ";namespace=" + ns); } return group; } return null; }
protected IdentityObject createIdentityObject(Group group) { IdentityObjectType iot = getSessionContext().getIdentityObjectTypeMapper().getIdentityObjectType(group.getGroupType()); return new SimpleIdentityObject(group.getName(), group.getKey(), iot); }
String cachedId = getIntegrationCache().getGtnGroupId(getCacheNS(), jbidGroup.getKey()); if (cachedId != null) { return cachedId; getIntegrationCache().putGtnGroupId(getCacheNS(), jbidGroup.getKey(), calculatedId); getIntegrationCache().putGtnGroupId(getCacheNS(), jbidGroup.getKey(), calculatedId); getIntegrationCache().putGtnGroupId(getCacheNS(), jbidGroup.getKey(), calculatedId); getIntegrationCache().putGtnGroupId(getCacheNS(), jbidGroup.getKey(), calculatedId);
public Collection<User> findUsersWithRelatedRole(Group group, IdentitySearchCriteria criteria) throws IdentityException { checkNotNullArgument(group, "Group"); List<User> identities = new LinkedList<User>(); if (cache != null) { UserSearchImpl search = new UserSearchImpl(); search.addRelatedGroupId(group.getKey()); search.setSearchCriteria(criteria); Collection<User> results = cache.getUserSearch(cacheNS, search); if (results != null) { return results; } } Collection<IdentityObject> ios = null; ios = getRepository().findIdentityObject(getInvocationContext(), createIdentityObject(group), ROLE, true, convertSearchControls(criteria)); for (IdentityObject io : ios) { identities.add(createUser(io)); } if (cache != null) { UserSearchImpl search = new UserSearchImpl(); search.addRelatedGroupId(group.getKey()); search.setSearchCriteria(criteria); cache.putUserSearch(cacheNS, search, identities); } return identities; }
getIdentitySession().getRelationshipManager().disassociateUsersByKeys(group.getKey(), keys); } catch (Exception e) {