ManagedRole(Role role) { super(role.getName()); m_role = role; super.setDescription(role.getDescription()); super.setDefaultUser(getWebUser(role.getSupervisor())); super.setMembershipGroup(getWebGroup(role.getMembershipGroup())); }
private Collection<WebUser> getUsersScheduleForRole(WebRole role, Date time) { try { String[] users = m_userManager.getUsersScheduledForRole(role.getName(), new Date()); List<WebUser> webUsers = new ArrayList<WebUser>(users.length); for (String user : users) { webUsers.add(getWebUser(user)); } return webUsers; } catch (MarshalException e) { throw new WebRolesException("Error marshalling users.xml config file", e); } catch (ValidationException e) { throw new WebRolesException("Error validating users.xml config file", e); } catch (IOException e) { throw new WebRolesException("Error reading users.xml config file", e); } }
@Override public void setName(String name) { super.setName(name); m_flags.set(NAME); }
@Override public void setMembershipGroup(WebGroup memberShipGroup) { super.setMembershipGroup(memberShipGroup); m_flags.set(GROUP); }
@Override public void setDefaultUser(WebUser defaultUser) { super.setDefaultUser(defaultUser); m_flags.set(USER); }
@Override public void setDescription(String description) { super.setDescription(description); m_flags.set(DESCR); }
ManagedRole(WebRole webRole) { super(webRole.getName()); super.setDescription(webRole.getDescription()); super.setDefaultUser(webRole.getDefaultUser()); super.setMembershipGroup(webRole.getMembershipGroup()); }