@Override
    public String lookupPersonId(PortletRequest request) {
        String studentId = getSchoolId(request);
        if (StringUtils.isBlank(studentId)) {
            return null;
        }

        Element element = cache.get(studentId);
        if (element != null) {
            return (String)element.getObjectValue();
        }

        String url = getPersonSearchURL();
        SSPApiRequest sspReq = new SSPApiRequest(url, String.class)
                .addUriParameter("schoolId", studentId);

        try {
            ResponseEntity<String> response = sspApi.doRequest(sspReq);
            String userId = extractUserId(studentId, response);

            Element cacheElement = new Element(studentId, userId);
            cache.put(cacheElement);

            return userId;

        } catch (Exception e) {
            log.error(e.getMessage(), e);
            return null;
        }
    }
@Override
    public String lookupPersonId(PortletRequest request) {
        String studentId = getSchoolId(request);
        if (StringUtils.isBlank(studentId)) {
            return null;
        }

        Element element = cache.get(studentId);
        if (element != null) {
            return (String)element.getObjectValue();
        }

        String url = getPersonSearchURL();
        SSPApiRequest sspReq = new SSPApiRequest(url, String.class)
                .addUriParameter("schoolId", studentId);

        try {
            ResponseEntity<String> response = sspApi.doRequest(sspReq);
            String userId = extractUserId(studentId, response);

            Element cacheElement = new Element(studentId, userId);
            cache.put(cacheElement);

            return userId;

        } catch (Exception e) {
            log.error(e.getMessage(), e);
            return null;
        }
    }
@ Override public String lookupPersonId ( PortletRequest request ) { String studentId = getSchoolId ( request ) ; if ( StringUtils . isBlank ( studentId ) ) { return null ; } Element element = cache . get ( studentId ) ; if ( element != null ) { return ( String ) element . getObjectValue ( ) ; } String url = getPersonSearchURL ( ) ; SSPApiRequest sspReq = new SSPApiRequest ( url , String . class ) . addUriParameter ( "schoolId" , studentId ) ; try { ResponseEntity < String > response = sspApi . doRequest ( sspReq ) ; String userId = extractUserId ( studentId , response ) ; Element cacheElement = new Element ( studentId , userId ) ; cache . put ( cacheElement ) ; return userId ; } catch ( Exception e ) { log . error ( e . getMessage ( ) , e ) ; return null ; } }
{@inheritDoc}
{