protected ApplicationUser buildUser(Map<String,String> headerMap,boolean includeRoles){
  LOGGER.debug("Creating Application User From Headers");
  Map<String,String> headerNames=getHeaderNames();
  ApplicationUser applicationUser=createNewApplicationUser();
  buildUserId(applicationUser,headerMap,headerNames.get(HTTP_HEADER_USER_ID));
  buildFirstName(applicationUser,headerMap,headerNames.get(HTTP_HEADER_FIRST_NAME));
  buildLastName(applicationUser,headerMap,headerNames.get(HTTP_HEADER_LAST_NAME));
  buildEmail(applicationUser,headerMap,headerNames.get(HTTP_HEADER_EMAIL));
  buildSessionId(applicationUser,headerMap,HTTP_HEADER_SESSION_ID);
  buildSessionInitTime(applicationUser,headerMap,headerNames.get(HTTP_HEADER_SESSION_INIT_TIME));
  userNamespaceAuthorizationHelper.buildNamespaceAuthorizations(applicationUser);
  if (includeRoles) {
    buildRoles(applicationUser,headerMap,headerNames.get(HTTP_HEADER_ROLES));
  }
  LOGGER.debug("Application user created successfully: " + applicationUser);
  return applicationUser;
}

protected ApplicationUser buildUser ( Map < String , String > headerMap , boolean includeRoles ) { LOGGER . debug ( "Creating Application User From Headers" ) ; Map < String , String > headerNames = getHeaderNames ( ) ; ApplicationUser applicationUser = createNewApplicationUser ( ) ; buildUserId ( applicationUser , headerMap , headerNames . get ( HTTP_HEADER_USER_ID ) ) ; buildFirstName ( applicationUser , headerMap , headerNames . get ( HTTP_HEADER_FIRST_NAME ) ) ; buildLastName ( applicationUser , headerMap , headerNames . get ( HTTP_HEADER_LAST_NAME ) ) ; buildEmail ( applicationUser , headerMap , headerNames . get ( HTTP_HEADER_EMAIL ) ) ; buildSessionId ( applicationUser , headerMap , HTTP_HEADER_SESSION_ID ) ; buildSessionInitTime ( applicationUser , headerMap , headerNames . get ( HTTP_HEADER_SESSION_INIT_TIME ) ) ; userNamespaceAuthorizationHelper . buildNamespaceAuthorizations ( applicationUser ) ; if ( includeRoles ) { buildRoles ( applicationUser , headerMap , headerNames . get ( HTTP_HEADER_ROLES ) ) ; } LOGGER . debug ( "Application user created successfully: " + applicationUser ) ; return applicationUser ; }
builds the application user from the header map .
