This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Merge pull request #21 from ThomasGaebler/master

GVKUmsZeitSEPA
  • Loading branch information...
willuhn committed Jan 9, 2014
2 parents 82e03c7 + f3ae132 commit 2ad509db2cbad2079efad8759ecb490f96b05eab
Showing with 182 additions and 1 deletion.
  1. +36 −1 src/hbci-300.xml
  2. +32 −0 src/org/kapott/hbci/GV/GVKUmsZeitSEPA.java
  3. +114 −0 src/org/kapott/hbci/GV/GVTermUebSEPAEdit.java
View
@@ -1541,9 +1541,13 @@
</DEGdef>
<DEGdef id="ParTermUebSEPADel">
<DE name="orderdata_required" type="JN"/>
<DE name="orderdata_required" type="JN"/>
</DEGdef>
<DEGdef id="ParTermUebSEPAEdit">
<DE name="minpretime" type="Num" maxsize="4"/>
<DE name="maxpretime" type="Num" maxsize="4"/>
</DEGdef>
<DEGdef id="ParUeb">
<DE name="maxusage" type="Num" maxsize="2"/>
@@ -6051,6 +6055,34 @@
<value path="SegHead.version">1</value>
</SEGdef>
<!-- Terminueberweisung aendern -->
<SEGdef id="TermUebSEPAEdit1">
<DEG type="SegHeadUser" name="SegHead"/>
<DEG type="KTVInt" name="My"/>
<DE name="sepadescr" type="AN" maxsize="256"/>
<DE name="sepapain" type="Bin" maxsize="0"/>
<DE name="orderid" type="AN" maxsize="99"/>
<value path="SegHead.code">HKCSA</value>
<value path="SegHead.version">1</value>
</SEGdef>
<SEGdef id="TermUebSEPAEditRes1">
<DEG type="SegHeadInst" name="SegHead"/>
<DE name="orderid" type="AN" maxsize="99" minnum="0"/>
<DE name="orderidold" type="AN" maxsize="99" minnum="0"/>
<value path="SegHead.code">HICSA</value>
<value path="SegHead.version">1</value>
</SEGdef>
<SEGdef id="TermUebSEPAEditPar1">
&GVP2;
<DEG type="ParTermUebSEPAEdit"/>
&SecClassValids;
<value path="SegHead.code">HICSAS</value>
<value path="SegHead.version">1</value>
</SEGdef>
<!-- ================================== SEPA Standing Orders ========================= -->
<SEGdef id="DauerSEPANew1">
@@ -7209,6 +7241,7 @@
<SEG type="TermUebList3" minnum="0"/>
<SEG type="TermUebSEPAList1" minnum="0"/>
<SEG type="TermUebSEPADel1" minnum="0"/>
<SEG type="TermUebSEPAEdit1" minnum="0"/>
<SEG type="Ueb2" minnum="0"/>
<SEG type="Ueb3" minnum="0"/>
<SEG type="Ueb4" minnum="0"/>
@@ -7338,6 +7371,7 @@
<SEG type="TermUebListRes2" minnum="0"/>
<SEG type="TermUebListRes3" minnum="0"/>
<SEG type="TermUebSEPAListRes1" minnum="0"/>
<SEG type="TermUebSEPAEditRes1" minnum="0"/>
<SEG type="UebGarRes1" minnum="0"/>
<SEG type="VormerkpostenRes1" minnum="0"/>
<SEG type="WPDepotListRes2" minnum="0"/>
@@ -7493,6 +7527,7 @@
<SEG type="TermUebListPar3" minnum="0"/>
<SEG type="TermUebSEPAListPar1" minnum="0"/>
<SEG type="TermUebSEPADelPar1" minnum="0"/>
<SEG type="TermUebSEPAEditPar1" minnum="0"/>
<SEG type="UebPar2" minnum="0"/>
<SEG type="UebPar3" minnum="0"/>
<SEG type="UebPar4" minnum="0"/>
@@ -0,0 +1,32 @@
package org.kapott.hbci.GV;
import org.kapott.hbci.manager.HBCIHandler;
import org.kapott.hbci.manager.LogFilter;
/**
* Umsatzabfrage eines SEPA-Kontos
*/
public class GVKUmsZeitSEPA extends GVKUmsAll
{
/**
* Liefert den Lowlevel-Namen des Jobs.
* @return der Lowlevel-Namen des Jobs.
*/
public static String getLowlevelName()
{
return "KUmsZeitSEPA";
}
public GVKUmsZeitSEPA(HBCIHandler handler)
{
super(handler, getLowlevelName());
addConstraint( "my.bic", "KTV.bic", null, LogFilter.FILTER_MOST );
addConstraint( "my.iban", "KTV.iban", null, LogFilter.FILTER_IDS );
addConstraint( "startdate", "sepa.startdate", "", LogFilter.FILTER_IDS );
addConstraint( "enddate", "sepa.enddate", "", LogFilter.FILTER_IDS );
addConstraint( "maxentries", "maxentries", "", LogFilter.FILTER_NONE );
addConstraint( "offset", "offset", "", LogFilter.FILTER_NONE );
addConstraint( "all", "allaccounts", "N", LogFilter.FILTER_NONE );
}
}
@@ -0,0 +1,114 @@
package org.kapott.hbci.GV;
import java.util.Enumeration;
import java.util.Properties;
import org.kapott.hbci.GV_Result.GVRTermUebEdit;
import org.kapott.hbci.manager.HBCIHandler;
import org.kapott.hbci.manager.LogFilter;
import org.kapott.hbci.sepa.PainVersion;
import org.kapott.hbci.sepa.PainVersion.Type;
import org.kapott.hbci.status.HBCIMsgStatus;
public class GVTermUebSEPAEdit extends AbstractSEPAGV
{
private final static PainVersion DEFAULT = PainVersion.PAIN_001_001_02;
/**
* @see org.kapott.hbci.GV.AbstractSEPAGV#getDefaultPainVersion()
*/
@Override
protected PainVersion getDefaultPainVersion()
{
return DEFAULT;
}
/**
* @see org.kapott.hbci.GV.AbstractSEPAGV#getPainType()
*/
@Override
protected Type getPainType()
{
return Type.PAIN_001;
}
/**
* Liefert den Lowlevel-Namen des Jobs.
* @return der Lowlevel-Namen des Jobs.
*/
public static String getLowlevelName()
{
return "TermUebSEPAEdit";
}
public GVTermUebSEPAEdit(HBCIHandler handler)
{
super(handler, getLowlevelName(), new GVRTermUebEdit());
addConstraint("src.bic", "My.bic", null, LogFilter.FILTER_MOST);
addConstraint("src.iban", "My.iban", null, LogFilter.FILTER_IDS);
if (this.canNationalAcc(handler)) // nationale Bankverbindung mitschicken, wenn erlaubt
{
addConstraint("src.country", "My.KIK.country", "", LogFilter.FILTER_NONE);
addConstraint("src.blz", "My.KIK.blz", "", LogFilter.FILTER_MOST);
addConstraint("src.number", "My.number", "", LogFilter.FILTER_IDS);
addConstraint("src.subnumber","My.subnumber", "", LogFilter.FILTER_MOST);
}
addConstraint("orderid", "orderid", null, LogFilter.FILTER_NONE);
addConstraint("_sepadescriptor", "sepadescr", this.getPainVersion().getURN(), LogFilter.FILTER_NONE);
addConstraint("_sepapain", "sepapain", null, LogFilter.FILTER_IDS);
/* dummy constraints to allow an application to set these values. the
* overriden setLowlevelParam() stores these values in a special structure
* which is later used to create the SEPA pain document. */
addConstraint("src.bic", "sepa.src.bic", null, LogFilter.FILTER_MOST);
addConstraint("src.iban", "sepa.src.iban", null, LogFilter.FILTER_IDS);
addConstraint("src.name", "sepa.src.name", null, LogFilter.FILTER_IDS);
addConstraint("dst.bic", "sepa.dst.bic", null, LogFilter.FILTER_MOST);
addConstraint("dst.iban", "sepa.dst.iban", null, LogFilter.FILTER_IDS);
addConstraint("dst.name", "sepa.dst.name", null, LogFilter.FILTER_IDS);
addConstraint("btg.value", "sepa.btg.value", null, LogFilter.FILTER_NONE);
addConstraint("btg.curr", "sepa.btg.curr", "EUR", LogFilter.FILTER_NONE);
addConstraint("usage", "sepa.usage", null, LogFilter.FILTER_NONE);
addConstraint("date", "sepa.date", null, LogFilter.FILTER_NONE);
// Constraints für die PmtInfId (eindeutige SEPA Message ID) und EndToEndId (eindeutige ID um Transaktion zu identifizieren)
addConstraint("sepaid", "sepa.sepaid", getSEPAMessageId(), LogFilter.FILTER_NONE);
addConstraint("endtoendid","sepa.endtoendid", ENDTOEND_ID_NOTPROVIDED, LogFilter.FILTER_NONE);
}
protected void extractResults(HBCIMsgStatus msgstatus,String header,int idx)
{
Properties result=msgstatus.getData();
String orderid=result.getProperty(header+".orderid");
((GVRTermUebEdit)(jobResult)).setOrderId(orderid);
((GVRTermUebEdit)(jobResult)).setOrderIdOld(result.getProperty(header+".orderidold"));
if (orderid!=null && orderid.length()!=0) {
Properties p=getLowlevelParams();
Properties p2=new Properties();
for (Enumeration e=p.propertyNames();e.hasMoreElements();) {
String key=(String)e.nextElement();
if (!key.endsWith(".id")) {
p2.setProperty(key.substring(key.indexOf(".")+1),
p.getProperty(key));
}
}
getMainPassport().setPersistentData("termueb_"+orderid,p2);
}
}
/**
* @see org.kapott.hbci.GV.AbstractSEPAGV#getPainJobName()
*/
public String getPainJobName()
{
return "UebSEPA";
}
}

0 comments on commit 2ad509d

Please sign in to comment.