/** * Returns a set of all roles group names.<p> * * @return a set of all roles group names */ private Set getAllGroupNames() { Set distinctGroups = new HashSet(); // add role group name distinctGroups.add(getGroupName()); if (getParentRole() != null) { // add parent roles group names distinctGroups.addAll(getParentRole().getAllGroupNames()); } return distinctGroups; }
/** * Returns a String inculding all parent roles of the role object.<p> * * @return a String inculding all parent roles of the role object */ public String getDependency() { String dependency = ""; CmsRole role = m_role; while (role.getParentRole() != null) { dependency = dependency + role.getParentRole().getName(getCms().getRequestContext().getLocale()); role = role.getParentRole(); if (role.getParentRole() != null) { dependency = dependency + ", "; } } return dependency; }
while (root.getParentRole() != null) { root = root.getParentRole();
/** * @see org.opencms.workplace.tools.accounts.A_CmsRolesList#getIconPath(CmsListItem) */ @Override public String getIconPath(CmsListItem item) { List<CmsListItem> roles = getList().getAllContent(); Iterator<CmsListItem> itRoles = roles.iterator(); List<CmsRole> roleObjects = new ArrayList<CmsRole>(); try { while (itRoles.hasNext()) { CmsListItem listItem = itRoles.next(); roleObjects.add(CmsRole.valueOf(getCms().readGroup((String)listItem.get(LIST_COLUMN_GROUP_NAME)))); } CmsRole role = CmsRole.valueOf(getCms().readGroup((String)item.get(LIST_COLUMN_GROUP_NAME))); if ((role.getParentRole() != null) && roleObjects.contains(role.getParentRole())) { if (role.getOuFqn().equals(getParamOufqn())) { return PATH_BUTTONS + "role_child.png"; } else { return PATH_BUTTONS + "role_other_ou_inherit.png"; } } if (role.getOuFqn().equals(getParamOufqn())) { return PATH_BUTTONS + "role.png"; } else { return PATH_BUTTONS + "role_other_ou.png"; } } catch (CmsException e) { return PATH_BUTTONS + "role.png"; } }
if (!directUsersOnly) { CmsRole role = CmsRole.valueOf(group); if (role.getParentRole() != null) { try { String parentGroup = role.getParentRole().getGroupName();
if (readRoles && !directUsersOnly) { CmsRole role = CmsRole.valueOf(group); if (role.getParentRole() != null) { try { String parentGroup = role.getParentRole().getGroupName(); readGroup(dbc, parentGroup);
if (readRoles && !directUsersOnly) { CmsRole role = CmsRole.valueOf(group); if (role.getParentRole() != null) { try { String parentGroup = role.getParentRole().getGroupName(); readGroup(dbc, parentGroup);