From 016a82ee690b91daf7b5aabd7d2b202161e4a58c Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Mon, 15 Aug 2011 13:35:36 -0400 Subject: [PATCH] Adding main java --- HomeAutomation.java | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 HomeAutomation.java diff --git a/HomeAutomation.java b/HomeAutomation.java new file mode 100644 index 0000000..2fb08f1 --- /dev/null +++ b/HomeAutomation.java @@ -0,0 +1,27 @@ +import java.io.FileInputStream; +import java.util.Properties; + +import com.matthewhuntington.homeautomation.*; + +public class HomeAutomation +{ + + /** + * @param args + */ + public static void main(String[] args) + { + Properties properties = new Properties(); + try + { + properties.load(new FileInputStream("login.properties")); + CalendarParser parser = new CalendarParser(properties.getProperty("calendar"), properties.getProperty("user"), properties.getProperty("pass")); + ActionExecutor executor = new ActionExecutor(parser.getActions()); + executor.executeAll(); + } + catch (Exception e) + { + System.out.println("Could not load properties file."); + } + } +} \ No newline at end of file