use of com.intel.mtwilson.tag.repository.RepositoryRetrieveException in project OpenAttestation by OpenAttestation.
the class CertificateRepository method retrieve.
@Override
public // @RequiresPermissions("tag_certificates:retrieve")
Certificate retrieve(CertificateLocator locator) {
log.debug("Retrieving Certificate");
if (locator == null || locator.id == null) {
return null;
}
log.debug("Certificate:Retrieve - Got request to retrieve user with id {}.", locator.id);
try (CertificateDAO dao = TagJdbi.certificateDao()) {
Certificate obj = dao.findById(locator.id);
if (obj != null)
return obj;
} catch (Exception ex) {
log.error("Certificate:Retrieve - Error during certificate retrieval.", ex);
throw new RepositoryRetrieveException(ex, locator);
}
return null;
}
Aggregations