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")
|
@XmlRootElement(name = "groups")
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
@XmlType(propOrder = { "name", "members" })
|
@XmlType(propOrder = { "type", "name", "members" })
|
||||||
public class Group implements Serializable
|
public class Group implements Serializable
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -51,10 +51,13 @@ public class Group implements Serializable
|
|||||||
* Constructs ...
|
* Constructs ...
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
*
|
||||||
|
* @param type
|
||||||
* @param name
|
* @param name
|
||||||
*/
|
*/
|
||||||
public Group(String name)
|
public Group(String type, String name)
|
||||||
{
|
{
|
||||||
|
this.type = type;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.members = new ArrayList<String>();
|
this.members = new ArrayList<String>();
|
||||||
}
|
}
|
||||||
@@ -63,11 +66,14 @@ public class Group implements Serializable
|
|||||||
* Constructs ...
|
* Constructs ...
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
*
|
||||||
|
* @param type
|
||||||
* @param name
|
* @param name
|
||||||
* @param members
|
* @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.name = name;
|
||||||
this.members = members;
|
this.members = members;
|
||||||
}
|
}
|
||||||
@@ -76,11 +82,14 @@ public class Group implements Serializable
|
|||||||
* Constructs ...
|
* Constructs ...
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
*
|
||||||
|
* @param type
|
||||||
* @param name
|
* @param name
|
||||||
* @param members
|
* @param members
|
||||||
*/
|
*/
|
||||||
public Group(String name, String... members)
|
public Group(String type, String name, String... members)
|
||||||
{
|
{
|
||||||
|
this.type = type;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.members = new ArrayList<String>();
|
this.members = new ArrayList<String>();
|
||||||
|
|
||||||
@@ -182,6 +191,17 @@ public class Group implements Serializable
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method description
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getType()
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
//~--- set methods ----------------------------------------------------------
|
//~--- set methods ----------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -206,12 +226,25 @@ public class Group implements Serializable
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method description
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @param type
|
||||||
|
*/
|
||||||
|
public void setType(String type)
|
||||||
|
{
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
//~--- fields ---------------------------------------------------------------
|
//~--- fields ---------------------------------------------------------------
|
||||||
|
|
||||||
/** Field description */
|
/** Field description */
|
||||||
@XmlElement(name = "members")
|
|
||||||
private List<String> members;
|
private List<String> members;
|
||||||
|
|
||||||
/** Field description */
|
/** Field description */
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
/** Field description */
|
||||||
|
private String type;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,11 @@ public class GroupResource extends AbstractResource<Group>
|
|||||||
{
|
{
|
||||||
groupStore = new LinkedHashMap<String, Group>();
|
groupStore = new LinkedHashMap<String, Group>();
|
||||||
groupStore.put("csit",
|
groupStore.put("csit",
|
||||||
new Group("csit", "th", "merlec", "hopper", "oelkersd",
|
new Group("static", "csit", "th", "merlec", "hopper",
|
||||||
"sdorra", "gollnict"));
|
"oelkersd", "sdorra", "gollnict"));
|
||||||
groupStore.put("devel",
|
groupStore.put("devel",
|
||||||
new Group("devel", "sdorra", "th", "merlec", "oelkersd"));
|
new Group("static", "devel", "sdorra", "th", "merlec",
|
||||||
|
"oelkersd"));
|
||||||
}
|
}
|
||||||
|
|
||||||
//~--- methods --------------------------------------------------------------
|
//~--- methods --------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user