diff --git a/src/main/java/org/kapott/hbci/dialog/DialogContext.java b/src/main/java/org/kapott/hbci/dialog/DialogContext.java index c8ed50b7..2eccbd60 100644 --- a/src/main/java/org/kapott/hbci/dialog/DialogContext.java +++ b/src/main/java/org/kapott/hbci/dialog/DialogContext.java @@ -68,21 +68,12 @@ public class DialogContext * @param passport der Passport. * @return der neue Context. */ - public static DialogContext create(HBCIKernelImpl kernel, HBCIPassportInternal passport) + public DialogContext(HBCIKernelImpl kernel, HBCIPassportInternal passport) { - DialogContext ctx = new DialogContext(); - ctx.kernel = kernel; - ctx.passport = passport; - return ctx; + this.kernel = kernel; + this.passport = passport; } - /** - * ct. - */ - private DialogContext() - { - } - /** * Liefert den Kernel. * @return der Kernel. Kann NULL sein. diff --git a/src/main/java/org/kapott/hbci/manager/HBCIDialog.java b/src/main/java/org/kapott/hbci/manager/HBCIDialog.java index 7f933725..2c53aea7 100644 --- a/src/main/java/org/kapott/hbci/manager/HBCIDialog.java +++ b/src/main/java/org/kapott/hbci/manager/HBCIDialog.java @@ -107,7 +107,7 @@ private HBCIMsgStatus doDialogInit() HBCIUtilsInternal.getCallback().status(mainPassport,HBCICallback.STATUS_DIALOG_INIT,null); // Dialog-Context erzeugen - final DialogContext ctx = DialogContext.create(kernel,mainPassport); + final DialogContext ctx = new DialogContext(kernel,mainPassport); ctx.setDialog(this); ctx.setAnonymous(this.isAnon); @@ -174,7 +174,7 @@ private HBCIMsgStatus[] doJobs() final HBCIKernelImpl k = (HBCIKernelImpl) h.getKernel(); final HBCIPassportInternal p = (HBCIPassportInternal) h.getPassport(); - final DialogContext ctx = DialogContext.create(k,p); + final DialogContext ctx = new DialogContext(k,p); ctx.setDialog(this); ctx.setAnonymous(this.isAnon); diff --git a/src/main/java/org/kapott/hbci/manager/HBCIInstitute.java b/src/main/java/org/kapott/hbci/manager/HBCIInstitute.java index 9ed512f3..b48aab80 100644 --- a/src/main/java/org/kapott/hbci/manager/HBCIInstitute.java +++ b/src/main/java/org/kapott/hbci/manager/HBCIInstitute.java @@ -268,7 +268,7 @@ public void fetchBPD() HBCIUtils.log("Aktualisiere Bankparameter (BPD)",HBCIUtils.LOG_INFO); // Dialog-Context erzeugen - final DialogContext ctx = DialogContext.create(this.kernel,this.passport); + final DialogContext ctx = new DialogContext(this.kernel,this.passport); ctx.setAnonymous(true); // Dialog-Initialisierung senden @@ -342,7 +342,7 @@ public void fetchKeys() HBCIUtils.log("Rufe Institutsschlüssel ab",HBCIUtils.LOG_INFO); // Dialog-Context erzeugen - final DialogContext ctx = DialogContext.create(this.kernel,this.passport); + final DialogContext ctx = new DialogContext(this.kernel,this.passport); ctx.setAnonymous(true); // Dialog-Initialisierung senden diff --git a/src/main/java/org/kapott/hbci/manager/HBCIUser.java b/src/main/java/org/kapott/hbci/manager/HBCIUser.java index c799accd..81b02706 100644 --- a/src/main/java/org/kapott/hbci/manager/HBCIUser.java +++ b/src/main/java/org/kapott/hbci/manager/HBCIUser.java @@ -258,7 +258,7 @@ private void sendAndActivateNewUserKeys(HBCIKey[] sigKey,HBCIKey[] encKey) HBCIUtilsInternal.getCallback().status(passport,HBCICallback.STATUS_DIALOG_INIT,null); // Dialog-Context erzeugen - final DialogContext ctx = DialogContext.create(this.kernel,this.passport); + final DialogContext ctx = new DialogContext(this.kernel,this.passport); // Dialog-Initialisierung senden final HBCIDialogInit init = new HBCIDialogInit(); @@ -436,7 +436,7 @@ public void fetchSysId() // Sync { // Dialog-Synchronisierung senden - final DialogContext ctx = DialogContext.create(this.kernel,this.passport); + final DialogContext ctx = new DialogContext(this.kernel,this.passport); final HBCIDialogSync sync = new HBCIDialogSync(Mode.SYS_ID); final HBCIMsgStatus ret = sync.execute(ctx); final Properties result = ret.getData(); @@ -481,7 +481,7 @@ public void fetchSigId() passport.setSigId(new Long("9999999999999999")); // Dialog-Context erzeugen - final DialogContext ctx = DialogContext.create(this.kernel,this.passport); + final DialogContext ctx = new DialogContext(this.kernel,this.passport); // Dialog-Synchronisierung senden final HBCIDialogSync sync = new HBCIDialogSync(Mode.SIG_ID); @@ -614,7 +614,7 @@ public void fetchUPD() } // Dialog-Context erzeugen - final DialogContext ctx = DialogContext.create(this.kernel,this.passport); + final DialogContext ctx = new DialogContext(this.kernel,this.passport); ctx.setAnonymous(this.isAnon); // Dialog-Initialisierung senden @@ -665,7 +665,7 @@ public void sync(boolean force) //////////////////////////////////////// // TAN-Medienbezeichnung abrufen - machen wir noch vor den UPD. Weil wir dafuer ja ggf. bereits das TAN-Verfahren brauchen (wir rufen dort ja auch KInfo ab) { - final DialogContext ctx = DialogContext.create(this.kernel,this.passport); + final DialogContext ctx = new DialogContext(this.kernel,this.passport); HBCIProcess p = new HBCIProcessTanMedia(force); p.execute(ctx); } @@ -685,7 +685,7 @@ public void sync(boolean force) // Zum Schluss noch die SEPA-Infos abrufen if (Feature.SYNC_SEPAINFO.isEnabled()) { - final DialogContext ctx = DialogContext.create(this.kernel,this.passport); + final DialogContext ctx = new DialogContext(this.kernel,this.passport); HBCIProcess p = new HBCIProcessSepaInfo(force); p.execute(ctx); } @@ -720,7 +720,7 @@ public void lockKeys() HBCIUtils.log("Sperre Benutzerschlüssel",HBCIUtils.LOG_INFO); // Dialog-Context erzeugen - final DialogContext ctx = DialogContext.create(this.kernel,this.passport); + final DialogContext ctx = new DialogContext(this.kernel,this.passport); // Dialog-Initialisierung senden final HBCIDialogInit init = new HBCIDialogInit();