Exemplo n.º 1
0
 ManagedRole(Role role) {
   super(role.getName());
   m_role = role;
   super.setDescription(role.getDescription());
   super.setDefaultUser(getWebUser(role.getSupervisor()));
   super.setMembershipGroup(getWebGroup(role.getMembershipGroup()));
 }
Exemplo n.º 2
0
  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);
    }
  }
Exemplo n.º 3
0
 @Override
 public void setName(String name) {
   super.setName(name);
   m_flags.set(NAME);
 }
Exemplo n.º 4
0
 @Override
 public void setMembershipGroup(WebGroup memberShipGroup) {
   super.setMembershipGroup(memberShipGroup);
   m_flags.set(GROUP);
 }
Exemplo n.º 5
0
 @Override
 public void setDefaultUser(WebUser defaultUser) {
   super.setDefaultUser(defaultUser);
   m_flags.set(USER);
 }
Exemplo n.º 6
0
 @Override
 public void setDescription(String description) {
   super.setDescription(description);
   m_flags.set(DESCR);
 }
Exemplo n.º 7
0
 ManagedRole(WebRole webRole) {
   super(webRole.getName());
   super.setDescription(webRole.getDescription());
   super.setDefaultUser(webRole.getDefaultUser());
   super.setMembershipGroup(webRole.getMembershipGroup());
 }