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