|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.wcb.autohome.factories.DeviceFactory
Project: Alice X10 Home Automation Filename: $Id: DeviceFactory.java,v 1.17 2004/02/25 21:38:36 wbogaardt Exp $ Abstract: Centralized backend for various components to send events to Serial port output. This mostly handles reading from a file and writting to a file the various user entries such as devices and macros for latter retrieval. $Log: DeviceFactory.java,v $ Revision 1.17 2004/02/25 21:38:36 wbogaardt added javadocs and fixed formating for checkstyle report Revision 1.16 2004/02/03 21:02:27 wbogaardt moved DeviceFactory away from rmi creation and simplified interface between gateway Revision 1.15 2004/01/17 08:15:46 wbogaardt Have an initial working monitoring frame that actually shows the date and time an event takes place Revision 1.14 2004/01/17 07:21:17 wbogaardt added serialization to run events and allow monitoring of these events to the file system to reload later Revision 1.13 2004/01/16 00:53:43 wbogaardt Fixed a very obscure bug with the Macro Panel that it didn't added new x10 devices to the drop down of available x10 device for the macro. Modified Macro triggers to change the events to integer verses strings cleaner this way. Revision 1.12 2003/12/24 20:24:20 wbogaardt Fixed display of console message on start up Revision 1.11 2003/12/20 21:32:39 wbogaardt enabled new file menu option and added functionality Revision 1.10 2003/12/16 22:08:37 wbogaardt refactored events daemon handeling Revision 1.9 2003/12/12 23:17:36 wbogaardt javadoc comments refactored methods so they are more descriptive Revision 1.8 2003/12/09 23:11:42 wbogaardt C: ---------------------------------------------------------------------- Revision 1.7 2003/12/08 21:57:24 wbogaardt refactored out properties loading for old x10 format Revision 1.6 2003/12/08 21:35:18 wbogaardt refactored out old methods of saving macros and modules Revision 1.5 2003/12/08 21:09:04 wbogaardt refactored old method signatures improved error handeling on windows Revision 1.4 2003/12/06 00:41:53 wbogaardt deprecated some method calls Revision 1.3 2003/10/10 21:39:07 wbogaardt modified macro triggers to use calendar in stead of strings Revision 1.2 2003/10/10 18:39:12 wbogaardt changed date time information from a string to a calendar object
Field Summary |
Fields inherited from interface org.wcb.autohome.interfaces.X10DeviceConstants |
APPLIANCE_MODULE_OFF, APPLIANCE_MODULE_ON, BAUD, BAUD_RATE_ARRAY, BRIGHT_ACTION, BROWSER, CM11A_TRANSMITTER, CM17A_TRANSMITTER, CONNECT_ON_START, COUNTRY, DATA_BIT, DATA_BITS_ARRAY, DEVICE_ARRAY, DIM_ACTION, EMAIL_AUTHORIZE, EMAIL_FREQUENCY, EMAIL_FROM, EMAIL_PASSWORD, EMAIL_SMTP, EMAIL_TO, EMAIL_USERNAME, FALSE, HOUSE_CODES_ARRAY, INTERFACE_TYPE, LAMP_MODULE_OFF, LAMP_MODULE_ON, LANGUAGE, LAST_FILE, LOCALHOST, LOOK_AND_FEEL, MAC, METAL, MOTIF, OFF_ACTION, ON_ACTION, PARITY, PARITY_ARRAY, RECOVER_CM11A, RMI_HOST, SEPARATOR, SERIAL_PORT, SPEECH_ENGINE, STOP_BIT, STOP_BITS_ARRAY, TEST_TRANSMITTER, TIMER_EVENT, TRIGGER_EVENT, TRUE, USER_HOME, WINDOWS |
Constructor Summary | |
DeviceFactory()
Default Consturctor |
Method Summary | |
void |
createNewFile()
Create a new file such as when the user select File->new |
void |
deleteMacro(IMacro macro)
Moved saving macro information in the hash table |
void |
loadFile(java.lang.String sfilename)
This new method takes in an Array of Vectors and assigns them to the appropriate Vector Array so that other objects can access these Vectors. |
java.util.Vector |
loadMacroTriggers()
Load the Macro item triggers. |
java.util.Vector |
readInAliceMonitors()
Loads the alice monitors and returns them as a vector to the application |
java.util.Vector |
readInX10Devices()
Returns a list of X10Devices saved in the file. |
java.util.Vector |
readInX10Events()
Returns a vector of IX10Events which are specific to the Alice environment. |
java.util.Vector |
readInX10Macros()
Reads from the hash the serialized objects as a Vector of IX10Macro. |
boolean |
saveFile(java.lang.String sfileName)
Saves all of the module information to the user selected save to file this method is usually called from a save or save as command. |
void |
saveMacro(IMacro macro)
Moved saving macro information in the hash table |
void |
saveMacroTriggers(java.util.Vector items)
Save the Macro item triggers. |
void |
writeAliceMonitors(java.util.Vector vList)
This is used to store the alice monitoring events. |
void |
writeMacros(java.util.Vector vec)
Writes the IMacro vector to the array for serialization storage. |
void |
writeX10Devices(java.util.Vector items)
Save the vector of IX10Module into a properties Hash table key for quick access and storage; |
void |
writeX10Events(java.util.Vector items)
Save the vector list of IX10Events into a Hash table key for quick access and storage. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DeviceFactory()
Method Detail |
public void loadFile(java.lang.String sfilename)
loadFile
in interface IDeviceRemote
sfilename
- an array of Vectors which have serilized objects.public boolean saveFile(java.lang.String sfileName)
saveFile
in interface IDeviceRemote
sfileName
- Full path and file name
public void createNewFile()
createNewFile
in interface IDeviceRemote
public java.util.Vector readInX10Devices()
readInX10Devices
in interface IDeviceRemote
public void writeX10Devices(java.util.Vector items)
writeX10Devices
in interface IDeviceRemote
items
- Vector of IX10Module which are serialized.public java.util.Vector readInX10Events()
readInX10Events
in interface IDeviceRemote
public void writeAliceMonitors(java.util.Vector vList)
writeAliceMonitors
in interface IDeviceRemote
vList
- list of eventspublic void writeX10Events(java.util.Vector items)
writeX10Events
in interface IDeviceRemote
items
- Vector of IX10Events, which are serialized.public java.util.Vector readInX10Macros()
readInX10Macros
in interface IDeviceRemote
public java.util.Vector readInAliceMonitors()
readInAliceMonitors
in interface IDeviceRemote
public void writeMacros(java.util.Vector vec)
writeMacros
in interface IDeviceRemote
vec
- Vector of IMacros to be serializedpublic java.util.Vector loadMacroTriggers()
loadMacroTriggers
in interface IDeviceRemote
public void saveMacroTriggers(java.util.Vector items)
saveMacroTriggers
in interface IDeviceRemote
items
- vector of IMacroTrigger objects to be serialized.public void saveMacro(IMacro macro)
saveMacro
in interface IDeviceRemote
macro
- saves a serialized object into the hash.public void deleteMacro(IMacro macro)
deleteMacro
in interface IDeviceRemote
macro
- allows removal of IMacro from hash.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |