diff --git a/scm-core/src/main/java/sonia/scm/group/Group.java b/scm-core/src/main/java/sonia/scm/group/Group.java index 42179f7d8c..72241fbc0f 100644 --- a/scm-core/src/main/java/sonia/scm/group/Group.java +++ b/scm-core/src/main/java/sonia/scm/group/Group.java @@ -32,7 +32,7 @@ import javax.xml.bind.annotation.XmlType; */ @XmlRootElement(name = "groups") @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(propOrder = { "name", "members" }) +@XmlType(propOrder = { "type", "name", "members" }) public class Group implements Serializable { @@ -51,10 +51,13 @@ 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(); } @@ -63,11 +66,14 @@ public class Group implements Serializable * Constructs ... * * + * + * @param type * @param name * @param members */ - public Group(String name, List members) + public Group(String type, String name, List members) { + this.type = type; this.name = name; this.members = members; } @@ -76,11 +82,14 @@ public class Group implements Serializable * 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(); @@ -182,6 +191,17 @@ public class Group implements Serializable return name; } + /** + * Method description + * + * + * @return + */ + public String getType() + { + return type; + } + //~--- set methods ---------------------------------------------------------- /** @@ -206,12 +226,25 @@ public class Group implements Serializable this.name = name; } + /** + * Method description + * + * + * @param type + */ + public void setType(String type) + { + this.type = type; + } + //~--- fields --------------------------------------------------------------- /** Field description */ - @XmlElement(name = "members") private List members; /** Field description */ private String name; + + /** Field description */ + private String type; } diff --git a/scm-webapp/src/main/java/sonia/scm/api/rest/resources/GroupResource.java b/scm-webapp/src/main/java/sonia/scm/api/rest/resources/GroupResource.java index b314294e7c..350b373aa2 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/rest/resources/GroupResource.java +++ b/scm-webapp/src/main/java/sonia/scm/api/rest/resources/GroupResource.java @@ -45,10 +45,11 @@ public class GroupResource extends AbstractResource { groupStore = new LinkedHashMap(); 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 --------------------------------------------------------------