/** * This method returns the used validation time * * @return the validation time */ public Date getValidationTime() { return simpleReport.getValidationTime(); }
/** * Create an instance of {@link XmlSubject } * */ public XmlSubject createXmlSubject() { return new XmlSubject(); }
/** * Create an instance of {@link XmlChainItem } * */ public XmlChainItem createXmlChainItem() { return new XmlChainItem(); }
private XmlChainItem getTrustAnchorCertificate() { List<XmlChainItem> chain = simpleReport.getChain(); for (XmlChainItem xmlChainItem : chain) { if (Utils.isCollectionNotEmpty(xmlChainItem.getTrustAnchors())) { return xmlChainItem; } } return null; }
/** * Create an instance of {@link XmlRevocation } * */ public XmlRevocation createXmlRevocation() { return new XmlRevocation(); }
/** * Create an instance of {@link XmlTrustAnchor } * */ public XmlTrustAnchor createXmlTrustAnchor() { return new XmlTrustAnchor(); }
/** * Create an instance of {@link SimpleCertificateReport } * */ public SimpleCertificateReport createSimpleCertificateReport() { return new SimpleCertificateReport(); }
/** * This method returns the surname attribute for a given certificate * * @param certificateId * the certificate id * @return the surname if available or null */ public String getCertificateSurname(String certificateId) { XmlChainItem cert = getCertificate(certificateId); if (cert != null) { return cert.getSubject().getSurname(); } return null; }
/** * 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; }
/** * This method returns the revocation date for a given certificate * * @param certificateId * the certificate id * @return the revocation date or null */ public Date getCertificateRevocationDate(String certificateId) { XmlChainItem cert = getCertificate(certificateId); if (cert != null) { XmlRevocation revocation = cert.getRevocation(); if (revocation != null) { return revocation.getRevocationDate(); } } return null; }
/** * This method returns a list of certificate ids * * @return the list of certificate ids */ public List<String> getCertificateIds() { List<String> ids = new ArrayList<String>(); List<XmlChainItem> chain = simpleReport.getChain(); for (XmlChainItem xmlChainItem : chain) { ids.add(xmlChainItem.getId()); } return ids; }