protected void updatePerson ( final LoginContext _login , final Person _person ) throws EFapsException { for ( final JAASSystem system : JAASSystem . getAllJAASSystems ( ) ) { final Set < ? > users = _login . getSubject ( ) . getPrincipals ( system . getPersonJAASPrincipleClass ( ) ) ; for ( final Object persObj : users ) { try { for ( final Map . Entry < Person . AttrName , Method > entry : system . getPersonMethodAttributes ( ) . entrySet ( ) ) { _person . updateAttrValue ( entry . getKey ( ) , ( String ) entry . getValue ( ) . invoke ( persObj ) ) ; } } catch ( final IllegalAccessException e ) { LoginHandler . LOG . error ( "could not execute a person method for system " + system . getName ( ) , e ) ; throw new EFapsException ( LoginHandler . class , "IllegalAccessException" , e ) ; } catch ( final IllegalArgumentException e ) { LoginHandler . LOG . error ( "could not execute a person method for system " + system . getName ( ) , e ) ; throw new EFapsException ( LoginHandler . class , "IllegalArgumentException" , e ) ; } catch ( final InvocationTargetException e ) { LoginHandler . LOG . error ( "could not execute a person method for system " + system . getName ( ) , e ) ; throw new EFapsException ( LoginHandler . class , "InvocationTargetException" , e ) ; } } } _person . commitAttrValuesInDB ( ) ; }
The person information inside eFaps is update with information from JAAS login context .