Spring Social

org.springframework.social.connect
Class UserProfileBuilder

java.lang.Object
  extended by org.springframework.social.connect.UserProfileBuilder

public class UserProfileBuilder
extends java.lang.Object

Builder for constructing a UserProfile instance returned by ApiAdapter.fetchUserProfile(Object) Makes it easy to construct a profile instance where some of the individual fields may be null. Also allows new profile fields to be introduced in the future without breaking compatibility with existing ApiAdapter implementations.

Author:
Keith Donald
See Also:
UserProfile

Constructor Summary
UserProfileBuilder()
           
 
Method Summary
 UserProfile build()
          Builds the user profile.
 UserProfileBuilder setEmail(java.lang.String email)
          Sets the profile email field.
 UserProfileBuilder setFirstName(java.lang.String firstName)
          Sets the profile firstName field.
 UserProfileBuilder setLastName(java.lang.String lastName)
          Sets the profile lastName field.
 UserProfileBuilder setName(java.lang.String name)
          Sets the profile name field.
 UserProfileBuilder setUsername(java.lang.String username)
          Sets the profile username field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserProfileBuilder

public UserProfileBuilder()
Method Detail

setName

public UserProfileBuilder setName(java.lang.String name)
Sets the profile name field. Note: parses the name string and sets the individual firstName and lastName fields as well.


setFirstName

public UserProfileBuilder setFirstName(java.lang.String firstName)
Sets the profile firstName field.


setLastName

public UserProfileBuilder setLastName(java.lang.String lastName)
Sets the profile lastName field.


setEmail

public UserProfileBuilder setEmail(java.lang.String email)
Sets the profile email field.


setUsername

public UserProfileBuilder setUsername(java.lang.String username)
Sets the profile username field.


build

public UserProfile build()
Builds the user profile. Call this method after setting all profile field values.


Spring Social