-
- All Implemented Interfaces:
-
java.io.Serializable
public class SceneBean implements SerializableCreated by letian on 2016/10/17.
-
-
Field Summary
Fields Modifier and Type Field Description public final static intMATCH_TYPE_ORpublic final static intMATCH_TYPE_ANDpublic final static intMATCH_TYPE_BY_EXPRpublic final static intRULEGENRE_TYPE_MANUALpublic final static intRULEGENRE_TYPE_SMARTpublic final static intSCENE_STATE_NORMALpublic final static intSCENE_STATE_INVALIDpublic final static intSCENE_STATE_EXCEPTIONprivate Stringidprivate Stringnameprivate Stringcodeprivate booleanenabledprivate Stringbackgroundprivate booleanstickyOnTopprivate List<SceneCondition>conditionsprivate List<SceneTask>actionsprivate intmatchTypeprivate booleanboundForPanelprivate List<PreCondition>preConditionsprivate booleanlocalLinkagepublic booleannewLocalSceneprivate intruleGenreprivate StringcoverIconprivate StringdisplayColorprivate longdisableTimeprivate StringrecomDescriptionprivate intrecomCoefficientprivate booleanboundForWiFiPanelprivate intpanelTypeprivate booleancachedprivate StringarrowIconUrlprivate StringhotCountprivate intoutOfWorkprivate intlinkageType
-
Method Summary
Modifier and Type Method Description StringgetId()获取场景id voidsetId(String id)StringgetName()获取场景名称 voidsetName(String name)设置场景名称 StringgetCode()voidsetCode(String code)voidsetEnabled(boolean enabled)StringgetBackground()voidsetBackground(String background)voidsetStickyOnTop(boolean stickyOnTop)List<SceneCondition>getConditions()获取场景条件 voidsetConditions(List<SceneCondition> conditions)设置场景条件 List<SceneTask>getActions()获取场景任务 voidsetActions(List<SceneTask> actions)intgetMatchType()voidsetMatchType(int matchType)voidsetBoundForPanel(boolean boundForPanel)List<PreCondition>getPreConditions()voidsetPreConditions(List<PreCondition> preConditions)voidsetLocalLinkage(boolean localLinkage)voidsetNewLocalScene(boolean newLocalScene)intgetRuleGenre()获取智能类型场景为:RULEGENRE_TYPE_MANUAL,自动化为:RULEGENRE_TYPE_SMART voidsetRuleGenre(int ruleGenre)StringgetCoverIcon()voidsetCoverIcon(String coverIcon)StringgetDisplayColor()voidsetDisplayColor(String displayColor)longgetDisableTime()voidsetDisableTime(long disableTime)StringgetRecomDescription()voidsetRecomDescription(String recomDescription)intgetRecomCoefficient()voidsetRecomCoefficient(int recomCoefficient)voidsetBoundForWiFiPanel(boolean boundForWiFiPanel)intgetPanelType()voidsetPanelType(int panelType)voidsetCached(boolean cached)StringgetArrowIconUrl()voidsetArrowIconUrl(String arrowIconUrl)StringgetHotCount()voidsetHotCount(String hotCount)intgetOutOfWork()voidsetOutOfWork(int outOfWork)intgetLinkageType()voidsetLinkageType(int linkageType)static SceneBeancreateSceneBean(String name, String background, List<SceneCondition> conditions, List<SceneTask> tasks, int matchType)create object of scene static SceneBeancreateSceneBean(String name, String id, boolean stickyOnTop, String background, List<SceneCondition> conditions, List<SceneTask> tasks, int matchType)create object of scene static SceneBeancreateSceneBean(String name, String id, boolean stickyOnTop, String background, List<SceneCondition> conditions, List<SceneTask> tasks, List<PreCondition> preConditions, int matchType)create object of scene static SceneBeancreateSceneBean(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 booleanisEnabled()booleanisStickyOnTop()booleanisBoundForPanel()booleanisLocalLinkage()booleanisNewLocalScene()booleanisBoundForWiFiPanel()booleanisCached()-
-
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()
-
-
-
-