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