public void addCertificates(Collection<Certificate> certs) throws ConfigurationServiceException { if (certs != null && certs.size() > 0) for (Certificate cert : certs) { if ((cert.getOwner() == null || cert.getOwner().isEmpty()) && cert.getData() != null) { // get the owner from the certificate information // first transform into a certificate CertUtils.CertContainer cont = CertUtils.toCertContainer(cert.getData()); if (cont != null && cont.getCert() != null) { // now get the owner info from the cert String theOwner = CertUtils.getOwner(cont.getCert()); if (theOwner != null && !theOwner.isEmpty()) cert.setOwner(theOwner); } } dao.save(cert); } }
final String theOwner = CertUtils.getOwner(cont.getCert());
final String theOwner = CertUtils.getOwner(cont.getCert());