mirror of
https://github.com/zyphlar/LanternPowerMonitor.git
synced 2024-03-08 14:07:47 +00:00
Add a rules engine so I can be notified when I forget to close my garage door.
This commit is contained in:
@@ -532,7 +532,6 @@ public class CollectionUtils {
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
public static <T> void edit(Iterable<T> _coll, IEditor<T> _editor) {
|
||||
if ((_coll == null) || (_editor == null))
|
||||
return;
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.lanternsoftware.util;
|
||||
|
||||
public abstract class LanternFiles {
|
||||
public static final String SOURCE_PATH = "C:\\lantern\\wc\\opensource\\LanternPowerMonitor\\";
|
||||
public static final String OPS_PATH = "D:\\zwave\\";
|
||||
// public static final String OPS_PATH = "D:\\zwave\\linux\\";
|
||||
// public static final String OPS_PATH = "/opt/tomcat/";
|
||||
public static final String SOURCE_PATH = "C:\\lantern\\LanternPowerMonitor\\";
|
||||
// public static final String OPS_PATH = "D:\\zwave\\";
|
||||
// public static final String OPS_PATH = "D:\\zwave\\localhost\\";
|
||||
// public static final String OPS_PATH = "D:\\zwave\\mark4770\\";
|
||||
// public static final String OPS_PATH = "D:\\zwave\\prod\\";
|
||||
// public static final String OPS_PATH = "D:\\zwave\\prodremote\\";
|
||||
public static final String OPS_PATH = "/opt/tomcat/";
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ import javax.crypto.spec.IvParameterSpec;
|
||||
import javax.crypto.spec.PBEKeySpec;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
import com.lanternsoftware.util.LanternFiles;
|
||||
import com.lanternsoftware.util.ResourceLoader;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -76,6 +78,10 @@ public class AESTool {
|
||||
System.out.println(builder.toString());
|
||||
}
|
||||
|
||||
public static AESTool authTool() {
|
||||
return new AESTool(ResourceLoader.loadFile(LanternFiles.OPS_PATH + "authKey.dat"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param _btKey the encoded form of a {@link SecretKey} object. See the {@link SecretKey#getEncoded()} method.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user