public final class CommandForm
extends java.lang.Object
implements android.os.Parcelable
Command
with ThingIFAPI.postNewCommand(CommandForm)
.
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<CommandForm> |
CREATOR |
Constructor and Description |
---|
CommandForm(java.lang.String schemaName,
int schemaVersion,
java.util.List<Action> actions)
Constructs a CommandForm instance.
|
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
java.util.List<Action> |
getActions()
Getter of actions.
|
java.lang.String |
getDescription()
Getter of description.
|
org.json.JSONObject |
getMetadata()
Getter of meta data.
|
java.lang.String |
getSchemaName()
Getter of schema name.
|
int |
getSchemaVersion()
Getter of schema version.
|
java.lang.String |
getTitle()
Getter of titile.
|
CommandForm |
setDescription(java.lang.String description)
Setter of description
|
CommandForm |
setMetadata(org.json.JSONObject metadata)
Setter of meta data.
|
CommandForm |
setTitle(java.lang.String title)
Setter of title
|
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<CommandForm> CREATOR
public CommandForm(java.lang.String schemaName, int schemaVersion, java.util.List<Action> actions) throws java.lang.IllegalArgumentException
schemaName
- name of schema. Must not be null or empty string.schemaVersion
- version of schema.actions
- List of actions. Must not be null or empty.java.lang.IllegalArgumentException
- when schemaName is null or empty
string and/or actions is null or empty.public CommandForm setTitle(java.lang.String title) throws java.lang.IllegalArgumentException
title
- Length of title must be equal or less than 50 characters.java.lang.IllegalArgumentException
- if title is invalid.public CommandForm setDescription(java.lang.String description)
description
- Length of description must be equal or less than
200 characters.java.lang.IllegalArgumentException
- if description is invalid.public CommandForm setMetadata(org.json.JSONObject metadata)
metadata
- meta data of this command.public java.lang.String getSchemaName()
public int getSchemaVersion()
public java.util.List<Action> getActions()
public java.lang.String getTitle()
public java.lang.String getDescription()
public org.json.JSONObject getMetadata()
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable
Copyright 2015 Kii Corporation. All rights reserved. (Last updated on 2016-10-13 08:55 UTC)