@Test(expectedExceptions = {NullPointerException.class}, expectedExceptionsMessageRegExp = "KSI signing service can not be null") public void testSignerBuilderWithoutSigningService() throws KSIException { new SignerBuilder().build(); }
public Extender build() throws KSIException { Util.notNull(extendingService, "KSI extending service"); Util.notNull(publicationsHandler, "KSI publications handler"); if (policy == null) { this.policy = ContextAwarePolicyAdapter.createInternalPolicy(); } KSISignatureComponentFactory signatureComponentFactory = new InMemoryKsiSignatureComponentFactory(); KSISignatureFactory signatureFactory = new InMemoryKsiSignatureFactory(policy, signatureComponentFactory); return new ExtenderImpl(extendingService, publicationsHandler, signatureFactory, signatureComponentFactory); }
ExtenderBuilder { public Extender build() throws KSIException { Util.notNull(extendingService, "KSI extending service"); Util.notNull(publicationsHandler, "KSI publications handler"); if (policy == null) { this.policy = ContextAwarePolicyAdapter.createInternalPolicy(); } KSISignatureComponentFactory signatureComponentFactory = new InMemoryKsiSignatureComponentFactory(); KSISignatureFactory signatureFactory = new InMemoryKsiSignatureFactory(policy, signatureComponentFactory); return new ExtenderImpl(extendingService, publicationsHandler, signatureFactory, signatureComponentFactory); } }
ExtenderBuilder { public Extender build() throws KSIException { Util.notNull(extendingService, "KSI extending service"); Util.notNull(publicationsHandler, "KSI publications handler"); if (policy == null) { this.policy = ContextAwarePolicyAdapter.createInternalPolicy(); } KSISignatureComponentFactory signatureComponentFactory = new InMemoryKsiSignatureComponentFactory(); KSISignatureFactory signatureFactory = new InMemoryKsiSignatureFactory(policy, signatureComponentFactory); return new ExtenderImpl(extendingService, publicationsHandler, signatureFactory, signatureComponentFactory); }  }
ExtenderBuilder { public Extender build() throws KSIException { Util.notNull(extendingService, "KSI extending service"); Util.notNull(publicationsHandler, "KSI publications handler"); if (policy == null) { this.policy = ContextAwarePolicyAdapter.createInternalPolicy(); } KSISignatureComponentFactory signatureComponentFactory = new InMemoryKsiSignatureComponentFactory(); KSISignatureFactory signatureFactory = new InMemoryKsiSignatureFactory(policy, signatureComponentFactory); return new ExtenderImpl(extendingService, publicationsHandler, signatureFactory, signatureComponentFactory); }  ExtenderBuilder setExtendingService(KSIExtendingService extendingService); ExtenderBuilder setPublicationsHandler(PublicationsHandler publicationsHandler); ExtenderBuilder setDefaultVerificationPolicy(ContextAwarePolicy policy); Extender build(); }
ExtenderBuilder { public Extender build() throws KSIException { Util.notNull(extendingService, "KSI extending service"); Util.notNull(publicationsHandler, "KSI publications handler"); if (policy == null) { this.policy = ContextAwarePolicyAdapter.createInternalPolicy(); } KSISignatureComponentFactory signatureComponentFactory = new InMemoryKsiSignatureComponentFactory(); KSISignatureFactory signatureFactory = new InMemoryKsiSignatureFactory(policy, signatureComponentFactory); return new ExtenderImpl(extendingService, publicationsHandler, signatureFactory, signatureComponentFactory); }  ExtenderBuilder setExtendingService(KSIExtendingService extendingService); ExtenderBuilder setPublicationsHandler(PublicationsHandler publicationsHandler); ExtenderBuilder setDefaultVerificationPolicy(ContextAwarePolicy policy); Extender build();  }