private List<LocalPath> getPath(List<LocalPath> list, String id) throws Exception { if (list == null) list = new ArrayList<LocalPath>(5); if (id == null) return list; OrganizationService service = getApplicationComponent(OrganizationService.class); Group group = service.getGroupHandler().findGroupById(id); if (group == null) return list; list.add(0, new LocalPath(group.getId(), group.getGroupName())); getPath(list, group.getParentId()); return list; }
private List<LocalPath> getPath(List<LocalPath> list, String id) throws Exception { if (list == null) list = new ArrayList<LocalPath>(5); if (id == null) return list; OrganizationService service = getApplicationComponent(OrganizationService.class); Group group = service.getGroupHandler().findGroupById(id); if (group == null) return list; list.add(0, new LocalPath(group.getId(), group.getGroupName())); getPath(list, group.getParentId()); return list; }
private List<LocalPath> getPath(List<LocalPath> list, String id) throws Exception { if (list == null) { list = new ArrayList<LocalPath>(5); } if (id == null) { return list; } OrganizationService service = getApplicationComponent(OrganizationService.class); Group group = service.getGroupHandler().findGroupById(id); if (group == null) { return list; } list.add(0, new LocalPath(group.getId(), group.getGroupName())); getPath(list, group.getParentId()); return list; }
try { session = repositoryService.getCurrentRepository().getSystemSession(Util.WORKSPACE); if (group.getParentId() != null && !group.getParentId().isEmpty()) { try { Group parentGroup = organizationService.getGroupHandler().findGroupById(group.getParentId()); invokeListenersToSavedGroup(parentGroup, isNew); } catch (Exception e) { LOG.warn("\t\tError occurred while attempting to get parent of " + group.getId() + " Group. Listeners will not be applied on parent " + group.getParentId(), e);
private List<OrganizationConfig.Group> getAllGroups() throws Exception { List<OrganizationConfig.Group> allGroups = new ArrayList<OrganizationConfig.Group>(); try { @SuppressWarnings("unchecked") Collection<Group> groups = organizationService.getGroupHandler().getAllGroups(); for (Group group : groups) { OrganizationConfig.Group orgConfGroup = new OrganizationConfig.Group(); orgConfGroup.setDescription(group.getDescription()); orgConfGroup.setLabel(group.getLabel()); orgConfGroup.setName(group.getGroupName()); orgConfGroup.setParentId(group.getParentId()); allGroups.add(orgConfGroup); } } catch (Exception e) { LOG.error("Error when recovering of all groups ... ", e); return null; } return allGroups; }
orgService.getConfiguration().getGroupType(exoGroup.getParentId())); } catch (Exception e) { try { jbidGroup = getIdentitySession().getPersistenceManager().createGroup(plGroupName, orgService.getConfiguration().getGroupType(exoGroup.getParentId())); } catch (Exception e) {
orgService.getConfiguration().getGroupType(parent.getParentId())); } catch (Exception e) { String id = g.getParentId(); if ((parent == null && id == null) || (parent != null && id != null && id.equals(parent.getId())) || (parent == null && id != null && id.equals("/"))) {
Group parent = findGroupById(ctx, group.getParentId()); setId(parent, group); String groupDN = ldapAttrMapping.groupDNKey + "=" + group.getGroupName() + "," + createSubDN(parent);
String searchBase = this.createSubDN(group.getParentId()); SearchControls constraints = new SearchControls(); constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
orgService.getConfiguration().getGroupType(group.getParentId())); } catch (Exception e) { handleException("Cannot obtain group: " + plGroupName + "; ", e);
try { parentGroup = getIdentitySession().getPersistenceManager().findGroup(parentPLGroupName, orgService.getConfiguration().getGroupType(parent.getParentId())); } catch (Exception e) { handleException("Cannot obtain group: " + parentPLGroupName, e);
public void changeGroup(String groupId) throws Exception { OrganizationService service = getApplicationComponent(OrganizationService.class); UIBreadcumbs uiBreadcumb = getChild(UIBreadcumbs.class); uiBreadcumb.setPath(getPath(null, groupId)); UITree tree = getChild(UITree.class); Collection sibblingGroup; if (groupId == null) { sibblingGroup = service.getGroupHandler().findGroups(null); tree.setSibbling((List)sibblingGroup); tree.setChildren(null); tree.setSelected(null); selectedGroup = null; return; } selectedGroup = service.getGroupHandler().findGroupById(groupId); String parentGroupId = null; if (selectedGroup != null) parentGroupId = selectedGroup.getParentId(); Group parentGroup = null; if (parentGroupId != null) parentGroup = service.getGroupHandler().findGroupById(parentGroupId); Collection childrenGroup = service.getGroupHandler().findGroups(selectedGroup); sibblingGroup = service.getGroupHandler().findGroups(parentGroup); tree.setSibbling((List)sibblingGroup); tree.setChildren((List)childrenGroup); tree.setSelected(selectedGroup); tree.setParentSelected(parentGroup); }
String parentGroupId = null; if (selectGroup_ != null) parentGroupId = selectGroup_.getParentId(); Group parentGroup = null; if (parentGroupId != null)
if (selectGroup_ != null) parentGroupId = selectGroup_.getParentId();
childImpl.setId(groupId); if (LOG.isDebugEnabled()) LOG.debug("----------ADD GROUP " + child.getId() + " into Group" + child.getParentId());
orgService.getConfiguration().getGroupType(g.getParentId()));