com.adventnet.adaptors.html
Class HtmlAuth

java.lang.Object
  extended by com.adventnet.adaptors.html.HtmlAuth
All Implemented Interfaces:
HtmlAuthMBean

public class HtmlAuth
extends java.lang.Object
implements HtmlAuthMBean


Field Summary
protected  boolean authenticateFlag
           
 java.util.Vector userInfoVec
           
 
Constructor Summary
HtmlAuth()
          This class provide authentication features for the User.
 
Method Summary
 void addUser(java.lang.String user, java.lang.String passwd, int type)
          Adds a new user to the userInfoVec
 void deleteUser(java.lang.String user)
          Deletes the user from UserInfoVec
 boolean getAuthorisation()
          Returns the whether authorisation is enabled or not
 java.lang.String[] getUserNames()
          Gets all the users from UserInfoVec
 boolean isAdminUser(java.lang.String user)
          Finds out whether the user is an Admin user
 boolean isValidUser(java.lang.String user, java.lang.String password)
          Authenticates the user
 void modifyUser(java.lang.String user, java.lang.String passwd, int type)
          Modifies the user from UserInfoVec
 void readAuthFile(java.lang.String str)
           
 void setAuthorisation(boolean flag)
          sets the authorisation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

userInfoVec

public java.util.Vector userInfoVec

authenticateFlag

protected boolean authenticateFlag
Constructor Detail

HtmlAuth

public HtmlAuth()
This class provide authentication features for the User.

Method Detail

isValidUser

public boolean isValidUser(java.lang.String user,
                           java.lang.String password)
Authenticates the user

Specified by:
isValidUser in interface HtmlAuthMBean
Parameters:
login - name of the user
password - of the user
Returns:
true if the user is valid else false

isAdminUser

public boolean isAdminUser(java.lang.String user)
Finds out whether the user is an Admin user

Specified by:
isAdminUser in interface HtmlAuthMBean
Parameters:
login - name of the user
Returns:
true if the user Type is Admin else false

addUser

public void addUser(java.lang.String user,
                    java.lang.String passwd,
                    int type)
Adds a new user to the userInfoVec

Specified by:
addUser in interface HtmlAuthMBean
Parameters:
login - name of the user

modifyUser

public void modifyUser(java.lang.String user,
                       java.lang.String passwd,
                       int type)
Modifies the user from UserInfoVec

Specified by:
modifyUser in interface HtmlAuthMBean
Parameters:
login - name of the user
password - of the user
type - of the user

deleteUser

public void deleteUser(java.lang.String user)
Deletes the user from UserInfoVec

Specified by:
deleteUser in interface HtmlAuthMBean
Parameters:
name - of the user

readAuthFile

public void readAuthFile(java.lang.String str)

getUserNames

public java.lang.String[] getUserNames()
Gets all the users from UserInfoVec

Specified by:
getUserNames in interface HtmlAuthMBean
Returns:
user name in Array

setAuthorisation

public void setAuthorisation(boolean flag)
Description copied from interface: HtmlAuthMBean
sets the authorisation

Specified by:
setAuthorisation in interface HtmlAuthMBean

getAuthorisation

public boolean getAuthorisation()
Description copied from interface: HtmlAuthMBean
Returns the whether authorisation is enabled or not

Specified by:
getAuthorisation in interface HtmlAuthMBean