Statistics
| Branch: | Tag: | Revision:

root / src / gr / ebs / gss / client / rest / resource / GroupUserResource.java @ c5070ebe

History | View | Annotate | Download (2.3 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 gr.ebs.gss.client.rest.resource;
20

    
21
import com.google.gwt.json.client.JSONObject;
22
import com.google.gwt.json.client.JSONParser;
23
import com.google.gwt.user.client.ui.TreeItem;
24

    
25

    
26
/**
27
 * @author kman
28
 *
29
 */
30
public class GroupUserResource extends RestResource{
31

    
32
        public GroupUserResource(String aUri) {
33
                super(aUri);
34
        }
35

    
36
        String username;
37
        String name;
38
        String home;
39

    
40
        /**
41
         * Retrieve the username.
42
         *
43
         * @return the username
44
         */
45
        public String getUsername() {
46
                return username;
47
        }
48

    
49
        /**
50
         * Modify the username.
51
         *
52
         * @param aUsername the username to set
53
         */
54
        public void setUsername(String aUsername) {
55
                username = aUsername;
56
        }
57

    
58
        /**
59
         * Retrieve the name.
60
         *
61
         * @return the name
62
         */
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

    
107
        /**
108
         * Bugzilla – Bug 371, Add history support for folder navigation
109
         */
110
        public void updateHistoryAbs(TreeItem item, String path){
111
                throw new UnsupportedOperationException();
112
        }
113

    
114
}