com.atlassian.gadgets.opensocial.model
Class Activity.Builder

java.lang.Object
  extended by com.atlassian.gadgets.opensocial.model.Activity.Builder
Enclosing class:
Activity

public static class Activity.Builder
extends Object

A builder that facilitates construction of Activity objects. The final Activity is created by calling the build() method


Constructor Summary
Activity.Builder(Activity activity)
          Create a new Activity.Builder with the same field values as the passed in Activity
Activity.Builder(String title)
          Create a new Activity.Builder that can be used to create an Activity
 
Method Summary
 Activity.Builder appId(AppId appId)
          Set the application (gadget type) id of the Activity under construction and return this Builder to allow further construction to be done.
 Activity.Builder body(String body)
          Set the body of the Activity under construction and return this Builder to allow further construction to be done.
 Activity build()
          Returns the final constructed Activity
 Activity.Builder externalId(String externalId)
          Set the externalId of the Activity under construction and return this Builder to allow further construction to be done.
 Activity.Builder id(ActivityId id)
          Set the id of the Activity under construction and return this Builder to allow further construction to be done.
 Activity.Builder mediaItems(List<MediaItem> mediaItems)
          Set the mediaItems associated with the Activity under construction and return this Builder to allow further construction to be done.
 Activity.Builder postedTime(Long postedTime)
          Set the postedTime of the Activity under construction and return this Builder to allow further construction to be done.
 Activity.Builder priority(Float priority)
          Set the priority of the Activity under construction and return this Builder to allow further construction to be done.
 Activity.Builder streamFaviconUrl(String streamFaviconUrl)
          Set the streamFaviconUrl of the Activity under construction and return this Builder to allow further construction to be done.
 Activity.Builder streamSourceUrl(String streamSourceUrl)
          Set the streamSourceUrl of the Activity under construction and return this Builder to allow further construction to be done.
 Activity.Builder streamTitle(String streamTitle)
          Set the streamTitle of the Activity under construction and return this Builder to allow further construction to be done.
 Activity.Builder streamUrl(String streamUrl)
          Set the streamUrl of the Activity under construction and return this Builder to allow further construction to be done.
 Activity.Builder updated(Date updated)
          Set the updated date of the Activity under construction and return this Builder to allow further construction to be done.
 Activity.Builder url(String url)
          Set the url of the Activity under construction and return this Builder to allow further construction to be done.
 Activity.Builder userId(PersonId userId)
          Set the user id of the Activity under construction and return this Builder to allow further construction to be done.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Activity.Builder

public Activity.Builder(Activity activity)
Create a new Activity.Builder with the same field values as the passed in Activity

Parameters:
activity - the activity whose fields should be copied

Activity.Builder

public Activity.Builder(String title)
Create a new Activity.Builder that can be used to create an Activity

Parameters:
title - the title of the Activity under construction
Method Detail

appId

public Activity.Builder appId(AppId appId)
Set the application (gadget type) id of the Activity under construction and return this Builder to allow further construction to be done.

Parameters:
appId - the application id to use for the Activity
Returns:
this builder to allow for further construction

body

public Activity.Builder body(String body)
Set the body of the Activity under construction and return this Builder to allow further construction to be done.

Parameters:
body - the body to use for the Activity
Returns:
this builder to allow for further construction

externalId

public Activity.Builder externalId(String externalId)
Set the externalId of the Activity under construction and return this Builder to allow further construction to be done.

Parameters:
externalId - the externalId to use for the Activity
Returns:
this builder to allow for further construction

id

public Activity.Builder id(ActivityId id)
Set the id of the Activity under construction and return this Builder to allow further construction to be done.

Parameters:
id - the id to use for the Activity
Returns:
this builder to allow for further construction

updated

public Activity.Builder updated(Date updated)
Set the updated date of the Activity under construction and return this Builder to allow further construction to be done.

Parameters:
updated - the updated date to use for the Activity
Returns:
this builder to allow for further construction

mediaItems

public Activity.Builder mediaItems(List<MediaItem> mediaItems)
Set the mediaItems associated with the Activity under construction and return this Builder to allow further construction to be done.

Parameters:
mediaItems - the media items to use for the Activity
Returns:
this builder to allow for further construction

postedTime

public Activity.Builder postedTime(Long postedTime)
Set the postedTime of the Activity under construction and return this Builder to allow further construction to be done.

Parameters:
postedTime - the postedTime to use for the Activity
Returns:
this builder to allow for further construction

priority

public Activity.Builder priority(Float priority)
Set the priority of the Activity under construction and return this Builder to allow further construction to be done.

Parameters:
priority - the priority to use for the Activity
Returns:
this builder to allow for further construction

streamFaviconUrl

public Activity.Builder streamFaviconUrl(String streamFaviconUrl)
Set the streamFaviconUrl of the Activity under construction and return this Builder to allow further construction to be done.

Parameters:
streamFaviconUrl - the streamFaviconUrl to use for the Activity
Returns:
this builder to allow for further construction

streamSourceUrl

public Activity.Builder streamSourceUrl(String streamSourceUrl)
Set the streamSourceUrl of the Activity under construction and return this Builder to allow further construction to be done.

Parameters:
streamSourceUrl - the streamSourceUrl to use for the Activity
Returns:
this builder to allow for further construction

streamTitle

public Activity.Builder streamTitle(String streamTitle)
Set the streamTitle of the Activity under construction and return this Builder to allow further construction to be done.

Parameters:
streamTitle - the streamTitle to use for the Activity
Returns:
this builder to allow for further construction

streamUrl

public Activity.Builder streamUrl(String streamUrl)
Set the streamUrl of the Activity under construction and return this Builder to allow further construction to be done.

Parameters:
streamUrl - the streamUrl to use for the Activity
Returns:
this builder to allow for further construction

url

public Activity.Builder url(String url)
Set the url of the Activity under construction and return this Builder to allow further construction to be done.

Parameters:
url - the url to use for the Activity
Returns:
this builder to allow for further construction

userId

public Activity.Builder userId(PersonId userId)
Set the user id of the Activity under construction and return this Builder to allow further construction to be done.

Parameters:
userId - the user id to use for the Activity
Returns:
this builder to allow for further construction

build

public Activity build()
Returns the final constructed Activity

Returns:
the Activity


Copyright © 2011 Atlassian. All Rights Reserved.