]> git.basschouten.com Git - openhab-addons.git/blob
2af8f4873046d3a0e0231a9508c31f829b281b6e
[openhab-addons.git] /
1 /**
2  * Copyright 2017-2018 Gregory Moyer and contributors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.openhab.binding.lametrictime.api.model;
17
18 import org.openhab.binding.lametrictime.api.local.model.UpdateAction;
19
20 public class StopwatchApp extends CoreApplication
21 {
22     private static final String NAME = "com.lametric.stopwatch";
23
24     private static final String ACTION_PAUSE = "stopwatch.pause";
25     private static final String ACTION_RESET = "stopwatch.reset";
26     private static final String ACTION_START = "stopwatch.start";
27
28     public StopwatchApp()
29     {
30         super(NAME);
31     }
32
33     public CoreAction pause()
34     {
35         return new CoreAction(this, new UpdateAction().withId(ACTION_PAUSE));
36     }
37
38     public CoreAction reset()
39     {
40         return new CoreAction(this, new UpdateAction().withId(ACTION_RESET));
41     }
42
43     public CoreAction start()
44     {
45         return new CoreAction(this, new UpdateAction().withId(ACTION_START));
46     }
47 }