use of org.orcid.core.exception.OrcidNoResultException in project ORCID-Source by ORCID.
the class MemberV2ApiServiceDelegatorImpl method viewBulkWorks.
@Override
public Response viewBulkWorks(String orcid, String putCodes) {
ProfileEntity profileEntity = profileEntityManager.findByOrcid(orcid);
if (profileEntity == null) {
throw new OrcidNoResultException("No such profile: " + orcid);
}
WorkBulk workBulk = workManagerReadOnly.findWorkBulk(orcid, putCodes, profileEntity.getLastModified().getTime());
orcidSecurityManager.checkAndFilter(orcid, workBulk, ScopePathType.ORCID_WORKS_READ_LIMITED);
ActivityUtils.cleanEmptyFields(workBulk);
sourceUtils.setSourceName(workBulk);
return Response.ok(workBulk).build();
}
use of org.orcid.core.exception.OrcidNoResultException in project ORCID-Source by ORCID.
the class PublicV2ApiServiceDelegatorImpl method viewBulkWorks.
@Override
public Response viewBulkWorks(String orcid, String putCodes) {
ProfileEntity profileEntity = profileEntityManagerReadOnly.findByOrcid(orcid);
if (profileEntity == null) {
throw new OrcidNoResultException("No such profile: " + orcid);
}
WorkBulk workBulk = workManagerReadOnly.findWorkBulk(orcid, putCodes, profileEntity.getLastModified().getTime());
publicAPISecurityManagerV2.filter(workBulk);
ActivityUtils.cleanEmptyFields(workBulk);
sourceUtils.setSourceName(workBulk);
return Response.ok(workBulk).build();
}
Aggregations