public Date getCertificateTSPServiceExpiredCertsRevocationInfo() { List<XmlTrustedServiceProvider> trustedServiceProviders = certificate.getTrustedServiceProviders(); if (Utils.isCollectionNotEmpty(trustedServiceProviders)) { for (XmlTrustedServiceProvider trustedServiceProvider : trustedServiceProviders) { List<XmlTrustedService> trustedServices = trustedServiceProvider.getTrustedServices(); for (XmlTrustedService xmlTrustedService : trustedServices) { if (xmlTrustedService.getExpiredCertsRevocationInfo() != null) { return xmlTrustedService.getExpiredCertsRevocationInfo(); // TODO improve } } } } return null; }
public List<TrustedServiceWrapper> getTrustedServices() { List<TrustedServiceWrapper> result = new ArrayList<TrustedServiceWrapper>(); List<XmlTrustedServiceProvider> tsps = certificate.getTrustedServiceProviders(); if (Utils.isCollectionNotEmpty(tsps)) { for (XmlTrustedServiceProvider tsp : tsps) { List<XmlTrustedService> trustedServices = tsp.getTrustedServices(); if (Utils.isCollectionNotEmpty(trustedServices)) { for (XmlTrustedService trustedService : trustedServices) { TrustedServiceWrapper wrapper = new TrustedServiceWrapper(); wrapper.setTspName(tsp.getTSPName()); wrapper.setServiceName(trustedService.getServiceName()); wrapper.setCountryCode(tsp.getCountryCode()); wrapper.setStatus(trustedService.getStatus()); wrapper.setType(trustedService.getServiceType()); wrapper.setStartDate(trustedService.getStartDate()); wrapper.setEndDate(trustedService.getEndDate()); wrapper.setCapturedQualifiers(new ArrayList<String>(trustedService.getCapturedQualifiers())); wrapper.setAdditionalServiceInfos(new ArrayList<String>(trustedService.getAdditionalServiceInfoUris())); result.add(wrapper); } } } } return result; }
List<XmlTrustAnchor> trustAnchors = new ArrayList<XmlTrustAnchor>(); for (XmlTrustedServiceProvider xmlTrustedServiceProvider : trustServiceProviders) { List<XmlTrustedService> trustedServices = xmlTrustedServiceProvider.getTrustedServices(); Set<String> uniqueServiceNames = getUniqueServiceNames(trustedServices); for (String serviceName : uniqueServiceNames) {