ManagedRole(Role role) { super(role.getName()); m_role = role; super.setDescription(role.getDescription()); super.setDefaultUser(getWebUser(role.getSupervisor())); super.setMembershipGroup(getWebGroup(role.getMembershipGroup())); }
private void initializeGroupsAndRoles(Groupinfo groupinfo) { Groups groups = groupinfo.getGroups(); m_groups = new LinkedHashMap<String, Group>(); m_oldHeader = groupinfo.getHeader(); for (Group curGroup : groups.getGroupCollection()) { m_groups.put(curGroup.getName(), curGroup); } buildDutySchedules(m_groups); Roles roles = groupinfo.getRoles(); m_roles = new LinkedHashMap<String, Role>(); if (roles != null) { for (Role role : roles.getRoleCollection()) { m_roles.put(role.getName(), role); } } }
/** * saveRole * * @param role a {@link org.opennms.netmgt.config.groups.Role} object. * @throws java.lang.Exception if any. */ public void saveRole(Role role) throws Exception { m_roles.put(role.getName(), role); saveGroups(); }