Class Person.Builder

java.lang.Object
com.atlassian.gadgets.opensocial.model.Person.Builder
Enclosing class:
Person

public static final class Person.Builder extends Object
A builder that facilitates construction of Person objects. The final Person is returned by the build method
  • Constructor Details

    • Builder

      public Builder(Person person)
      Create a builder initialized with the values from the specified person argument
      Parameters:
      person - the person from which this builder's values should be initialized
    • Builder

      public Builder(PersonId personId)
      Create a builder with the given the PersonId for the Person to be constructed
      Parameters:
      personId - the unique ID of the person being constructed
  • Method Details

    • name

      public Person.Builder name(Name name)
      Set the Name of the Person being constructed
      Parameters:
      name - the full name of the person being constructed
      Returns:
      the builder for futher construction
    • profileUri

      public Person.Builder profileUri(URI uri)
      Set the profile URI of the Person being constructed
      Parameters:
      uri - the profile URI to set
      Returns:
      the builder for further construction
    • thumbnailUri

      public Person.Builder thumbnailUri(URI uri)
      Set the thumbnail URI of the Person being constructed
      Parameters:
      uri - the thumbnail URI to set
      Returns:
      the builder for further construction
    • addresses

      public Person.Builder addresses(List<Address> addresses)
      Set the list of addresses for the Person being constructed
      Parameters:
      addresses - the addresses to set
      Returns:
      the builder for further construction
    • phoneNumbers

      public Person.Builder phoneNumbers(List<PhoneNumber> phoneNumbers)
      Set the list of phone numbers for the Person being constructed
      Parameters:
      phoneNumbers - the phone numbers to set
      Returns:
      the builder for further construction
    • emailAddresses

      public Person.Builder emailAddresses(List<EmailAddress> emailAddresses)
      Sets the list of email addressees for the Person being constructed
      Parameters:
      emailAddresses - the email addresses to set
      Returns:
      the builder for further construction
    • aboutMe

      public Person.Builder aboutMe(String aboutMe)
      Sets the value of the "about me" string for the Person being constructed
      Parameters:
      aboutMe - the text to set for the "about me" blurb
      Returns:
      the builder for further construction
    • status

      public Person.Builder status(String status)
      Sets the value of the person's "status" text
      Parameters:
      status - the text to set for the person's status
      Returns:
      the builder for further construction
    • dateOfBirth

      public Person.Builder dateOfBirth(Date date)
      Sets the person's date of birth
      Parameters:
      date - the date of birth
      Returns:
      the builder for further construction
    • timeZone

      public Person.Builder timeZone(int timeZone)
      Sets the time zone offset for the person. The offset is specified as the difference in minutes from GMT
      Parameters:
      timeZone - the time zone offset for the person.
      Returns:
      the builder for further construction
    • currentLocation

      public Person.Builder currentLocation(Address currentLocation)
      Sets the current location for the person.
      Parameters:
      currentLocation - the location to set, as an Address
      Returns:
      the builder for further construction
    • urls

      public Person.Builder urls(List<URI> urls)
      Sets a list of interesting URLs for the person
      Parameters:
      urls - the URLs for the person
      Returns:
      the builder for further construction
    • build

      public Person build()
      Build the Person
      Returns:
      the constructed Person