@Test public void convert() throws Exception { CertificateInfo certificateInfo = new CertificateInfoBuilder().build(); TokenCertificate certificate = tokenCertificateConverter.convert(certificateInfo); assertEquals(true, certificate.getActive()); assertEquals("N/A", certificate.getCertificateDetails().getSubjectCommonName()); assertEquals(2038, certificate.getCertificateDetails().getNotAfter().getYear()); assertEquals(CertificateOcspStatus.OCSP_RESPONSE_GOOD, certificate.getOcspStatus()); assertEquals("a:b:c", certificate.getOwnerId()); assertEquals(true, certificate.getSavedToConfiguration()); assertEquals(org.niis.xroad.restapi.openapi.model.CertificateStatus.REGISTERED, certificate.getStatus()); }
public TokenCertificate convert(CertificateInfo certificateInfo, KeyInfo keyInfo, TokenInfo tokenInfo) { TokenCertificate tokenCertificate = convert(certificateInfo); tokenCertificate.setPossibleActions(possibleActionConverter.convert( possibleActionsRuleEngine.getPossibleCertificateActions( tokenInfo, keyInfo, certificateInfo))); return tokenCertificate; }
TokenCertificateConverter { public TokenCertificate convert(CertificateInfo certificateInfo, KeyInfo keyInfo, TokenInfo tokenInfo) { TokenCertificate tokenCertificate = convert(certificateInfo); tokenCertificate.setPossibleActions(possibleActionConverter.convert( possibleActionsRuleEngine.getPossibleCertificateActions( tokenInfo, keyInfo, certificateInfo))); return tokenCertificate; } }
TokenCertificateConverter { public TokenCertificate convert(CertificateInfo certificateInfo, KeyInfo keyInfo, TokenInfo tokenInfo) { TokenCertificate tokenCertificate = convert(certificateInfo); tokenCertificate.setPossibleActions(possibleActionConverter.convert( possibleActionsRuleEngine.getPossibleCertificateActions( tokenInfo, keyInfo, certificateInfo))); return tokenCertificate; } @Autowired  TokenCertificateConverter(CertificateDetailsConverter certificateDetailsConverter,
            ClientConverter clientConverter,
            PossibleActionsRuleEngine possibleActionsRuleEngine,
            PossibleActionConverter possibleActionConverter); }
TokenCertificateConverter { public TokenCertificate convert(CertificateInfo certificateInfo, KeyInfo keyInfo, TokenInfo tokenInfo) { TokenCertificate tokenCertificate = convert(certificateInfo); tokenCertificate.setPossibleActions(possibleActionConverter.convert( possibleActionsRuleEngine.getPossibleCertificateActions( tokenInfo, keyInfo, certificateInfo))); return tokenCertificate; } @Autowired  TokenCertificateConverter(CertificateDetailsConverter certificateDetailsConverter,
            ClientConverter clientConverter,
            PossibleActionsRuleEngine possibleActionsRuleEngine,
            PossibleActionConverter possibleActionConverter); TokenCertificate convert(CertificateInfo certificateInfo,
            KeyInfo keyInfo,
            TokenInfo tokenInfo); TokenCertificate convert(CertificateInfo certificateInfo); List<TokenCertificate> convert(Iterable<CertificateInfo> certificateInfos); List<TokenCertificate> convert(Iterable<CertificateInfo> certificateInfos,
            KeyInfo keyInfo,
            TokenInfo tokenInfo); }
TokenCertificateConverter { public TokenCertificate convert(CertificateInfo certificateInfo, KeyInfo keyInfo, TokenInfo tokenInfo) { TokenCertificate tokenCertificate = convert(certificateInfo); tokenCertificate.setPossibleActions(possibleActionConverter.convert( possibleActionsRuleEngine.getPossibleCertificateActions( tokenInfo, keyInfo, certificateInfo))); return tokenCertificate; } @Autowired  TokenCertificateConverter(CertificateDetailsConverter certificateDetailsConverter,
            ClientConverter clientConverter,
            PossibleActionsRuleEngine possibleActionsRuleEngine,
            PossibleActionConverter possibleActionConverter); TokenCertificate convert(CertificateInfo certificateInfo,
            KeyInfo keyInfo,
            TokenInfo tokenInfo); TokenCertificate convert(CertificateInfo certificateInfo); List<TokenCertificate> convert(Iterable<CertificateInfo> certificateInfos); List<TokenCertificate> convert(Iterable<CertificateInfo> certificateInfos,
            KeyInfo keyInfo,
            TokenInfo tokenInfo);  }