Statistics
| Branch: | Tag: | Revision:

root / src / org / gss_project / gss / web / client / rest / resource / GroupUserResource.java @ ab3fae7b

History | View | Annotate | Download (2.1 kB)

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 org.gss_project.gss.web.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
        @Override
63
        public String getName() {
64
                return name;
65
        }
66

    
67
        /**
68
         * Modify the name.
69
         *
70
         * @param aName the name to set
71
         */
72
        public void setName(String aName) {
73
                name = aName;
74
        }
75

    
76
        /**
77
         * Retrieve the home.
78
         *
79
         * @return the home
80
         */
81
        public String getHome() {
82
                return home;
83
        }
84

    
85
        /**
86
         * Modify the home.
87
         *
88
         * @param aHome the home to set
89
         */
90
        public void setHome(String aHome) {
91
                home = aHome;
92
        }
93

    
94
        @Override
95
        public void createFromJSON(String text) {
96
                JSONObject json = (JSONObject) JSONParser.parse(text);
97
                name = unmarshallString(json, "name");
98
                home = unmarshallString(json, "home");
99
                username = unmarshallString(json, "username");
100
        }
101

    
102
        @Override
103
        public String getLastModifiedSince() {
104
                return null;
105
        }
106
}