-
- All Implemented Interfaces:
-
java.io.Serializable
public class SceneBean implements Serializable
Created by letian on 2016/10/17.
-
-
Field Summary
Fields Modifier and Type Field Description public final static int
MATCH_TYPE_OR
public final static int
MATCH_TYPE_AND
public final static int
MATCH_TYPE_BY_EXPR
public final static int
RULEGENRE_TYPE_MANUAL
public final static int
RULEGENRE_TYPE_SMART
public final static int
SCENE_STATE_NORMAL
public final static int
SCENE_STATE_INVALID
public final static int
SCENE_STATE_EXCEPTION
private String
id
private String
name
private String
code
private boolean
enabled
private String
background
private boolean
stickyOnTop
private List<SceneCondition>
conditions
private List<SceneTask>
actions
private int
matchType
private boolean
boundForPanel
private List<PreCondition>
preConditions
private boolean
localLinkage
public boolean
newLocalScene
private int
ruleGenre
private String
coverIcon
private String
displayColor
private long
disableTime
private String
recomDescription
private int
recomCoefficient
private boolean
boundForWiFiPanel
private int
panelType
private boolean
cached
private String
arrowIconUrl
private String
hotCount
private int
outOfWork
private int
linkageType
-
Method Summary
Modifier and Type Method Description String
getId()
获取场景id void
setId(String id)
String
getName()
获取场景名称 void
setName(String name)
设置场景名称 String
getCode()
void
setCode(String code)
void
setEnabled(boolean enabled)
String
getBackground()
void
setBackground(String background)
void
setStickyOnTop(boolean stickyOnTop)
List<SceneCondition>
getConditions()
获取场景条件 void
setConditions(List<SceneCondition> conditions)
设置场景条件 List<SceneTask>
getActions()
获取场景任务 void
setActions(List<SceneTask> actions)
int
getMatchType()
void
setMatchType(int matchType)
void
setBoundForPanel(boolean boundForPanel)
List<PreCondition>
getPreConditions()
void
setPreConditions(List<PreCondition> preConditions)
void
setLocalLinkage(boolean localLinkage)
void
setNewLocalScene(boolean newLocalScene)
int
getRuleGenre()
获取智能类型场景为:RULEGENRE_TYPE_MANUAL,自动化为:RULEGENRE_TYPE_SMART void
setRuleGenre(int ruleGenre)
String
getCoverIcon()
void
setCoverIcon(String coverIcon)
String
getDisplayColor()
void
setDisplayColor(String displayColor)
long
getDisableTime()
void
setDisableTime(long disableTime)
String
getRecomDescription()
void
setRecomDescription(String recomDescription)
int
getRecomCoefficient()
void
setRecomCoefficient(int recomCoefficient)
void
setBoundForWiFiPanel(boolean boundForWiFiPanel)
int
getPanelType()
void
setPanelType(int panelType)
void
setCached(boolean cached)
String
getArrowIconUrl()
void
setArrowIconUrl(String arrowIconUrl)
String
getHotCount()
void
setHotCount(String hotCount)
int
getOutOfWork()
void
setOutOfWork(int outOfWork)
int
getLinkageType()
void
setLinkageType(int linkageType)
static SceneBean
createSceneBean(String name, String background, List<SceneCondition> conditions, List<SceneTask> tasks, int matchType)
create object of scene static SceneBean
createSceneBean(String name, String id, boolean stickyOnTop, String background, List<SceneCondition> conditions, List<SceneTask> tasks, int matchType)
create object of scene static SceneBean
createSceneBean(String name, String id, boolean stickyOnTop, String background, List<SceneCondition> conditions, List<SceneTask> tasks, List<PreCondition> preConditions, int matchType)
create object of scene static SceneBean
createSceneBean(String name, String id, boolean stickyOnTop, String background, String displayColor, String coverIcon, List<SceneCondition> conditions, List<SceneTask> tasks, List<PreCondition> preConditions, int matchType)
create object of scene boolean
isEnabled()
boolean
isStickyOnTop()
boolean
isBoundForPanel()
boolean
isLocalLinkage()
boolean
isNewLocalScene()
boolean
isBoundForWiFiPanel()
boolean
isCached()
-
-
Method Detail
-
getId
String getId()
获取场景id
-
setId
void setId(String id)
-
getName
String getName()
获取场景名称
-
setName
void setName(String name)
设置场景名称
- Parameters:
name
- 场景名称
-
getCode
String getCode()
-
setCode
void setCode(String code)
-
setEnabled
void setEnabled(boolean enabled)
-
getBackground
String getBackground()
-
setBackground
void setBackground(String background)
-
setStickyOnTop
void setStickyOnTop(boolean stickyOnTop)
-
getConditions
List<SceneCondition> getConditions()
获取场景条件
-
setConditions
void setConditions(List<SceneCondition> conditions)
设置场景条件
- Parameters:
conditions
- 场景条件(目前仅支持)
-
getActions
List<SceneTask> getActions()
获取场景任务
-
setActions
void setActions(List<SceneTask> actions)
-
getMatchType
int getMatchType()
-
setMatchType
void setMatchType(int matchType)
-
setBoundForPanel
void setBoundForPanel(boolean boundForPanel)
-
getPreConditions
List<PreCondition> getPreConditions()
-
setPreConditions
void setPreConditions(List<PreCondition> preConditions)
-
setLocalLinkage
void setLocalLinkage(boolean localLinkage)
-
setNewLocalScene
void setNewLocalScene(boolean newLocalScene)
-
getRuleGenre
int getRuleGenre()
获取智能类型场景为:RULEGENRE_TYPE_MANUAL,自动化为:RULEGENRE_TYPE_SMART
-
setRuleGenre
void setRuleGenre(int ruleGenre)
-
getCoverIcon
String getCoverIcon()
-
setCoverIcon
void setCoverIcon(String coverIcon)
-
getDisplayColor
String getDisplayColor()
-
setDisplayColor
void setDisplayColor(String displayColor)
-
getDisableTime
long getDisableTime()
-
setDisableTime
void setDisableTime(long disableTime)
-
getRecomDescription
String getRecomDescription()
-
setRecomDescription
void setRecomDescription(String recomDescription)
-
getRecomCoefficient
int getRecomCoefficient()
-
setRecomCoefficient
void setRecomCoefficient(int recomCoefficient)
-
setBoundForWiFiPanel
void setBoundForWiFiPanel(boolean boundForWiFiPanel)
-
getPanelType
int getPanelType()
-
setPanelType
void setPanelType(int panelType)
-
setCached
void setCached(boolean cached)
-
getArrowIconUrl
String getArrowIconUrl()
-
setArrowIconUrl
void setArrowIconUrl(String arrowIconUrl)
-
getHotCount
String getHotCount()
-
setHotCount
void setHotCount(String hotCount)
-
getOutOfWork
int getOutOfWork()
-
setOutOfWork
void setOutOfWork(int outOfWork)
-
getLinkageType
int getLinkageType()
-
setLinkageType
void setLinkageType(int linkageType)
-
createSceneBean
static SceneBean createSceneBean(String name, String background, List<SceneCondition> conditions, List<SceneTask> tasks, int matchType)
create object of scene
- Parameters:
name
- The name of sceneconditions
- Conditions for scene execution com.thingclips.smart.home.sdk.bean.scene.SceneConditiontasks
- Tasks that the scene will perform com.thingclips.smart.home.sdk.bean.scene.SceneTask
-
createSceneBean
static SceneBean createSceneBean(String name, String id, boolean stickyOnTop, String background, List<SceneCondition> conditions, List<SceneTask> tasks, int matchType)
create object of scene
- Parameters:
name
- The name of sceneid
- The id of sceneconditions
- Conditions for scene execution com.thingclips.smart.home.sdk.bean.scene.SceneConditiontasks
- Tasks that the scene will perform com.thingclips.smart.home.sdk.bean.scene.SceneTask
-
createSceneBean
static SceneBean createSceneBean(String name, String id, boolean stickyOnTop, String background, List<SceneCondition> conditions, List<SceneTask> tasks, List<PreCondition> preConditions, int matchType)
create object of scene
- Parameters:
name
- The name of sceneid
- The id of scenestickyOnTop
- Flag for whether the scene is displayed on the home pagebackground
- The background of sceneconditions
- Conditions for scene execution com.thingclips.smart.home.sdk.bean.scene.SceneConditiontasks
- Tasks that the scene will perform com.thingclips.smart.home.sdk.bean.scene.SceneTaskpreConditions
- Preconditions for scene execution com.thingclips.smart.home.sdk.bean.scene.PreConditionmatchType
- Type of condition met
-
createSceneBean
static SceneBean createSceneBean(String name, String id, boolean stickyOnTop, String background, String displayColor, String coverIcon, List<SceneCondition> conditions, List<SceneTask> tasks, List<PreCondition> preConditions, int matchType)
create object of scene
- Parameters:
name
- The name of sceneid
- Teh id of scenestickyOnTop
- Flag for whether the scene is displayed on the home pagebackground
- The background of scenedisplayColor
- The theme color of scenecoverIcon
- The icon of sceneconditions
- Conditions for scene execution com.thingclips.smart.home.sdk.bean.scene.SceneConditiontasks
- Tasks that the scene will perform com.thingclips.smart.home.sdk.bean.scene.SceneTaskpreConditions
- Preconditions for scene execution com.thingclips.smart.home.sdk.bean.scene.PreConditionmatchType
- Type of condition met
-
isEnabled
boolean isEnabled()
-
isStickyOnTop
boolean isStickyOnTop()
-
isBoundForPanel
boolean isBoundForPanel()
-
isLocalLinkage
boolean isLocalLinkage()
-
isNewLocalScene
boolean isNewLocalScene()
-
isBoundForWiFiPanel
boolean isBoundForWiFiPanel()
-
isCached
boolean isCached()
-
-
-
-