TaskBean API
0.5

glogic.sample.sys
Class User

java.lang.Object
  extended byglogic.sample.sys.User
All Implemented Interfaces:
java.security.Principal

public class User
extends java.lang.Object
implements java.security.Principal

User defined in web application.

Author:
Sam Taha

Field Summary
protected  boolean _bIsAdmin
           
protected  boolean _bIsDisabled
           
protected  java.util.List _oRegionList
           
protected  java.lang.String password
          The password is never set (just to throw hackers off)
protected  java.lang.String username
          The username (must be unique).
 
Constructor Summary
User(java.lang.String username, java.lang.String password)
           
 
Method Summary
 java.util.List getAppsWithRights()
           
 java.lang.String getName()
          Return the full name.
 java.lang.String getPassword()
          Return the password.
 boolean haveRightsToApp(java.lang.String stAppName)
           
 boolean isAdminRights()
           
 boolean isDisabled()
           
 boolean isValidUser()
          Make sure user has the right the password.
 void loadRightsInfo()
          Load all necessary rights info from db.
 void setName(java.lang.String username)
           
 void setPassword(java.lang.String password)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.security.Principal
equals, hashCode, toString
 

Field Detail

_bIsDisabled

protected boolean _bIsDisabled

_bIsAdmin

protected boolean _bIsAdmin

_oRegionList

protected java.util.List _oRegionList

password

protected java.lang.String password
The password is never set (just to throw hackers off)


username

protected java.lang.String username
The username (must be unique).

Constructor Detail

User

public User(java.lang.String username,
            java.lang.String password)
Method Detail

isValidUser

public boolean isValidUser()
                    throws java.lang.Exception
Make sure user has the right the password. Compare against the db.

Throws:
java.lang.Exception

loadRightsInfo

public void loadRightsInfo()
                    throws java.lang.Exception
Load all necessary rights info from db. This should only be called once the user has been authenciated. Finds all the products that the user has rights to and puts them into a list.

Throws:
java.lang.Exception

getName

public java.lang.String getName()
Return the full name.

Specified by:
getName in interface java.security.Principal

setName

public void setName(java.lang.String username)

getPassword

public java.lang.String getPassword()
Return the password.


setPassword

public void setPassword(java.lang.String password)

isAdminRights

public boolean isAdminRights()

isDisabled

public boolean isDisabled()

haveRightsToApp

public boolean haveRightsToApp(java.lang.String stAppName)

getAppsWithRights

public java.util.List getAppsWithRights()

TaskBean API
0.5

Copyright © Grand Logic, Inc. All Rights Reserved.