Use separate progress bars next to each file, in order to better track the progress...
[pithos] / src / gr / ebs / gss / client / rest / resource / GroupUserResource.java
1 /*
2  * Copyright 2009 Electronic Business Systems Ltd.
3  *
4  * This file is part of GSS.
5  *
6  * GSS is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * GSS is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with GSS.  If not, see <http://www.gnu.org/licenses/>.
18  */
19 package gr.ebs.gss.client.rest.resource;
20
21 import com.google.gwt.json.client.JSONObject;
22 import com.google.gwt.json.client.JSONParser;
23
24
25 /**
26  * @author kman
27  *
28  */
29 public class GroupUserResource extends RestResource{
30
31         public GroupUserResource(String aUri) {
32                 super(aUri);
33         }
34
35         String username;
36         String name;
37         String home;
38
39         /**
40          * Retrieve the username.
41          *
42          * @return the username
43          */
44         public String getUsername() {
45                 return username;
46         }
47
48         /**
49          * Modify the username.
50          *
51          * @param aUsername the username to set
52          */
53         public void setUsername(String aUsername) {
54                 username = aUsername;
55         }
56
57         /**
58          * Retrieve the name.
59          *
60          * @return the name
61          */
62         public String getName() {
63                 return name;
64         }
65
66         /**
67          * Modify the name.
68          *
69          * @param aName the name to set
70          */
71         public void setName(String aName) {
72                 name = aName;
73         }
74
75         /**
76          * Retrieve the home.
77          *
78          * @return the home
79          */
80         public String getHome() {
81                 return home;
82         }
83
84         /**
85          * Modify the home.
86          *
87          * @param aHome the home to set
88          */
89         public void setHome(String aHome) {
90                 home = aHome;
91         }
92
93         @Override
94         public void createFromJSON(String text) {
95                 JSONObject json = (JSONObject) JSONParser.parse(text);
96                 name = unmarshallString(json, "name");
97                 home = unmarshallString(json, "home");
98                 username = unmarshallString(json, "username");
99         }
100
101 }