public static String getPrimaryId() {
        final SecurityContext context = SecurityContextHolder.getContext();
        final Authentication authentication = context.getAuthentication();
        
        final PrimaryAttributePortletAuthenticationDetails authenticationDetails = (PrimaryAttributePortletAuthenticationDetails)authentication.getDetails();
        return authenticationDetails.getPrimaryAttribute();
    }
public static String getPrimaryId ( ) { final SecurityContext context = SecurityContextHolder . getContext ( ) ; final Authentication authentication = context . getAuthentication ( ) ; final PrimaryAttributePortletAuthenticationDetails authenticationDetails = ( PrimaryAttributePortletAuthenticationDetails ) authentication . getDetails ( ) ; return authenticationDetails . getPrimaryAttribute ( ) ; }
@return The current user's primary attribute