Statistics
| Branch: | Tag: | Revision:

root / web_client / src / gr / grnet / pithos / web / client / rest / resource / GroupUserResource.java @ 5cd18037

History | View | Annotate | Download (1.4 kB)

1
/*
2
 *  Copyright (c) 2011 Greek Research and Technology Network
3
 */
4
package gr.grnet.pithos.web.client.rest.resource;
5

    
6
import com.google.gwt.json.client.JSONObject;
7
import com.google.gwt.json.client.JSONParser;
8

    
9

    
10
public class GroupUserResource extends RestResource{
11

    
12
        public GroupUserResource(String aUri) {
13
                super(aUri);
14
        }
15

    
16
        String username;
17
        String name;
18
        String home;
19

    
20
        /**
21
         * Retrieve the username.
22
         *
23
         * @return the username
24
         */
25
        public String getUsername() {
26
                return username;
27
        }
28

    
29
        /**
30
         * Modify the username.
31
         *
32
         * @param aUsername the username to set
33
         */
34
        public void setUsername(String aUsername) {
35
                username = aUsername;
36
        }
37

    
38
        /**
39
         * Retrieve the name.
40
         *
41
         * @return the name
42
         */
43
        @Override
44
        public String getName() {
45
                return name;
46
        }
47

    
48
        /**
49
         * Modify the name.
50
         *
51
         * @param aName the name to set
52
         */
53
        public void setName(String aName) {
54
                name = aName;
55
        }
56

    
57
        /**
58
         * Retrieve the home.
59
         *
60
         * @return the home
61
         */
62
        public String getHome() {
63
                return home;
64
        }
65

    
66
        /**
67
         * Modify the home.
68
         *
69
         * @param aHome the home to set
70
         */
71
        public void setHome(String aHome) {
72
                home = aHome;
73
        }
74

    
75
        @Override
76
        public void createFromJSON(String text) {
77
                JSONObject json = (JSONObject) JSONParser.parse(text);
78
                name = unmarshallString(json, "name");
79
                home = unmarshallString(json, "home");
80
                username = unmarshallString(json, "username");
81
        }
82

    
83
        @Override
84
        public String getLastModifiedSince() {
85
                return null;
86
        }
87
}