New Controls Work
JDK 1.3 API

gov.fnal.controls.daq.security
Class ConsoleUserDirectory

java.lang.Object
  |
  +--gov.fnal.controls.daq.security.ConsoleUserDirectory
All Implemented Interfaces:
DbServer.Constants, SybaseServer.Constants

public class ConsoleUserDirectory
extends Object
implements DbServer.Constants

This class includes functionalities as below:

  1. generate whole TreeMap for the whole Console User directory both with console user name and console user id as key.
  2. dynamic debugging facility.

Version:
$Revision: 1.3 $ $Author: devoy $
Author:
Zongwei Yuan
Date: 15-Oct-2000

Field Summary
static int UserFullNameFlag
           
static int UserIdFlag
           
static int UserNameFlag
           
static int UserUpperCaseNameFlag
           
 
Fields inherited from interface gov.fnal.controls.db.SybaseServer.Constants
ADBS, BDBS, DDBS, MDBS
 
Method Summary
static void createConsoleNodeTrimed()
          Used to generate computers table insert data of user console sql script file.
static void createUpdateUserBatch()
          Used to generate console_user table insert data of all user sql script file.
static String dumpPools(boolean ping, boolean clock, boolean periodic, boolean empty, boolean entries, boolean stats, boolean troubles, boolean details)
          Get a pool dump.
 ConsoleUserEntry getIdEntry(Integer id)
          get ConsoleUserEntry object from TreeMap idMap whose key is user id cu_console_user_id.
static ConsoleUserDirectory getInstance()
          Create Instance of this object.
 ConsoleUserEntry getNameMapEntry(String username)
          get ConsoleUserEntry object from TreeMap fullNameMap whose key is cu_full_name.
static TreeMap getNewUpperCaseUsernameMap()
          Create new TreeMap userNameUpperMap whose key is Upper Case user name corespond to column "cu_name".
static TreeMap getNewUsernameMap()
          Create new TreeMap userNameMap whose key is user name corespond to column "cu_name".
static TreeMap getUpperCaseUsernameMap()
          Get TreeMap userNameUpperMap whose key is Upper Case user name corespond to column "cu_name".
static TreeMap getUsernameMap()
          Get TreeMap userNameMap whose key is user name corespond to column "cu_name".
static boolean isClassBugs()
          Inquire of the state of the debug message switch.
static void main(String[] args)
           
static void matchConsole()
          Description: in this method we try to merge console_user table in sybase and telephone in Mysql into one telephone table in Mysql.
static String reportStatistics()
          Show debug state Statitics states.
static void setClassBugs(boolean onOff)
          Set the state of the debug message switch.
static void setPassword(String employeeId, String inputPassword)
          Description insert into MySql dae database encrypted password for user whose id is input employeeId.
static void verifyPassword(String firstName, String inputPassword)
          Verify user login by check input user name and password.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UserIdFlag

public static int UserIdFlag

UserFullNameFlag

public static int UserFullNameFlag

UserNameFlag

public static int UserNameFlag

UserUpperCaseNameFlag

public static int UserUpperCaseNameFlag
Method Detail

getInstance

public static ConsoleUserDirectory getInstance()
Create Instance of this object.
Returns:
ConsoleUserDirectory userDirectory

setClassBugs

public static void setClassBugs(boolean onOff)
Set the state of the debug message switch.
Parameters:
onOff - boolean state for the switch. When true show state value.

isClassBugs

public static boolean isClassBugs()
Inquire of the state of the debug message switch.
Returns:
true if debug messaging is on, otherwise false

getUsernameMap

public static TreeMap getUsernameMap()
Get TreeMap userNameMap whose key is user name corespond to column "cu_name".
Returns:
TreeMap userNameMap

getUpperCaseUsernameMap

public static TreeMap getUpperCaseUsernameMap()
Get TreeMap userNameUpperMap whose key is Upper Case user name corespond to column "cu_name".
Returns:
TreeMap userNameUpperMap

getNewUsernameMap

public static TreeMap getNewUsernameMap()
Create new TreeMap userNameMap whose key is user name corespond to column "cu_name".
Returns:
TreeMap userNameMap

getNewUpperCaseUsernameMap

public static TreeMap getNewUpperCaseUsernameMap()
Create new TreeMap userNameUpperMap whose key is Upper Case user name corespond to column "cu_name".
Returns:
TreeMap userNameUpperMap

main

public static void main(String[] args)

matchConsole

public static void matchConsole()
Description: in this method we try to merge console_user table in sybase and telephone in Mysql into one telephone table in Mysql.

getNameMapEntry

public ConsoleUserEntry getNameMapEntry(String username)
get ConsoleUserEntry object from TreeMap fullNameMap whose key is cu_full_name.
Parameters:
username - String: user full name coresponse cu_full_name.
Returns:
ConsoleUserEntry entry.

getIdEntry

public ConsoleUserEntry getIdEntry(Integer id)
get ConsoleUserEntry object from TreeMap idMap whose key is user id cu_console_user_id.
Parameters:
id - Integer -- user id coresponse to cu_console_user_id.
Returns:
ConsoleUserEntry entry.

reportStatistics

public static String reportStatistics()
Show debug state Statitics states.
Returns:
String states.

dumpPools

public static String dumpPools(boolean ping,
                               boolean clock,
                               boolean periodic,
                               boolean empty,
                               boolean entries,
                               boolean stats,
                               boolean troubles,
                               boolean details)
Get a pool dump.
Parameters:
ping - include when true.
clock - include when true.
periodic - include when true.
empty - include when true.
entries - include when true.
stats - include when true.
troubles - include when true.
details - include when true.
Returns:
a pool dump

setPassword

public static void setPassword(String employeeId,
                               String inputPassword)
Description insert into MySql dae database encrypted password for user whose id is input employeeId.
Parameters:
employeeId - String employee id
inputPassword - String user chose origenal password
Since:
Oct--2000
See Also:
Jcrypt, MySqlConnection

verifyPassword

public static void verifyPassword(String firstName,
                                  String inputPassword)
Verify user login by check input user name and password.
Parameters:
firstName - String -- user first name.
inputPassword - String input password
Since:
Oct--2000
See Also:
Jcrypt

createConsoleNodeTrimed

public static void createConsoleNodeTrimed()
Used to generate computers table insert data of user console sql script file. source file console_uaf.dat locates at d:\ftp_files, download from vms directory xconsole$exe:console_uaf.dat. Target file d:\ftp_files\ update_computer.sql.
Since:
Nov,2000

createUpdateUserBatch

public static void createUpdateUserBatch()
Used to generate console_user table insert data of all user sql script file. source file console_uaf.dat locates at d:\ftp_files, download from vms directory xconsole$exe:console_uaf.dat. Target file d:\ftp_files\ update_console.sql.
Since:
Nov,2000

New Controls Work
JDK 1.3 API

Generated Wed Jul 11 09:44:20 2001 by devoy using alphadoc v1.0

Copyright © 2000-2001, Universities Research Association, Inc. All rights reserved.