The builder for Action
.
Constant Summary
String | ACTIVATE_ACTION | The act of starting, or activating something. |
String | ADD_ACTION | The act of editing by adding something to a collection (For example, an item to a shopping cart, or movie to a queue). |
String | BOOKMARK_ACTION | The act of bookmarking something (For example, an article, or song). |
String | COMMENT_ACTION | The act of commenting on something (For example, an article, or social media post). |
String | LIKE_ACTION | The act of liking something (For example, a book, song, or article). |
String | LISTEN_ACTION | The act of listening to something (For example, music, or a podcast). |
String | SEND_ACTION | The act of sending a message. |
String | SHARE_ACTION | The act of sharing something (For example, a document, or social media post) |
String | STATUS_TYPE_ACTIVE | The status of an active action (For example, an action that has started but not yet completed). |
String | STATUS_TYPE_COMPLETED | The status of a completed action. |
String | STATUS_TYPE_FAILED | The status of a failed action. |
String | VIEW_ACTION | The act of viewing something (For example, an article, or profile). |
String | WATCH_ACTION | The act of watching something (For example, a video, movie, or TV show). |
Public Constructor Summary
Public Method Summary
Action | |
Action.Builder | |
Action.Builder | |
Action.Builder | |
Action.Builder | |
Action.Builder | |
Action.Builder | |
final Action.Builder | |
Action.Builder | |
Action.Builder | |
Action.Builder | |
final Action.Builder |
Inherited Method Summary
Constants
public static final String ACTIVATE_ACTION
The act of starting, or activating something.
public static final String ADD_ACTION
The act of editing by adding something to a collection (For example, an item to a shopping cart, or movie to a queue).
public static final String BOOKMARK_ACTION
The act of bookmarking something (For example, an article, or song).
public static final String COMMENT_ACTION
The act of commenting on something (For example, an article, or social media post).
public static final String LIKE_ACTION
The act of liking something (For example, a book, song, or article).
public static final String LISTEN_ACTION
The act of listening to something (For example, music, or a podcast).
public static final String SEND_ACTION
The act of sending a message.
public static final String SHARE_ACTION
The act of sharing something (For example, a document, or social media post)
public static final String STATUS_TYPE_ACTIVE
The status of an active action (For example, an action that has started but not yet completed).
public static final String STATUS_TYPE_COMPLETED
The status of a completed action.
public static final String STATUS_TYPE_FAILED
The status of a failed action.
public static final String VIEW_ACTION
The act of viewing something (For example, an article, or profile).
public static final String WATCH_ACTION
The act of watching something (For example, a video, movie, or TV show).
Public Constructors
public Builder ( String type)
The constructor.
Parameters
Public Methods
public Action build ()
Builds the action.
public Action.Builder put ( String key, double... values)
Sets one or multiple double values for a property, replacing its previous values.
Parameters
key | The property. Must not be null. |
---|---|
values | The double values of the property. |
public Action.Builder put ( String key, Indexable... values)
Sets one or multiple Indexable
values for a property, replacing its previous values.
Parameters
key | The schema.org property. Must not be null. |
---|---|
values | The values represented as an Indexable
.
Null values are ignored. Indexable
values must be constructed using Indexable.Builder
or convenience methods. |
public Action.Builder put ( String key, boolean... values)
Sets one or multiple boolean values for a property, replacing its previous values.
Parameters
key | The property. Must not be null. |
---|---|
values | The boolean values of the property. |
public Action.Builder put ( String key, String... values)
Sets one or multiple string values for a property, replacing its previous values.
Parameters
key | The property. Must not be null. |
---|---|
values | The string values of the property. Null values are ignored. |
public Action.Builder put ( String key, long... values)
Sets one or multiple long values for a property, replacing its previous values.
Parameters
key | The property. Must not be null. |
---|---|
values | The long values of the property. |
public Action.Builder setActionStatus ( String actionStatus)
Sets the status of the action. Optional.
public final Action.Builder setName ( String name)
Sets the name of the action (For example, Ride using Waymo LLC).
public Action.Builder setObject ( String name, String url)
Sets the object that the action is taken on (For example, the article being viewed, or the song being listened to).
Parameters
name | The name of the object (For example, the title of an article, or name of a song). Must not be null. |
---|---|
url | The URL of the object (this URL needs to be handled by the app to take the user to the right place). Must be a valid URL. |
public Action.Builder setObject ( String name, String url, String webUrl)
Sets the object that the action is taken on (For example, the article being viewed, or the song being listened to).
Parameters
name | The name of the object (For example, the title of an article, or name of a song). Must not be null. |
---|---|
url | The URL of the object (this URL needs to be handled by the app to take the user to the right place). Must be a valid URL. |
webUrl | The web URL of the object, if different from url
. Must be a valid
URL. |
public Action.Builder setResult ( Indexable... values)
Sets the result of the action. Optional.
Parameters
public final Action.Builder setUrl ( String url)
Sets the URL of the action.
Must match Object URL when both are set.