James Moger
2012-09-10 fabe060d3a435f116128851f828e35c2af5fde67
commit | author | age
797322 1 /*
JM 2  * Copyright 2011 gitblit.com.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package com.gitblit.models;
17
18 import java.io.Serializable;
19 import java.util.List;
20
21 /**
22  * Represents a Gravatar profile.
23  * 
24  * @author James Moger
25  * 
26  */
27 public class GravatarProfile implements Serializable {
28
29     private static final long serialVersionUID = 1L;
30
31     public String id;
32     public String hash;
33     public String requestHash;
34     public String displayName;
35     public String preferredUsername;
36     public String currentLocation;
37     public String aboutMe;
38     
39     public String profileUrl;
40     public String thumbnailUrl;
41     public List<ProfileObject> photos;
42 //    public Map<String, String> profileBackground;
43 //    public Map<String, String> name;
44
45     public List<ProfileObject> phoneNumbers;
46     public List<ProfileObject> emails;
47     public List<ProfileObject> ims;
48     public List<Account> accounts;
49     public List<ProfileObject> urls;
50
51     public static class ProfileObject implements Serializable {
52
53         private static final long serialVersionUID = 1L;
54
55         public String title;
56         public String type;
57         public String value;
58         public boolean primary;
59
60         @Override
61         public String toString() {
62             return value;
63         }
64     }
65
66     public static class Account implements Serializable {
67
68         private static final long serialVersionUID = 1L;
69
70         public String domain;
71         public String display;
72         public String url;
73         public String username;
74         public String userid;
75         public boolean verified;
76         public String shortname;
77
78         @Override
79         public String toString() {
80             return display;
81         }
82     }
83 }