org.opengts.war.ctracgts
Class AuthorizedUser

java.lang.Object
  extended by org.opengts.war.ctracgts.AuthorizedUser

public class AuthorizedUser
extends java.lang.Object


Nested Class Summary
static class AuthorizedUser.NotAuthorizedException
           
 
Constructor Summary
AuthorizedUser(java.lang.String accountID, java.lang.String userID, java.lang.String password)
           
 
Method Summary
 boolean deviceExists(java.lang.String deviceID)
          Returns true if the specified device exists
 Account getAccount()
          Gets authorized Account instance
 java.lang.String getAccountID()
          Gets authorized Account ID
 OrderedSet<java.lang.String> getAuthorizedDeviceIDs()
          Returns a list of Authorized (Active) Device IDs
 Device getDevice(java.lang.String deviceID)
          Gets the Device record for the specified DeviceID
 OrderedSet<java.lang.String> getDeviceGroups(boolean inclALL)
          Returns a list of DeviceGroups for this Account/User
 User getUser()
          Gets authorized User instance.
 java.lang.String getUserID()
          Gets authorized Account ID
 boolean isAuthorizedDevice(java.lang.String deviceID)
          Returns true if the specified device exists, and the user is authorized to view this device.
 Device loadDeviceByPrefixedModemID(java.lang.String[] prefix, java.lang.String mobileID)
          Gets the Device record for the specified MobileID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthorizedUser

public AuthorizedUser(java.lang.String accountID,
                      java.lang.String userID,
                      java.lang.String password)
               throws AuthorizedUser.NotAuthorizedException
Throws:
AuthorizedUser.NotAuthorizedException
Method Detail

getAccount

public Account getAccount()
Gets authorized Account instance


getAccountID

public java.lang.String getAccountID()
Gets authorized Account ID


getUser

public User getUser()
Gets authorized User instance. May return null for "admin" user.


getUserID

public java.lang.String getUserID()
Gets authorized Account ID


getAuthorizedDeviceIDs

public OrderedSet<java.lang.String> getAuthorizedDeviceIDs()
Returns a list of Authorized (Active) Device IDs


isAuthorizedDevice

public boolean isAuthorizedDevice(java.lang.String deviceID)
Returns true if the specified device exists, and the user is authorized to view this device.


deviceExists

public boolean deviceExists(java.lang.String deviceID)
Returns true if the specified device exists


getDevice

public Device getDevice(java.lang.String deviceID)
                 throws DBException
Gets the Device record for the specified DeviceID

Throws:
DBException

loadDeviceByPrefixedModemID

public Device loadDeviceByPrefixedModemID(java.lang.String[] prefix,
                                          java.lang.String mobileID)
Gets the Device record for the specified MobileID


getDeviceGroups

public OrderedSet<java.lang.String> getDeviceGroups(boolean inclALL)
Returns a list of DeviceGroups for this Account/User