Search in sources :

Example 1 with OrcidNoBioException

use of org.orcid.core.exception.OrcidNoBioException in project ORCID-Source by ORCID.

the class MemberV2ApiServiceDelegatorImpl method viewBiography.

@Override
public Response viewBiography(String orcid) {
    Biography bio = biographyManagerReadOnly.getBiography(orcid);
    if (bio == null) {
        throw new OrcidNoBioException();
    }
    orcidSecurityManager.checkAndFilter(orcid, bio, ScopePathType.ORCID_BIO_READ_LIMITED);
    ElementUtils.setPathToBiography(bio, orcid);
    return Response.ok(bio).build();
}
Also used : Biography(org.orcid.jaxb.model.record_v2.Biography) OrcidNoBioException(org.orcid.core.exception.OrcidNoBioException)

Example 2 with OrcidNoBioException

use of org.orcid.core.exception.OrcidNoBioException in project ORCID-Source by ORCID.

the class MemberV3ApiServiceDelegatorImpl method viewBiography.

@Override
public Response viewBiography(String orcid) {
    Biography bio = biographyManagerReadOnly.getBiography(orcid);
    if (bio == null) {
        throw new OrcidNoBioException();
    }
    orcidSecurityManager.checkAndFilter(orcid, bio, ScopePathType.ORCID_BIO_READ_LIMITED);
    ElementUtils.setPathToBiography(bio, orcid);
    return Response.ok(bio).build();
}
Also used : Biography(org.orcid.jaxb.model.v3.dev1.record.Biography) OrcidNoBioException(org.orcid.core.exception.OrcidNoBioException)

Aggregations

OrcidNoBioException (org.orcid.core.exception.OrcidNoBioException)2 Biography (org.orcid.jaxb.model.record_v2.Biography)1 Biography (org.orcid.jaxb.model.v3.dev1.record.Biography)1