net.sourceforge.apphere.mbean
Class TestImpl

java.lang.Object
  extended bynet.sourceforge.apphere.mbean.TestImpl
All Implemented Interfaces:
DeviceDAO, PanDAO, TestImplMBean, UserDAO

public class TestImpl
extends java.lang.Object
implements TestImplMBean

Author:
Dewi Roberts Chimera - Institute for Socio-Technical Innovation and Research University of Essex

Constructor Summary
TestImpl()
           
 
Method Summary
 int addDevice(DeviceValue val)
           
 int addPan(PanValue val)
           
 int addUser(UserValue val)
           
 Pan getCurrentPan(int userId)
           
 Device getDevice(java.net.InetAddress ip)
           
 Device getDevice(int userId, int deviceId)
           
 java.util.List getDevices(int userId)
           
 Pan getPan(int userId, int locationID)
           
 java.util.List getPans(int userId)
           
 User getUser(int userId)
           
 java.util.List getUsers()
           
 void removeDevice(int userId, int deviceId)
           
 void removePan(int userId, int locationId)
           
 void removeUser(int userId)
           
 void setCurrentPan(int userId, int panId)
           
 void setUser(User user)
           
 void updateDevice(DeviceValue val)
           
 void updatePan(PanValue val)
           
 void updateUser(UserValue newUserInfo)
           
 int validateUser(java.lang.String username, java.lang.String password)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestImpl

public TestImpl()
Method Detail

addDevice

public int addDevice(DeviceValue val)
              throws AppHereException
Specified by:
addDevice in interface DeviceDAO
Throws:
AppHereException

addPan

public int addPan(PanValue val)
           throws AppHereException
Specified by:
addPan in interface PanDAO
Throws:
AppHereException

getDevices

public java.util.List getDevices(int userId)
                          throws AppHereException
Specified by:
getDevices in interface DeviceDAO
Throws:
AppHereException

getPans

public java.util.List getPans(int userId)
                       throws AppHereException
Specified by:
getPans in interface PanDAO
Throws:
AppHereException

removeDevice

public void removeDevice(int userId,
                         int deviceId)
                  throws AppHereException
Specified by:
removeDevice in interface DeviceDAO
Throws:
AppHereException

removePan

public void removePan(int userId,
                      int locationId)
               throws AppHereException
Specified by:
removePan in interface PanDAO
Throws:
AppHereException

getPan

public Pan getPan(int userId,
                  int locationID)
           throws AppHereException
Specified by:
getPan in interface PanDAO
Throws:
AppHereException

setCurrentPan

public void setCurrentPan(int userId,
                          int panId)
                   throws AppHereException
Throws:
AppHereException

getCurrentPan

public Pan getCurrentPan(int userId)
                  throws AppHereException
Throws:
AppHereException

validateUser

public int validateUser(java.lang.String username,
                        java.lang.String password)
                 throws AppHereException
Specified by:
validateUser in interface UserDAO
Throws:
AppHereException

getUser

public User getUser(int userId)
Specified by:
getUser in interface UserDAO

setUser

public void setUser(User user)

updateDevice

public void updateDevice(DeviceValue val)
                  throws AppHereException
Specified by:
updateDevice in interface DeviceDAO
Throws:
AppHereException

updatePan

public void updatePan(PanValue val)
               throws AppHereException
Specified by:
updatePan in interface PanDAO
Throws:
AppHereException

getDevice

public Device getDevice(int userId,
                        int deviceId)
                 throws AppHereException
Specified by:
getDevice in interface DeviceDAO
Throws:
AppHereException

addUser

public int addUser(UserValue val)
            throws AppHereException
Specified by:
addUser in interface UserDAO
Throws:
AppHereException

updateUser

public void updateUser(UserValue newUserInfo)
                throws AppHereException
Specified by:
updateUser in interface UserDAO
Throws:
AppHereException

removeUser

public void removeUser(int userId)
                throws AppHereException
Specified by:
removeUser in interface UserDAO
Throws:
AppHereException

getUsers

public java.util.List getUsers()
                        throws AppHereException
Specified by:
getUsers in interface UserDAO
Throws:
AppHereException

getDevice

public Device getDevice(java.net.InetAddress ip)
                 throws DeviceNotFoundException
Specified by:
getDevice in interface DeviceDAO
Throws:
DeviceNotFoundException