org.wcb.plugins.beans
Class EventsController

java.lang.Object
  extended byorg.wcb.plugins.beans.EventsController

public class EventsController
extends java.lang.Object

Copyright (C) 1999 Walter Bogaardt This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 Project: Home Automation Interface Filename: $Id: EventsController.java,v 1.8 2004/01/16 00:53:43 wbogaardt Exp $ Abstract: Web bean for x10 jsp events and allow activating and deactivation of alice events.. $Log: EventsController.java,v $ Revision 1.8 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.7 2004/01/15 21:05:20 wbogaardt major revamp of Modules and interfaces changes overall structure of how information is stored Revision 1.6 2003/12/18 18:05:05 wbogaardt fixed events controller bug. When session timed out it deleted all of the events. Fixed bug with refresh button kept adding new items rather than refreshing the line item. Revision 1.5 2003/12/17 23:34:57 wbogaardt fixed capturing of house code to pass it to upper case. Revision 1.4 2003/12/17 18:14:06 wbogaardt moved strings to static variables for both jsp and servlet Revision 1.3 2003/12/17 02:13:21 wbogaardt Initial phase of events controller works Revision 1.2 2003/12/16 23:03:09 wbogaardt added update and delete function to events controller and removed dead imports in module controller Revision 1.1 2003/12/16 22:09:23 wbogaardt new events controller for website


Field Summary
static java.lang.String ACTION
           
static java.lang.String ADD_BUTTON
           
static java.lang.String AM_PM
           
static java.lang.String DELETE_BUTTON
           
static java.lang.String DESCRIPTION
           
static java.lang.String EVENT_ACTION
           
static java.lang.String EVENT_ROW
           
static java.lang.String FRIDAY
           
static java.lang.String HH_MM
           
static java.lang.String MONDAY
           
static java.lang.String REFRESH_BUTTON
           
static java.lang.String RUN_BUTTON
           
static java.lang.String SATURDAY
           
static java.lang.String STOP_BUTTON
           
static java.lang.String SUNDAY
           
static java.lang.String THURSDAY
           
static java.lang.String TUESDAY
           
static java.lang.String WEDNESDAY
           
static java.lang.String X10_MODULE
           
 
Constructor Summary
EventsController()
           
 
Method Summary
 java.util.Vector getAllEvents()
          This will return a vector of X10Event these can be cast to the IX10Event interface
 java.util.Vector getAllX10Modules()
          Gets a list of all the saved X10 modules.
 java.lang.String getEventAction(IX10Events iEvent)
          Gets the Event action and returns it as a selected drop down.
 java.lang.String getX10EventTimeAMPMhtml(IX10Events iEvent)
          Gets the time and returns a drop down box with am or pm selected.
 java.lang.String getX10EventTimeHTML(IX10Events iEvent)
          Allows display of time in html page.
 java.lang.String getX10ModuleDropDown(IX10Events iEvent)
          Returns an HTML dropdown selection of the selected module for this event.
 java.lang.String isDaemonRunningMessage()
          This message lets the jsp know if the events daemon is running in the background.
 void processRequest(javax.servlet.http.HttpServletRequest request)
          Process request information when users do form submits based on this we will save the keys, save the file, read in a new directory's build.properties file or run the ANT build script.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

X10_MODULE

public static java.lang.String X10_MODULE

DESCRIPTION

public static java.lang.String DESCRIPTION

EVENT_ACTION

public static java.lang.String EVENT_ACTION

HH_MM

public static java.lang.String HH_MM

AM_PM

public static java.lang.String AM_PM

MONDAY

public static java.lang.String MONDAY

TUESDAY

public static java.lang.String TUESDAY

WEDNESDAY

public static java.lang.String WEDNESDAY

THURSDAY

public static java.lang.String THURSDAY

FRIDAY

public static java.lang.String FRIDAY

SATURDAY

public static java.lang.String SATURDAY

SUNDAY

public static java.lang.String SUNDAY

ACTION

public static java.lang.String ACTION

ADD_BUTTON

public static java.lang.String ADD_BUTTON

REFRESH_BUTTON

public static java.lang.String REFRESH_BUTTON

DELETE_BUTTON

public static java.lang.String DELETE_BUTTON

RUN_BUTTON

public static java.lang.String RUN_BUTTON

STOP_BUTTON

public static java.lang.String STOP_BUTTON

EVENT_ROW

public static java.lang.String EVENT_ROW
Constructor Detail

EventsController

public EventsController()
Method Detail

processRequest

public void processRequest(javax.servlet.http.HttpServletRequest request)
Process request information when users do form submits based on this we will save the keys, save the file, read in a new directory's build.properties file or run the ANT build script.

Parameters:
request - servlet form post request.

isDaemonRunningMessage

public java.lang.String isDaemonRunningMessage()
This message lets the jsp know if the events daemon is running in the background. The appropriate message will be displayed if it is or is not running.

Returns:
Printable message

getAllEvents

public java.util.Vector getAllEvents()
This will return a vector of X10Event these can be cast to the IX10Event interface

Returns:
Vector of IX10Event objects

getAllX10Modules

public java.util.Vector getAllX10Modules()
Gets a list of all the saved X10 modules.

Returns:
Vector of IX10Module

getEventAction

public java.lang.String getEventAction(IX10Events iEvent)
Gets the Event action and returns it as a selected drop down. ONly dealing with on and off actions.

Parameters:
iEvent -
Returns:
HTML drop down of action

getX10ModuleDropDown

public java.lang.String getX10ModuleDropDown(IX10Events iEvent)
Returns an HTML dropdown selection of the selected module for this event.

Parameters:
iEvent -
Returns:
HTML selection of the x10 module

getX10EventTimeHTML

public java.lang.String getX10EventTimeHTML(IX10Events iEvent)
Allows display of time in html page. The time is a 12 hour format so it should return as HH:mm

Parameters:
iEvent -
Returns:
HH:mm time format

getX10EventTimeAMPMhtml

public java.lang.String getX10EventTimeAMPMhtml(IX10Events iEvent)
Gets the time and returns a drop down box with am or pm selected. This is for the modify existing event on a page.

Parameters:
iEvent -
Returns:
html selection options of AM and PM


Copyright © 1999-2004 Walter Bogaardt. All Rights Reserved.