org.wcb.plugins.beans
Class ModuleController

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

public class ModuleController
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: ModuleController.java,v 1.14 2004/01/16 00:53:43 wbogaardt Exp $ Abstract: Bean for modules page. $Log: ModuleController.java,v $ Revision 1.14 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.13 2004/01/15 21:05:20 wbogaardt major revamp of Modules and interfaces changes overall structure of how information is stored Revision 1.12 2003/12/18 00:02:52 wbogaardt more javadoc comments Revision 1.11 2003/12/17 23:34:57 wbogaardt fixed capturing of house code to pass it to upper case. Revision 1.10 2003/12/17 18:14:06 wbogaardt moved strings to static variables for both jsp and servlet Revision 1.9 2003/12/16 23:03:09 wbogaardt added update and delete function to events controller and removed dead imports in module controller Revision 1.8 2003/12/12 23:17:36 wbogaardt javadoc comments refactored methods so they are more descriptive Revision 1.7 2003/12/11 23:10:12 wbogaardt cleaned up exception handeling and logging of system.out messages Revision 1.6 2003/12/10 21:06:53 wbogaardt modules page adds but does not reload from saved state Revision 1.5 2003/12/09 23:11:42 wbogaardt C: ---------------------------------------------------------------------- Revision 1.4 2003/12/09 00:37:06 wbogaardt moved methods from authomAdminSession to parent class Revision 1.3 2003/12/09 00:27:46 wbogaardt modified loading of session information


Field Summary
static java.lang.String ADD_BUTTON
           
static java.lang.String DELETE_BUTTON
           
static java.lang.String DESCRIPTION
           
static java.lang.String MODULE_ROW
           
static java.lang.String UPDATE_BUTTON
           
static java.lang.String X10_MODULE_ID
           
static java.lang.String X10_MODULE_TYPE
           
 
Constructor Summary
ModuleController()
           
 
Method Summary
 java.util.Vector getAllX10Modules()
          Get all the X10 modules that have been saved and return them as a vector.
 java.lang.String getHtmlImage(IX10Module imodule)
          Takes the interface of a X10 module and returns a string, which displays an HTML image
 java.lang.String getStatus()
          String that is returned for the jsp page to know the status of the user's last form submit.
 void processRequest(javax.servlet.http.HttpServletRequest request)
          Used to process the modules.jsp page requests
 void setDeleteRow(int iRow)
          This deletes the table row from the table model and then updates the Hash Table to set the Key value(ModuleID) to null;
 boolean setSaveModule(java.lang.String sModuleID, java.lang.String sName, java.lang.String sDesc, int iType)
          Saves the form input to an x10 module object then stores this into the file system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

X10_MODULE_TYPE

public static java.lang.String X10_MODULE_TYPE

X10_MODULE_ID

public static java.lang.String X10_MODULE_ID

DESCRIPTION

public static java.lang.String DESCRIPTION

UPDATE_BUTTON

public static java.lang.String UPDATE_BUTTON

DELETE_BUTTON

public static java.lang.String DELETE_BUTTON

ADD_BUTTON

public static java.lang.String ADD_BUTTON

MODULE_ROW

public static java.lang.String MODULE_ROW
Constructor Detail

ModuleController

public ModuleController()
Method Detail

getStatus

public java.lang.String getStatus()
String that is returned for the jsp page to know the status of the user's last form submit. If the form processed successfully or not.

Returns:
Printable message

getHtmlImage

public java.lang.String getHtmlImage(IX10Module imodule)
Takes the interface of a X10 module and returns a string, which displays an HTML image

Parameters:
imodule - Interface to get html image name
Returns:
string of "Plug.gif" or "Bulb.gif"

getAllX10Modules

public java.util.Vector getAllX10Modules()
Get all the X10 modules that have been saved and return them as a vector.

Returns:
All x10 modules

setSaveModule

public boolean setSaveModule(java.lang.String sModuleID,
                             java.lang.String sName,
                             java.lang.String sDesc,
                             int iType)
Saves the form input to an x10 module object then stores this into the file system.

Parameters:
sModuleID - House code value of A1 - P15
sName - Name of the module
sDesc - Description of this module
iType - Value of 1 for lamp 2 for appliance
Returns:
success on saving file

setDeleteRow

public void setDeleteRow(int iRow)
This deletes the table row from the table model and then updates the Hash Table to set the Key value(ModuleID) to null;


processRequest

public void processRequest(javax.servlet.http.HttpServletRequest request)
Used to process the modules.jsp page requests

Parameters:
request - process servlet request


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