public static final class SharedContent.Builder

  1. Object
  2. SharedContent.Builder
Builder for SharedContent. Used by the platform ports.

Constructors

public Builder()

Methods

public SharedContent.Builder subject(String s)Sets the subject.
public SharedContent.Builder addText(String text)Adds a text item.
public SharedContent.Builder addUrl(String url)Adds a URL item.
public SharedContent.Builder addFile(String mime, String cn1Path, String title)Adds a file item.
public SharedContent.Builder addImage(String mime, String cn1Path, String title)Adds an image item.
public SharedContent build()Builds the immutable shared content.

Inherited methods

Constructor details

Builder

public Builder()

Method details

subject

public SharedContent.Builder subject(String s)
Sets the subject.

Parameters

s String
the subject

Returns

this builder for chaining

addText

public SharedContent.Builder addText(String text)
Adds a text item.

Parameters

text String
the text

Returns

this builder for chaining

addUrl

public SharedContent.Builder addUrl(String url)
Adds a URL item.

Parameters

url String
the URL

Returns

this builder for chaining

addFile

public SharedContent.Builder addFile(String mime, String cn1Path, String title)
Adds a file item.

Parameters

mime String
the MIME type, or null
cn1Path String
the FileSystemStorage path of the copied file
title String
an optional title, or null

Returns

this builder for chaining

addImage

public SharedContent.Builder addImage(String mime, String cn1Path, String title)
Adds an image item.

Parameters

mime String
the MIME type, or null
cn1Path String
the FileSystemStorage path of the copied image
title String
an optional title, or null

Returns

this builder for chaining

build

public SharedContent build()
Builds the immutable shared content.

Returns

the shared content