package com.ciandt.techgallery.service.model;

import java.io.Serializable;
import java.util.List;

/**
 * Response with an user entity.
 * 
 * @author felipers
 *
 */
@SuppressWarnings("serial")
public class UserResponse implements Response, Serializable {

  /** user id. */
  private Long id;
  /** user name. */
  private String name;
  /** user email. */
  private String email;
  /** user photo url. */
  private String photo;
  /** user is admin. */
  private boolean admin;
  /** Followed technologies. */
  private List<String> followedTechIds;
  /** save the preference of user. */
  private Boolean postGooglePlusPreference;

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public Boolean getPostGooglePlusPreference() {
    return postGooglePlusPreference;
  }

  public void setPostGooglePlusPreference(Boolean postGooglePlusPreference) {
    this.postGooglePlusPreference = postGooglePlusPreference;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public String getPhoto() {
    return photo;
  }

  public void setPhoto(String photo) {
    this.photo = photo;
  }

  public boolean isAdmin() {
    return admin;
  }

  public void setAdmin(boolean admin) {
    this.admin = admin;
  }

  public List<String> getFollowedTechIds() {
    return followedTechIds;
  }

  public void setFollowedTechIds(List<String> followedTechIds) {
    this.followedTechIds = followedTechIds;
  }
}

@@ -628,16 +628,43 @@
 ference;
+%0A  %0A  private String login;
 %0A%0A  publ
@@ -1192,24 +1192,111 @@
 ng email) %7B%0A
+    if(email!=null && email.contains(%22@%22))%7B%0A      setLogin(email.split(%22@%22)%5B0%5D);%0A    %7D%0A
     this.ema
@@ -1692,24 +1692,24 @@
 dTechIds) %7B%0A
-
     this.fol
@@ -1743,11 +1743,131 @@
 Ids;%0A  %7D
+%0A%0A  public String getLogin() %7B%0A    return login;%0A  %7D%0A%0A  public void setLogin(String login) %7B%0A    this.login = login;%0A  %7D
 %0A%7D%0A

Send login information to frontend