]> git.basschouten.com Git - openhab-addons.git/blob
832fec95b07e2450651768d421eccecd94c87bef
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.bticinosmarther.internal.config;
14
15 /**
16  * The {@code SmartherModuleConfiguration} class defines the internal configuration of a {@code SmartherModuleHandler}
17  * instance.
18  *
19  * @author Fabio Possieri - Initial contribution
20  */
21 public class SmartherModuleConfiguration {
22
23     private String plantId;
24     private String moduleId;
25     private boolean settingsAutoupdate;
26     private int programsRefreshPeriod;
27     private int numberOfEndDays;
28     private int statusRefreshPeriod;
29
30     /**
31      * Returns the location plant identifier.
32      *
33      * @return a string containing the plant identifier
34      */
35     public String getPlantId() {
36         return plantId;
37     }
38
39     /**
40      * Sets the location plant identifier.
41      *
42      * @param plantId
43      *            the new plant identifier
44      */
45     public void setPlantId(String plantId) {
46         this.plantId = plantId;
47     }
48
49     /**
50      * Returns the chronothermostat module identifier.
51      *
52      * @return a string containing the module identifier
53      */
54     public String getModuleId() {
55         return moduleId;
56     }
57
58     /**
59      * Sets the chronothermostat module identifier.
60      *
61      * @param moduleId
62      *            the new module identifier
63      */
64     public void setModuleId(String moduleId) {
65         this.moduleId = moduleId;
66     }
67
68     /**
69      * Tells whether the Module settings are updated with its status.
70      *
71      * @return {@code true} if the settings are updated whenever the module status is updated, {@code false} if the
72      *         settings are updated only upon module initialization
73      */
74     public boolean isSettingsAutoupdate() {
75         return settingsAutoupdate;
76     }
77
78     /**
79      * Sets whether the Module settings are updated with its status.
80      *
81      * @param settingsAutoupdate
82      *            {@code true} if the settings are updated whenever the module status is updated, {@code false} if the
83      *            settings are updated only upon module initialization
84      */
85     public void setSettingsAutoupdate(boolean settingsAutoupdate) {
86         this.settingsAutoupdate = settingsAutoupdate;
87     }
88
89     /**
90      * Returns the automatic mode programs refresh period (in hours).
91      *
92      * @return the automatic mode programs refresh period
93      */
94     public int getProgramsRefreshPeriod() {
95         return programsRefreshPeriod;
96     }
97
98     /**
99      * Sets the automatic mode programs refresh period (in hours).
100      *
101      * @param programsRefreshPeriod
102      *            the new automatic mode programs refresh period
103      */
104     public void setProgramsRefreshPeriod(int programsRefreshPeriod) {
105         this.programsRefreshPeriod = programsRefreshPeriod;
106     }
107
108     /**
109      * Returns the number of end days to be displayed in manual mode.
110      *
111      * @return the number of end days to be displayed
112      */
113     public int getNumberOfEndDays() {
114         return numberOfEndDays;
115     }
116
117     /**
118      * Sets the number of end days to be displayed in manual mode.
119      *
120      * @param numberOfEndDays
121      *            the new number of end days to be displayed
122      */
123     public void setNumberOfEndDays(int numberOfEndDays) {
124         this.numberOfEndDays = numberOfEndDays;
125     }
126
127     /**
128      * Returns the Module status refresh period (in minutes).
129      *
130      * @return the Module status refresh period
131      */
132     public int getStatusRefreshPeriod() {
133         return statusRefreshPeriod;
134     }
135
136     /**
137      * Sets the Module status refresh period (in minutes).
138      *
139      * @param statusRefreshPeriod
140      *            the new Module status refresh period
141      */
142     public void setStatusRefreshPeriod(int statusRefreshPeriod) {
143         this.statusRefreshPeriod = statusRefreshPeriod;
144     }
145 }