public static final class SharedContent.Builder
- Object
- SharedContent.Builder
Builder for
SharedContent. Used by the platform ports.Constructors
public Builder() |
Methods
Inherited methods
Constructor details
Builder
public Builder()Method details
subject
public SharedContent.Builder subject(String s)Sets the subject.
Parameters
sString- the subject
Returns
this builder for chaining
addText
public SharedContent.Builder addText(String text)Adds a text item.
Parameters
textString- the text
Returns
this builder for chaining
addUrl
public SharedContent.Builder addUrl(String url)Adds a URL item.
Parameters
urlString- the URL
Returns
this builder for chaining
addFile
public SharedContent.Builder addFile(String mime, String cn1Path, String title)Adds a file item.
Parameters
mimeString- the MIME type, or null
cn1PathString- the
FileSystemStoragepath of the copied file titleString- 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
mimeString- the MIME type, or null
cn1PathString- the
FileSystemStoragepath of the copied image titleString- an optional title, or null
Returns
this builder for chaining
build
public SharedContent build()Builds the immutable shared content.
Returns
the shared content