1. velo
  2. scm-manager

Commits

Sebastian Sdorra  committed c8fc919

added type to groups

  • Participants
  • Parent commits ee3c9c2
  • Branches default

Comments (0)

Files changed (2)

File scm-core/src/main/java/sonia/scm/group/Group.java

View file
  • Ignore whitespace
  */
 @XmlRootElement(name = "groups")
 @XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(propOrder = { "name", "members" })
+@XmlType(propOrder = { "type", "name", "members" })
 public class Group implements Serializable
 {
 
    * Constructs ...
    *
    *
+   *
+   * @param type
    * @param name
    */
-  public Group(String name)
+  public Group(String type, String name)
   {
+    this.type = type;
     this.name = name;
     this.members = new ArrayList<String>();
   }
    * Constructs ...
    *
    *
+   *
+   * @param type
    * @param name
    * @param members
    */
-  public Group(String name, List<String> members)
+  public Group(String type, String name, List<String> members)
   {
+    this.type = type;
     this.name = name;
     this.members = members;
   }
    * Constructs ...
    *
    *
+   *
+   * @param type
    * @param name
    * @param members
    */
-  public Group(String name, String... members)
+  public Group(String type, String name, String... members)
   {
+    this.type = type;
     this.name = name;
     this.members = new ArrayList<String>();
 
     return name;
   }
 
+  /**
+   * Method description
+   *
+   *
+   * @return
+   */
+  public String getType()
+  {
+    return type;
+  }
+
   //~--- set methods ----------------------------------------------------------
 
   /**
     this.name = name;
   }
 
+  /**
+   * Method description
+   *
+   *
+   * @param type
+   */
+  public void setType(String type)
+  {
+    this.type = type;
+  }
+
   //~--- fields ---------------------------------------------------------------
 
   /** Field description */
-  @XmlElement(name = "members")
   private List<String> members;
 
   /** Field description */
   private String name;
+
+  /** Field description */
+  private String type;
 }

File scm-webapp/src/main/java/sonia/scm/api/rest/resources/GroupResource.java

View file
  • Ignore whitespace
   {
     groupStore = new LinkedHashMap<String, Group>();
     groupStore.put("csit",
-                   new Group("csit", "th", "merlec", "hopper", "oelkersd",
-                             "sdorra", "gollnict"));
+                   new Group("static", "csit", "th", "merlec", "hopper",
+                             "oelkersd", "sdorra", "gollnict"));
     groupStore.put("devel",
-                   new Group("devel", "sdorra", "th", "merlec", "oelkersd"));
+                   new Group("static", "devel", "sdorra", "th", "merlec",
+                             "oelkersd"));
   }
 
   //~--- methods --------------------------------------------------------------