1 //Create a class for location variable
5 private int contactBookEnabled
11 private List phoneNumbers
14 private Phrase helloHome
16 LocationVar(Closure sendEvent) {
17 this.modes = [[name: "home"],[name: "away"],[name: "night"]]
19 this.helloHome = new Phrase()
20 this.contactBookEnabled = 1
21 this.contacts = ['AJ']
22 this.phoneNumbers = [9495379373]
23 this.sendEvent = sendEvent
24 this.timeZone = TimeZone.getTimeZone("America/New_York")
29 def setValue(LinkedHashMap eventDataMap) {
30 def sentMode = eventDataMap['value']
31 println("The location is changed to $sentMode!")
33 sendEvent(eventDataMap)