Examples of PainVersion


Examples of org.kapott.hbci.sepa.PainVersion

        // Siehe https://groups.google.com/d/msg/hbci4java/RYHCai_TzHM/72Bx51B9bXUJ
        if (System.getProperty("sepa.pain.formatted","false").equalsIgnoreCase("true"))
            marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);

        PainVersion version = this.getPainVersion();
        if (version != null)
        {
            String schemaLocation = version.getSchemaLocation();
            if (schemaLocation != null)
            {
                LOG.fine("appending schemaLocation " + schemaLocation);
                marshaller.setProperty(Marshaller.JAXB_SCHEMA_LOCATION,schemaLocation);
            }

            String file = version.getFile();
            if (file != null)
            {
                if (validate)
                {
                    Source source  = null;
View Full Code Here

Examples of org.kapott.hbci.sepa.PainVersion

     * @return die ermittelte PAIN-Version.
     */
    private PainVersion determinePainVersion(HBCIHandler handler, String gvName)
    {
        // Schritt 1: Wir holen uns die globale maximale PAIN-Version
        PainVersion globalVersion = this.determinePainVersionInternal(handler,GVSEPAInfo.getLowlevelName());
       
        // Schritt 2: Die des Geschaeftsvorfalls - fuer den Fall, dass die Bank
        // dort weitere Einschraenkungen hinterlegt hat
        PainVersion jobVersion = this.determinePainVersionInternal(handler,gvName);
       
        // Wir haben gar keine PAIN-Version gefunden
        if (globalVersion == null && jobVersion == null)
        {
            PainVersion def = this.getDefaultPainVersion();
            HBCIUtils.log("unable to determine matching pain version, using default: " + def,HBCIUtils.LOG_WARN);
            return def;
        }
       
        // Wenn wir keine GV-spezifische haben, dann nehmen wir die globale
View Full Code Here

Examples of org.kapott.hbci.sepa.PainVersion

                continue;
   
            String urn = props.getProperty(key);
            try
            {
                PainVersion version = new PainVersion(urn);
                if (version.getType() == this.getPainType())
                {
                    if (!version.isSupported(this.getPainJobName()))
                    {
                        HBCIUtils.log("  unsupported " + version,HBCIUtils.LOG_DEBUG);
                        continue;
                    }
                   
                    HBCIUtils.log("  found " + version,HBCIUtils.LOG_DEBUG);
                   
                    //////////////////////
                    // Checken, ob wir die Version in den "known versions" haben
                    // Wenn das der Fall ist, nehmen wir die, damit immer unsere
                    // URN verwendet wird und nicht jene, die die Bank in HISPAS
                    // geschickt hat. Es gibt naemlich Banken, die in HISPAS das alte
                    // Bezeichner-Format senden (also etwa "sepade.pain.001.002.03.xsd"),
                    // anschliessend aber meckern, wenn man denen beim Einreichen
                    // eines Auftrages genau dieses Format uebergibt. Dort wollen die
                    // dann ploetzlich stattdessen den neuen URN haben (also "urn:iso:std:iso:20022:tech:xsd:pain.001.002.03").
                    // Siehe http://www.onlinebanking-forum.de/phpBB2/viewtopic.php?p=95160#95160
                    List<PainVersion> known = PainVersion.getKnownVersions(version.getType());
                    int pos = known.indexOf(version);
                    if (pos != -1)
                    {
                        version = known.get(pos);
                        HBCIUtils.log("  replacing with known-version " + version,HBCIUtils.LOG_DEBUG);
View Full Code Here

Examples of org.kapott.hbci.sepa.PainVersion

        getMainPassport().fillAccountInfo(entry.my);

        entry.other=new Konto();
       
        String sepadescr = result.getProperty(header+".sepadescr");
        PainVersion version = new PainVersion(sepadescr);
        ISEPAParser parser = SEPAParserFactory.get(version);
        ArrayList<Properties> sepaResults = new ArrayList<Properties>();
        String pain = result.getProperty(header+".sepapain");
        try
        {
View Full Code Here

Examples of org.kapott.hbci.sepa.PainVersion

  Object[] setup(Object context, IOFormat format, InputStream is, ProgressMonitor monitor) throws Exception
  {
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    IOUtil.copy(is,bos);
   
    PainVersion version = PainVersion.autodetect(new ByteArrayInputStream(bos.toByteArray()));
    if (version == null)
      throw new ApplicationException(i18n.tr("SEPA-Version der XML-Datei nicht ermittelbar"));
   
    monitor.log(i18n.tr("SEPA-Version: {0}",version.getURN()));
   
    List<Properties> props = new ArrayList<Properties>();
    ISEPAParser parser = SEPAParserFactory.get(version);
    parser.parse(new ByteArrayInputStream(bos.toByteArray()),props);
   
View Full Code Here

Examples of org.kapott.hbci.sepa.PainVersion

    JobContext ctx = new JobContext();
    this.jobs.put(os,ctx); // dem Stream zuordnen
   
    // User nach der SEPA-Version fragen, die verwendet werden soll.
    PainVersionDialog d = new PainVersionDialog(this.getPainType());
    PainVersion version = (PainVersion) d.open();
    ctx.version = version;

    // Header-Infos zuweisen
    ctx.props.setProperty("src.bic",    StringUtils.trimToEmpty(konto.getBic()));
    ctx.props.setProperty("src.iban",   StringUtils.trimToEmpty(konto.getIban()));
View Full Code Here

Examples of org.kapott.hbci.sepa.PainVersion

        getMainPassport().fillAccountInfo(entry.my);

        entry.other=new Konto();
       
        String sepadescr = result.getProperty(header+".sepadescr");
        PainVersion version = new PainVersion(sepadescr);
        ISEPAParser parser = SEPAParserFactory.get(version);
        ArrayList<Properties> sepaResults = new ArrayList<Properties>();
        String pain = result.getProperty(header+".sepapain");
        try
        {
View Full Code Here

Examples of org.kapott.hbci.sepa.PainVersion

     * @throws Exception
     */
    @Test
    public void test001() throws Exception
    {
        PainVersion v = new PainVersion("urn:iso:std:iso:20022:tech:xsd:pain.001.003.03");
        Assert.assertEquals(Type.PAIN_001,v.getType());
        Assert.assertEquals(3,v.getMajor());
        Assert.assertEquals(3,v.getMinor());
        Assert.assertEquals(GenUebSEPA00100303.class.getName(),v.getGeneratorClass("UebSEPA"));
    }
View Full Code Here

Examples of org.kapott.hbci.sepa.PainVersion

     * @throws Exception
     */
    @Test
    public void test002() throws Exception
    {
        PainVersion v = new PainVersion("sepade.pain.008.001.01.xsd");
        Assert.assertEquals(Type.PAIN_008,v.getType());
        Assert.assertEquals(1,v.getMajor());
        Assert.assertEquals(1,v.getMinor());
        Assert.assertEquals(GenLastSEPA00800101.class.getName(),v.getGeneratorClass("LastSEPA"));
    }
View Full Code Here

Examples of org.kapott.hbci.sepa.PainVersion

     * @throws Exception
     */
    @Test(expected=IllegalArgumentException.class)
    public void test003() throws Exception
    {
        new PainVersion("urn:iso:std:iso:20022:tech:xsd:pain.005.003.03");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.