private XmlSubject getSubject(CertificateWrapper certificate) { XmlSubject subject = new XmlSubject(); subject.setCommonName(certificate.getCommonName()); subject.setPseudonym(certificate.getPseudo()); subject.setSurname(certificate.getSurname()); subject.setGivenName(certificate.getGivenName()); subject.setOrganizationName(certificate.getOrganizationName()); subject.setOrganizationUnit(certificate.getOrganizationalUnit()); subject.setEmail(certificate.getEmail()); subject.setLocality(certificate.getLocality()); subject.setState(certificate.getState()); subject.setCountry(certificate.getCountryName()); return subject; }
/** * Create an instance of {@link XmlSubject } * */ public XmlSubject createXmlSubject() { return new XmlSubject(); }
/** * This method returns the locality attribute for a given certificate * * @param certificateId * the certificate id * @return the locality if available or null */ public String getCertificateLocality(String certificateId) { XmlChainItem cert = getCertificate(certificateId); if (cert != null) { return cert.getSubject().getLocality(); } return null; }
/** * This method returns the organizationUnit attribute for a given certificate * * @param certificateId * the certificate id * @return the organizationUnit if available or null */ public String getCertificateOrganizationUnit(String certificateId) { XmlChainItem cert = getCertificate(certificateId); if (cert != null) { return cert.getSubject().getOrganizationUnit(); } return null; }
/** * This method returns the email attribute for a given certificate * * @param certificateId * the certificate id * @return the email if available or null */ public String getCertificateEmail(String certificateId) { XmlChainItem cert = getCertificate(certificateId); if (cert != null) { return cert.getSubject().getEmail(); } return null; }
/** * This method returns the givenName attribute for a given certificate * * @param certificateId * the certificate id * @return the givenName if available or null */ public String getCertificateGivenName(String certificateId) { XmlChainItem cert = getCertificate(certificateId); if (cert != null) { return cert.getSubject().getGivenName(); } return null; }
/** * This method returns the state attribute for a given certificate * * @param certificateId * the certificate id * @return the state if available or null */ public String getCertificateState(String certificateId) { XmlChainItem cert = getCertificate(certificateId); if (cert != null) { return cert.getSubject().getState(); } return null; }
/** * This method returns the commonName attribute for a given certificate * * @param certificateId * the certificate id * @return the commonName if available or null */ public String getCertificateCommonName(String certificateId) { XmlChainItem cert = getCertificate(certificateId); if (cert != null) { return cert.getSubject().getCommonName(); } return null; }
/** * This method returns the country attribute for a given certificate * * @param certificateId * the certificate id * @return the country if available or null */ public String getCertificateCountry(String certificateId) { XmlChainItem cert = getCertificate(certificateId); if (cert != null) { return cert.getSubject().getCountry(); } return null; }
/** * This method returns the organizationName attribute for a given certificate * * @param certificateId * the certificate id * @return the organizationName if available or null */ public String getCertificateOrganizationName(String certificateId) { XmlChainItem cert = getCertificate(certificateId); if (cert != null) { return cert.getSubject().getOrganizationName(); } return null; }
/** * This method returns the pseudonym attribute for a given certificate * * @param certificateId * the certificate id * @return the pseudonym if available or null */ public String getCertificatePseudonym(String certificateId) { XmlChainItem cert = getCertificate(certificateId); if (cert != null) { return cert.getSubject().getPseudonym(); } return null; }