VLJ Iteration II, v. 1.0.0.193

gov.va.med.foundations.security.vistalink
Interface VistaKernelPrincipal

All Superinterfaces:
java.security.Principal
All Known Implementing Classes:
VistaKernelPrincipalImpl

public interface VistaKernelPrincipal
extends java.security.Principal

Provides an interface to marks a principal that represents a logged on Kernel user on an M system. Upon a successful JAAS login, one or more principals may be contained in the JAAS subject that is returned from a successful JAAS login (only one *Kernel* principal should be returned, however. The situation in which multiple principals could be returned is if some kind of compound logon has been set up that requires several logons to complete, for example one to Kernel, and one to a separate health data repository). The VistaKernelPrincipal interface is a marker you can use to identify a "VistaKernelPrincipal" as one of those principals. However, an easier approach is to use the helper method getKernelPrincipal in VistaKernelPrincipalImpl to directly retrieve the single VistaKernelPrincipal.

You can use the KEY* field strings to retrieve user demographics values via the getUserDemographicValue method. For example:

 private VistaKernelPrincipalImpl userPrincipal;
 
 // left out: perform a login... then the subject in the logincontext is populated 

 // get the Kernel principal after successful login 
 userPrincipal = VistaKernelPrincipalImpl.getKernelPrincipal(loginContext.getSubject()); 
 
 // get user demographics
 String duz = this.userPrincipal.getUserDemographicValue(VistaKernelPrincipalImpl.KEY_DUZ);
 String name = userPrincipal.getUserDemographicValue(VistaKernelPrincipalImpl.KEY_NAME_DISPLAY);
 

Version:
1.0.0.193
Author:
Application Modernization - Foundations Team
See Also:
VistaKernelPrincipalImpl

Field Summary
static java.lang.String KEY_DIVISION_IEN
          map key to store/retrieve division station IEN from userDemographicsHashTable
static java.lang.String KEY_DIVISION_STATION_NAME
          map key to store/retrieve division station name from userDemographicsHashTable
static java.lang.String KEY_DIVISION_STATION_NUMBER
          map key to store/retrieve division station number from userDemographicsHashTable
static java.lang.String KEY_DTIME
          map key to store/retrieve user timeout value from userDemographicsHashTable
static java.lang.String KEY_DUZ
          map key to store/retrieve DUZ from userDemographicsHashTable
static java.lang.String KEY_LANGUAGE
          map key to store/retrieve user language from userDemographicsHashTable
static java.lang.String KEY_NAME_DEGREE
          map key to store/retrieve degree from userDemographicsHashTable
static java.lang.String KEY_NAME_DISPLAY
          map key to store/retrieve the display name from userDemographicsHashTable
static java.lang.String KEY_NAME_FAMILYLAST
          map key to store/retrieve name component family-last from userDemographicsHashTable
static java.lang.String KEY_NAME_GIVENFIRST
          map key to store/retrieve name component given-first from userDemographicsHashTable
static java.lang.String KEY_NAME_MIDDLE
          map key to store/retrieve name component middle from userDemographicsHashTable
static java.lang.String KEY_NAME_NEWPERSON01
          map key to store/retrieve New Person .01 Field name from userDemographicsHashTable
static java.lang.String KEY_NAME_PREFIX
          map key to store/retrieve name component prefix from userDemographicsHashTable
static java.lang.String KEY_NAME_SUFFIX
          map key to store/retrieve name component suffix from userDemographicsHashTable
static java.lang.String KEY_SERVICE_SECTION
          map key to store/retrieve user service/section from userDemographicsHashTable
static java.lang.String KEY_TITLE
          map key to store/retrieve user title from userDemographicsHashTable
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns whether some object equals this one.
 java.lang.String getName()
          returns the name given to the principal when it was created.
 java.lang.String getUserDemographicValue(java.lang.String key)
          returns a given user demographic value.
 java.lang.String toString()
          A string representation of the principal
 
Methods inherited from interface java.security.Principal
hashCode
 

Field Detail

KEY_NAME_NEWPERSON01

public static final java.lang.String KEY_NAME_NEWPERSON01
map key to store/retrieve New Person .01 Field name from userDemographicsHashTable

See Also:
Constant Field Values

KEY_NAME_DISPLAY

public static final java.lang.String KEY_NAME_DISPLAY
map key to store/retrieve the display name from userDemographicsHashTable

See Also:
Constant Field Values

KEY_NAME_PREFIX

public static final java.lang.String KEY_NAME_PREFIX
map key to store/retrieve name component prefix from userDemographicsHashTable

See Also:
Constant Field Values

KEY_NAME_SUFFIX

public static final java.lang.String KEY_NAME_SUFFIX
map key to store/retrieve name component suffix from userDemographicsHashTable

See Also:
Constant Field Values

KEY_NAME_GIVENFIRST

public static final java.lang.String KEY_NAME_GIVENFIRST
map key to store/retrieve name component given-first from userDemographicsHashTable

See Also:
Constant Field Values

KEY_NAME_MIDDLE

public static final java.lang.String KEY_NAME_MIDDLE
map key to store/retrieve name component middle from userDemographicsHashTable

See Also:
Constant Field Values

KEY_NAME_FAMILYLAST

public static final java.lang.String KEY_NAME_FAMILYLAST
map key to store/retrieve name component family-last from userDemographicsHashTable

See Also:
Constant Field Values

KEY_NAME_DEGREE

public static final java.lang.String KEY_NAME_DEGREE
map key to store/retrieve degree from userDemographicsHashTable

See Also:
Constant Field Values

KEY_DUZ

public static final java.lang.String KEY_DUZ
map key to store/retrieve DUZ from userDemographicsHashTable

See Also:
Constant Field Values

KEY_TITLE

public static final java.lang.String KEY_TITLE
map key to store/retrieve user title from userDemographicsHashTable

See Also:
Constant Field Values

KEY_SERVICE_SECTION

public static final java.lang.String KEY_SERVICE_SECTION
map key to store/retrieve user service/section from userDemographicsHashTable

See Also:
Constant Field Values

KEY_LANGUAGE

public static final java.lang.String KEY_LANGUAGE
map key to store/retrieve user language from userDemographicsHashTable

See Also:
Constant Field Values

KEY_DIVISION_IEN

public static final java.lang.String KEY_DIVISION_IEN
map key to store/retrieve division station IEN from userDemographicsHashTable

See Also:
Constant Field Values

KEY_DIVISION_STATION_NAME

public static final java.lang.String KEY_DIVISION_STATION_NAME
map key to store/retrieve division station name from userDemographicsHashTable

See Also:
Constant Field Values

KEY_DIVISION_STATION_NUMBER

public static final java.lang.String KEY_DIVISION_STATION_NUMBER
map key to store/retrieve division station number from userDemographicsHashTable

See Also:
Constant Field Values

KEY_DTIME

public static final java.lang.String KEY_DTIME
map key to store/retrieve user timeout value from userDemographicsHashTable

See Also:
Constant Field Values
Method Detail

getName

public java.lang.String getName()
returns the name given to the principal when it was created.

Specified by:
getName in interface java.security.Principal
See Also:
Principal.getName()

getUserDemographicValue

public java.lang.String getUserDemographicValue(java.lang.String key)
returns a given user demographic value. Use the various KEY* field strings to retrieve various values.

Parameters:
key - The key under which the demographic value is stored
Returns:
String the value of the demographic value requests

toString

public java.lang.String toString()
A string representation of the principal

Specified by:
toString in interface java.security.Principal
Overrides:
toString in class java.lang.Object
See Also:
Principal.toString()

equals

public boolean equals(java.lang.Object o)
Returns whether some object equals this one. Because of the nature of a principal and an authenticated connection, we never can call two principals "equal" unless the object reference is to the same object. Otherwise its unfathomable whether the two connections held by the principals are "equal". So false is returned in all instances except where the object references are to the same object.

Specified by:
equals in interface java.security.Principal
Overrides:
equals in class java.lang.Object
See Also:
Principal.equals(Object)

VLJ Iteration II, v. 1.0.0.193

VistaLink Iteration II, v. 1.0.0.193