mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
added type to groups
This commit is contained in:
@@ -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<String>();
|
||||
}
|
||||
@@ -63,11 +66,14 @@ public class Group implements Serializable
|
||||
* 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;
|
||||
}
|
||||
@@ -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<String>();
|
||||
|
||||
@@ -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<String> members;
|
||||
|
||||
/** Field description */
|
||||
private String name;
|
||||
|
||||
/** Field description */
|
||||
private String type;
|
||||
}
|
||||
|
||||
@@ -45,10 +45,11 @@ public class GroupResource extends AbstractResource<Group>
|
||||
{
|
||||
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 --------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user