Package org.brickred.socialauth.util

Examples of org.brickred.socialauth.util.BirthDate


        }
        if (pObj.has("birthdate")) {
          String dstr = pObj.getString("birthdate");
          if (dstr != null) {
            String arr[] = dstr.split("/");
            BirthDate bd = new BirthDate();
            if (arr.length > 0) {
              bd.setMonth(Integer.parseInt(arr[0]));
            }
            if (arr.length > 1) {
              bd.setDay(Integer.parseInt(arr[1]));
            }
            profile.setDob(bd);
          }
        }
        if (pObj.has("image")) {
View Full Code Here


        Element dobel = (Element) dob.item(0);
        if (dobel != null) {
          String y = XMLParseUtil.getElementData(dobel, "year");
          String m = XMLParseUtil.getElementData(dobel, "month");
          String d = XMLParseUtil.getElementData(dobel, "day");
          BirthDate bd = new BirthDate();
          if (m != null) {
            bd.setMonth(Integer.parseInt(m));
          }
          if (d != null) {
            bd.setDay(Integer.parseInt(d));
          }
          if (y != null) {
            bd.setYear(Integer.parseInt(y));
          }
          profile.setDob(bd);
        }
      }
      String picUrl = XMLParseUtil.getElementData(root, "picture-url");
View Full Code Here

        p.setLocation(resp.getJSONObject("location").getString("name"));
      }
      if (resp.has("birthday")) {
        String bstr = resp.getString("birthday");
        String[] arr = bstr.split("/");
        BirthDate bd = new BirthDate();
        if (arr.length > 0) {
          bd.setMonth(Integer.parseInt(arr[0]));
        }
        if (arr.length > 1) {
          bd.setDay(Integer.parseInt(arr[1]));
        }
        if (arr.length > 2) {
          bd.setYear(Integer.parseInt(arr[2]));
        }
        p.setDob(bd);
      }
      if (resp.has("gender")) {
        p.setGender(resp.getString("gender"));
View Full Code Here

            DateFormat df = new SimpleDateFormat(
                "EEE, dd MMM yyyy hh:mm:ss");
            Date d = df.parse(bstr);
            Calendar c = Calendar.getInstance();
            c.setTime(d);
            BirthDate bd = new BirthDate();
            bd.setDay(c.get(Calendar.DAY_OF_MONTH));
            bd.setYear(c.get(Calendar.YEAR));
            bd.setMonth(c.get(Calendar.MONTH) + 1);
            p.setDob(bd);
          }
        }
      }
      if (resp.has("gender")) {
View Full Code Here

      }
      if (resp.has("birth_date")) {
        String dstr = resp.getString("birth_date");
        if (dstr != null) {
          String arr[] = dstr.split("\\s+");
          BirthDate bd = new BirthDate();
          if (arr.length == 1) {
            Calendar currentDate = Calendar.getInstance();
            bd.setMonth(currentDate.get(Calendar.MONTH) + 1);
            bd.setDay(currentDate.get(Calendar.DAY_OF_MONTH));
          } else {
            if (arr.length > 0) {
              bd.setDay(Integer.parseInt(arr[1]));
            }
            if (arr.length > 1) {
              bd.setMonth(new Integer(SocialAuthUtil
                  .getMonthInInt(arr[0])));
            }
          }
          p.setDob(bd);
        }
View Full Code Here

      if (resp.has("ThumbnailImageLink")) {
        p.setProfileImageURL(resp.getString("ThumbnailImageLink"));
      }

      if (resp.has("birth_day") && !resp.isNull("birth_day")) {
        BirthDate bd = new BirthDate();
        bd.setDay(resp.getInt("birth_day"));
        if (resp.has("birth_month") && !resp.isNull("birth_month")) {
          bd.setMonth(resp.getInt("birth_month"));
        }
        if (resp.has("birth_year") && !resp.isNull("birth_year")) {
          bd.setYear(resp.getInt("birth_year"));
        }
        p.setDob(bd);
      }

      if (resp.has("emails")) {
View Full Code Here

        Element dobel = (Element) dob.item(0);
        if (dobel != null) {
          String y = XMLParseUtil.getElementData(dobel, "year");
          String m = XMLParseUtil.getElementData(dobel, "month");
          String d = XMLParseUtil.getElementData(dobel, "day");
          BirthDate bd = new BirthDate();
          if (m != null) {
            bd.setMonth(Integer.parseInt(m));
          }
          if (d != null) {
            bd.setDay(Integer.parseInt(d));
          }
          if (y != null) {
            bd.setYear(Integer.parseInt(y));
          }
          profile.setDob(bd);
        }
      }
      String picUrl = XMLParseUtil.getElementData(root, "picture-url");
View Full Code Here

      if (resp.has("ThumbnailImageLink")) {
        p.setProfileImageURL(resp.getString("ThumbnailImageLink"));
      }

      if (resp.has("birth_day") && !resp.isNull("birth_day")) {
        BirthDate bd = new BirthDate();
        bd.setDay(resp.getInt("birth_day"));
        if (resp.has("birth_month") && !resp.isNull("birth_month")) {
          bd.setMonth(resp.getInt("birth_month"));
        }
        if (resp.has("birth_year") && !resp.isNull("birth_year")) {
          bd.setYear(resp.getInt("birth_year"));
        }
        p.setDob(bd);
      }

      if (resp.has("emails")) {
View Full Code Here

TOP

Related Classes of org.brickred.socialauth.util.BirthDate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.