Skip to main content
summaryrefslogtreecommitdiffstats
blob: 94291cc1283ec2c27ce049af336f048ce0bb9132 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * Created on Jun 13, 2011
 *
 * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
 */
package org.eclipse.osee.ats.core.review.role;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import org.eclipse.osee.ats.core.validator.IValueProvider;
import org.eclipse.osee.framework.jdk.core.util.AXml;

public class MockUserRoleValueProvider implements IValueProvider {

   private final List<UserRole> roles;

   public MockUserRoleValueProvider(List<UserRole> roles) {
      this.roles = roles;
   }

   @Override
   public String getName() {
      return "Roles";
   }

   @Override
   public boolean isEmpty() {
      return roles.isEmpty();
   }

   @Override
   public Collection<String> getValues() {
      List<String> values = new ArrayList<String>();
      for (UserRole item : roles) {
         values.add(AXml.addTagData("Role", item.toXml()));
      }
      return values;
   }

   @Override
   public Collection<Date> getDateValues() {
      return null;
   }

}

Back to the top