Package org.kapott.hbci.dialog
Class AbstractRawHBCIDialog
- java.lang.Object
-
- org.kapott.hbci.dialog.AbstractRawHBCIDialog
-
- All Implemented Interfaces:
RawHBCIDialog
- Direct Known Subclasses:
AbstractRawHBCIDialogInit
,HBCIDialogEnd
,HBCIDialogLockKeys
,HBCIDialogSepaInfo
,HBCIDialogTanMedia
public abstract class AbstractRawHBCIDialog extends java.lang.Object implements RawHBCIDialog
Abstrakte Basis-Klasse fuer "rohe" HBCI-Dialoge.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicInteger
executions
private KnownDialogTemplate
template
-
Constructor Summary
Constructors Constructor Description AbstractRawHBCIDialog(KnownDialogTemplate template)
ct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyData(DialogContext ctx)
Befuellt die Daten fuer die Nachricht.protected void
checkResult(DialogContext ctx)
Kann implementiert werden, um das Ergebnis des Dialogs zu pruefen.SCARequest
createSCARequest(java.util.Properties secmechInfo, int hktanVersion)
Erzeugt einen SCA-Request.HBCIMsgStatus
execute(DialogContext ctx)
Sendet die Dialog-Initialisierung an die Bank.protected java.lang.String
getActualTemplate(DialogContext ctx)
Liefert das tatsaechlich zu verwendende Message-Template basierend auf dem Kontext.protected java.lang.Integer
getSegmentVersion(DialogContext ctx, java.lang.String gvName, java.lang.Integer defaultVersion)
Liefert die hoechste bei der Bank verfuegbare Segment-Version.KnownDialogTemplate
getTemplate()
Liefert das Template.protected HBCIMsgStatus
sendData(DialogContext ctx)
Default-Implementierung fuer den Versand.void
setTemplate(KnownDialogTemplate t)
Speichert das Template.
-
-
-
Field Detail
-
template
private KnownDialogTemplate template
-
executions
private java.util.concurrent.atomic.AtomicInteger executions
-
-
Constructor Detail
-
AbstractRawHBCIDialog
AbstractRawHBCIDialog(KnownDialogTemplate template)
ct.- Parameters:
template
- das zu verwendende Template.
-
-
Method Detail
-
execute
public final HBCIMsgStatus execute(DialogContext ctx)
Description copied from interface:RawHBCIDialog
Sendet die Dialog-Initialisierung an die Bank.- Specified by:
execute
in interfaceRawHBCIDialog
- Parameters:
ctx
- der Dialog-Context.- Returns:
- der Ausfuehrungsstatus. Darf niemals NULL sein. In dem Fall muss die Methode eine Exception werfen.
- See Also:
RawHBCIDialog.execute(org.kapott.hbci.dialog.DialogContext)
-
sendData
protected HBCIMsgStatus sendData(DialogContext ctx)
Default-Implementierung fuer den Versand. Verschluesselung und Signierung findet nur statt, wenn es kein anonymer Dialog ist.- Parameters:
ctx
- der Kontext.- Returns:
- die Ergebnis-Daten.
-
applyData
protected void applyData(DialogContext ctx)
Befuellt die Daten fuer die Nachricht.- Parameters:
ctx
- der Kontext.
-
checkResult
protected void checkResult(DialogContext ctx)
Kann implementiert werden, um das Ergebnis des Dialogs zu pruefen.- Parameters:
ctx
- der Kontext.
-
createSCARequest
public SCARequest createSCARequest(java.util.Properties secmechInfo, int hktanVersion)
Description copied from interface:RawHBCIDialog
Erzeugt einen SCA-Request.- Specified by:
createSCARequest
in interfaceRawHBCIDialog
- Parameters:
secmechInfo
- die TAN-Verfahren-Parameter.hktanVersion
- die HKTAN-Version.- Returns:
- der SCA-Request.
- See Also:
RawHBCIDialog.createSCARequest(java.util.Properties, int)
-
getTemplate
public KnownDialogTemplate getTemplate()
Description copied from interface:RawHBCIDialog
Liefert das Template.- Specified by:
getTemplate
in interfaceRawHBCIDialog
- Returns:
- das Template.
- See Also:
RawHBCIDialog.getTemplate()
-
setTemplate
public void setTemplate(KnownDialogTemplate t)
Description copied from interface:RawHBCIDialog
Speichert das Template.- Specified by:
setTemplate
in interfaceRawHBCIDialog
- Parameters:
t
- das Template.- See Also:
RawHBCIDialog.setTemplate(org.kapott.hbci.dialog.KnownDialogTemplate)
-
getActualTemplate
protected java.lang.String getActualTemplate(DialogContext ctx)
Liefert das tatsaechlich zu verwendende Message-Template basierend auf dem Kontext.- Parameters:
ctx
- der Kontext.- Returns:
- template das zu verwendende Message-Template.
-
getSegmentVersion
protected java.lang.Integer getSegmentVersion(DialogContext ctx, java.lang.String gvName, java.lang.Integer defaultVersion)
Liefert die hoechste bei der Bank verfuegbare Segment-Version.- Parameters:
ctx
- der Kontext.gvName
- der Name des Geschaeftsvorfalls.defaultVersion
- die Default-Version, wenn keine gefunden wurde.- Returns:
- die Segment-Version oder NULL, wenn keine brauchbare Version unterstuetzt wird
-
-