You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GravatarProfile.java 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  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. import java.io.Serializable;
  18. import java.util.List;
  19. /**
  20. * Represents a Gravatar profile.
  21. *
  22. * @author James Moger
  23. *
  24. */
  25. public class GravatarProfile implements Serializable {
  26. private static final long serialVersionUID = 1L;
  27. public String id;
  28. public String hash;
  29. public String requestHash;
  30. public String displayName;
  31. public String preferredUsername;
  32. public String currentLocation;
  33. public String aboutMe;
  34. public String profileUrl;
  35. public String thumbnailUrl;
  36. public List<ProfileObject> photos;
  37. // public Map<String, String> profileBackground;
  38. // public Map<String, String> name;
  39. public List<ProfileObject> phoneNumbers;
  40. public List<ProfileObject> emails;
  41. public List<ProfileObject> ims;
  42. public List<Account> accounts;
  43. public List<ProfileObject> urls;
  44. public static class ProfileObject implements Serializable {
  45. private static final long serialVersionUID = 1L;
  46. public String title;
  47. public String type;
  48. public String value;
  49. public boolean primary;
  50. @Override
  51. public String toString() {
  52. return value;
  53. }
  54. }
  55. public static class Account implements Serializable {
  56. private static final long serialVersionUID = 1L;
  57. public String domain;
  58. public String display;
  59. public String url;
  60. public String username;
  61. public String userid;
  62. public boolean verified;
  63. public String shortname;
  64. @Override
  65. public String toString() {
  66. return display;
  67. }
  68. }
  69. }