Version in base suite: 2.8.10+dfsg-1 Base version: hibiscus_2.8.10+dfsg-1 Target version: hibiscus_2.8.21+dfsg-1+deb10u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/h/hibiscus/hibiscus_2.8.10+dfsg-1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/h/hibiscus/hibiscus_2.8.21+dfsg-1+deb10u1.dsc .classpath | 4 .settings/org.eclipse.jdt.core.prefs | 74 ++ .settings/org.eclipse.jdt.ui.prefs | 2 build/BUILD | 4 build/ChangeLog | 138 ++++ debian/changelog | 8 debian/control | 4 debian/copyright | 2 debian/patches/0006-Update-hbci4java-version.patch | 21 debian/patches/series | 1 lib/velocity/de.willuhn.jameica.hbci.rmi.EinnahmeAusgabeZeitraum.csv.vm | 16 plugin.xml | 4 sql/h2-create.sql | 4 sql/mysql-create.sql | 4 sql/postgresql-create.sql | 6 src/de/willuhn/jameica/hbci/HBCI.java | 96 --- src/de/willuhn/jameica/hbci/HBCICallbackSWT.java | 64 +- src/de/willuhn/jameica/hbci/HBCIProperties.java | 20 src/de/willuhn/jameica/hbci/MetaKey.java | 7 src/de/willuhn/jameica/hbci/accounts/hbci/HBCIAccountPinTan.java | 19 src/de/willuhn/jameica/hbci/accounts/hbci/HBCIVariantChipcard.java | 4 src/de/willuhn/jameica/hbci/accounts/hbci/HBCIVariantPinTan.java | 2 src/de/willuhn/jameica/hbci/accounts/hbci/action/HBCIVariantPinTanTest.java | 3 src/de/willuhn/jameica/hbci/accounts/hbci/controller/HBCIVariantPinTanController.java | 36 - src/de/willuhn/jameica/hbci/accounts/hbci/views/HBCIVariantPinTanStep1.java | 8 src/de/willuhn/jameica/hbci/accounts/hbci/views/HBCIVariantPinTanStep2.java | 2 src/de/willuhn/jameica/hbci/experiments/AbstractHBCI4JavaFeature.java | 73 ++ src/de/willuhn/jameica/hbci/experiments/Feature.java | 44 + src/de/willuhn/jameica/hbci/experiments/FeatureService.java | 135 ++++ src/de/willuhn/jameica/hbci/experiments/FeatureServiceInitializer.java | 59 + src/de/willuhn/jameica/hbci/experiments/HBCI4JavaFeatureAutoMethod.java | 41 + src/de/willuhn/jameica/hbci/experiments/HBCI4JavaFeatureSkipOneStepSCA.java | 39 + src/de/willuhn/jameica/hbci/gui/action/KontoDelete.java | 13 src/de/willuhn/jameica/hbci/gui/action/PassportDeleteBPD.java | 122 ++++ src/de/willuhn/jameica/hbci/gui/action/PassportProcessCode3072.java | 2 src/de/willuhn/jameica/hbci/gui/action/PassportSync.java | 235 +++++++ src/de/willuhn/jameica/hbci/gui/controller/AbstractSepaSammelTransferControl.java | 2 src/de/willuhn/jameica/hbci/gui/controller/AuslandsUeberweisungControl.java | 2 src/de/willuhn/jameica/hbci/gui/controller/EinnahmeAusgabeControl.java | 58 + src/de/willuhn/jameica/hbci/gui/controller/KontoauszugPdfControl.java | 6 src/de/willuhn/jameica/hbci/gui/controller/SepaLastschriftControl.java | 4 src/de/willuhn/jameica/hbci/gui/controller/SepaSammelLastBuchungControl.java | 2 src/de/willuhn/jameica/hbci/gui/controller/SettingsControl.java | 105 +++ src/de/willuhn/jameica/hbci/gui/controller/UmsatzDetailControl.java | 26 src/de/willuhn/jameica/hbci/gui/controller/UmsatzDetailEditControl.java | 13 src/de/willuhn/jameica/hbci/gui/dialogs/AccountContainerDialog.java | 39 - src/de/willuhn/jameica/hbci/gui/dialogs/AdresseAuswahlDialog.java | 31 - src/de/willuhn/jameica/hbci/gui/dialogs/KontoDeleteDialog.java | 301 ++++++++++ src/de/willuhn/jameica/hbci/gui/dialogs/KontoauszugPdfSettingsDialog.java | 7 src/de/willuhn/jameica/hbci/gui/dialogs/NewKeysDialog.java | 8 src/de/willuhn/jameica/hbci/gui/dialogs/PassportPropertyDialog.java | 59 - src/de/willuhn/jameica/hbci/gui/dialogs/UmsatzTypListDialog.java | 41 + src/de/willuhn/jameica/hbci/gui/input/BICInput.java | 2 src/de/willuhn/jameica/hbci/gui/input/KontoInput.java | 35 - src/de/willuhn/jameica/hbci/gui/menus/KontoList.java | 75 +- src/de/willuhn/jameica/hbci/gui/parts/KontoList.java | 15 src/de/willuhn/jameica/hbci/gui/parts/KontoauszugPdfList.java | 47 + src/de/willuhn/jameica/hbci/gui/parts/SparQuote.java | 2 src/de/willuhn/jameica/hbci/gui/parts/UmsatzTree.java | 10 src/de/willuhn/jameica/hbci/gui/views/AbstractUmsatzDetail.java | 2 src/de/willuhn/jameica/hbci/gui/views/EinnahmenAusgaben.java | 1 src/de/willuhn/jameica/hbci/gui/views/KontoauszugList.java | 2 src/de/willuhn/jameica/hbci/gui/views/NachrichtDetails.java | 10 src/de/willuhn/jameica/hbci/gui/views/Settings.java | 27 src/de/willuhn/jameica/hbci/io/AbstractSepaImporter.java | 15 src/de/willuhn/jameica/hbci/io/CamtUmsatzImporter.java | 262 ++++++-- src/de/willuhn/jameica/hbci/io/MT940UmsatzExporter.java | 101 +++ src/de/willuhn/jameica/hbci/io/MT940UmsatzExporterMerged.java | 39 - src/de/willuhn/jameica/hbci/io/SepaUeberweisungImporter.java | 3 src/de/willuhn/jameica/hbci/io/UmsatzTreeAccountingExporter.java | 11 src/de/willuhn/jameica/hbci/io/VelocityExporter.java | 34 + src/de/willuhn/jameica/hbci/io/XMLExporter.java | 15 src/de/willuhn/jameica/hbci/io/print/PrintSupportUmsatzList.java | 25 src/de/willuhn/jameica/hbci/passports/ddv/Controller.java | 28 src/de/willuhn/jameica/hbci/passports/ddv/Detail.java | 17 src/de/willuhn/jameica/hbci/passports/ddv/KontoList.java | 24 src/de/willuhn/jameica/hbci/passports/pintan/ChipTANDialog.java | 48 + src/de/willuhn/jameica/hbci/passports/pintan/Controller.java | 51 + src/de/willuhn/jameica/hbci/passports/pintan/Detail.java | 18 src/de/willuhn/jameica/hbci/passports/pintan/KontoList.java | 25 src/de/willuhn/jameica/hbci/passports/pintan/PhotoTANDialog.java | 104 +++ src/de/willuhn/jameica/hbci/passports/pintan/PinTanConfigFactory.java | 148 +++- src/de/willuhn/jameica/hbci/passports/pintan/PtSecMech.java | 31 + src/de/willuhn/jameica/hbci/passports/pintan/PtSecMechDialog.java | 2 src/de/willuhn/jameica/hbci/passports/pintan/TANDialog.java | 39 + src/de/willuhn/jameica/hbci/passports/pintan/server/PinTanConfigImpl.java | 87 +- src/de/willuhn/jameica/hbci/passports/rdh/Controller.java | 63 -- src/de/willuhn/jameica/hbci/passports/rdh/Detail.java | 23 src/de/willuhn/jameica/hbci/passports/rdh/KeyFormatDialog.java | 57 - src/de/willuhn/jameica/hbci/passports/rdh/KontoList.java | 5 src/de/willuhn/jameica/hbci/passports/rdh/keyformat/HBCI4JavaFormat.java | 3 src/de/willuhn/jameica/hbci/rmi/Umsatz.java | 16 src/de/willuhn/jameica/hbci/server/AbstractSepaSammelTransferImpl.java | 2 src/de/willuhn/jameica/hbci/server/AuslandsUeberweisungImpl.java | 2 src/de/willuhn/jameica/hbci/server/Converter.java | 22 src/de/willuhn/jameica/hbci/server/EinnahmeAusgabe.java | 11 src/de/willuhn/jameica/hbci/server/HBCIDBServiceImpl.java | 55 + src/de/willuhn/jameica/hbci/server/KontoauszugPdfUtil.java | 50 + src/de/willuhn/jameica/hbci/server/Range.java | 38 + src/de/willuhn/jameica/hbci/server/SepaDauerauftragImpl.java | 2 src/de/willuhn/jameica/hbci/server/SepaLastschriftImpl.java | 2 src/de/willuhn/jameica/hbci/server/UmsatzImpl.java | 34 + src/de/willuhn/jameica/hbci/server/UmsatzTypBean.java | 13 src/de/willuhn/jameica/hbci/server/UmsatzTypImpl.java | 23 src/de/willuhn/jameica/hbci/server/UmsatzUtil.java | 4 src/de/willuhn/jameica/hbci/server/hbci/AbstractHBCIJob.java | 101 ++- src/de/willuhn/jameica/hbci/server/hbci/HBCIUmsatzJob.java | 2 src/de/willuhn/jameica/hbci/synchronize/AbstractSynchronizeBackend.java | 23 src/de/willuhn/jameica/hbci/synchronize/SynchronizeSession.java | 45 + src/de/willuhn/jameica/hbci/synchronize/hbci/HBCISynchronizeBackend.java | 78 -- src/help/de_de/de.willuhn.jameica.hbci.passports.ddv.Detail.txt | 16 src/help/de_de/de.willuhn.jameica.hbci.passports.pintan.Detail.txt | 32 - src/help/de_de/de.willuhn.jameica.hbci.passports.rdh.Detail.txt | 14 src/lang/hibiscus_messages_en.properties | 2 updates/update0066.java | 51 + 115 files changed, 3271 insertions(+), 893 deletions(-) diff -Nru hibiscus-2.8.10+dfsg/.classpath hibiscus-2.8.21+dfsg/.classpath --- hibiscus-2.8.10+dfsg/.classpath 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/.classpath 2019-11-02 14:14:17.000000000 +0000 @@ -3,14 +3,13 @@ - + - @@ -21,5 +20,6 @@ + diff -Nru hibiscus-2.8.10+dfsg/.settings/org.eclipse.jdt.core.prefs hibiscus-2.8.21+dfsg/.settings/org.eclipse.jdt.core.prefs --- hibiscus-2.8.10+dfsg/.settings/org.eclipse.jdt.core.prefs 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/.settings/org.eclipse.jdt.core.prefs 2019-11-02 14:14:17.000000000 +0000 @@ -7,9 +7,9 @@ org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -24,6 +24,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore @@ -79,6 +80,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -111,12 +113,16 @@ org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.7 +org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,LOW,LOW org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,BUGZILLA,TICKET +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 @@ -124,20 +130,27 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 @@ -147,7 +160,9 @@ org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=0 org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 @@ -156,6 +171,7 @@ org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch=0 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line @@ -182,6 +198,7 @@ org.eclipse.jdt.core.formatter.comment.format_source_code=true org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.indent_tag_description=false org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert org.eclipse.jdt.core.formatter.comment.line_length=160 @@ -229,11 +246,14 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert @@ -260,10 +280,13 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert @@ -288,13 +311,19 @@ org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert @@ -338,10 +367,13 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert @@ -378,9 +410,12 @@ org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert @@ -392,14 +427,33 @@ org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.join_lines_in_comments=true org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never org.eclipse.jdt.core.formatter.lineSplit=160 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines @@ -416,9 +470,15 @@ org.eclipse.jdt.core.formatter.tabulation.size=2 org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true +org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff -Nru hibiscus-2.8.10+dfsg/.settings/org.eclipse.jdt.ui.prefs hibiscus-2.8.21+dfsg/.settings/org.eclipse.jdt.ui.prefs --- hibiscus-2.8.10+dfsg/.settings/org.eclipse.jdt.ui.prefs 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/.settings/org.eclipse.jdt.ui.prefs 2019-11-02 14:14:17.000000000 +0000 @@ -2,7 +2,7 @@ eclipse.preferences.version=1 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_meins -formatter_settings_version=14 +formatter_settings_version=17 sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true diff -Nru hibiscus-2.8.10+dfsg/build/BUILD hibiscus-2.8.21+dfsg/build/BUILD --- hibiscus-2.8.10+dfsg/build/BUILD 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/build/BUILD 2019-11-02 14:14:17.000000000 +0000 @@ -1,3 +1,3 @@ #Build Number for ANT. Do not edit! -#Tue Jan 29 12:47:43 CET 2019 -build.number=374 +#Sat Nov 02 12:43:21 CET 2019 +build.number=385 diff -Nru hibiscus-2.8.10+dfsg/build/ChangeLog hibiscus-2.8.21+dfsg/build/ChangeLog --- hibiscus-2.8.10+dfsg/build/ChangeLog 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/build/ChangeLog 2019-11-02 14:14:17.000000000 +0000 @@ -1,3 +1,141 @@ +2019-11-02 Version 2.8.21 + + * NEW: 0856 Update auf HBCI4Java 3.1.24 - Nochmal Postbank - https://homebanking-hilfe.de/forum/topic.php?p=151712#real151712 + +2019-11-02 Version 2.8.20 + + * NEW: 0855 Update auf HBCI4Java 3.1.23 - Fehler beim Anlegen eines neuen Bankzugangs, wenn die Bank kein Einschritt-TAN-Verfahren erlaubt - https://homebanking-hilfe.de/forum/topic.php?p=151712#real151712 + * BUG: 0854 Workaround für überlange Verwendungszweck-Zeilen (mehr als 1000 Zeichen) beim Import von CAMT-Umsätzen + * NEW: 0853 Experimentelle Features auch dann in den Einstellungen anzeigen, wenn sie deaktiviert sind + +2019-11-01 Version 2.8.19 + + * NEW: 0852 Neue obantoo-Version mit aktualisierter BLZ-Datei gültig ab 09.12.2019 + * NEW: 0851 Update auf HBCI4Java 3.1.22 - Fehler mit gesperrten RDH2-Schlüsseln aus Fremdprogrammen - https://homebanking-hilfe.de/forum/topic.php?p=151578#real151578 + * NEW: 0850 PR von ds10: Neue Option "Auch nur teilweise im Zeitraum liegende Kontoauszüge anzeigen" bei den elektronischen Kontoauszügen + * NEW: 0849 Experimentelle Funktionen nicht mehr an Nightly-Build gekoppelt + * NEW: 0848 Update auf HBCI4Java 3.1.21 - SPEA-Infos nur noch abrufen, wenn von Bank explizit unterstützt + * NEW: 0847 Funktion "Synchronisieren" im Bankzugang + * NEW: 0846 Update auf HBCI4Java 3.1.20 - Funktion zum Neu-Synchronisieren eines Bankzugangs + * NEW: 0845 Update auf HBCI4Java 3.1.19 - Abruf der TAN-Medienbezeichnungen jetzt mit Fallback (erst ohne SCA, dann mit) + * BUG: 0844 Bei der Postbank konnte es passieren, dass ein Auftrag fälschlicherweise als ausgeführt markiert wird, wenn die Übertragung im TAN-Dialog abgebrochen wurde + * NEW: 0843 Update auf HBCI4Java 3.1.18 - Wenn die Bank Code 3040 meldet, konnte es zu einer versehentlichen doppelten Ausführung von GVs kommen - https://homebanking-hilfe.de/forum/topic.php?t=23384 + * NEW: 0842 Neuer Reiter "Experimentelle Funktionen" in den Einstellungen beim Nightly-Build + * NEW: 0841 Update auf HBCI4Java 3.1.17 - Weitere Optimierung beim Abruf der TAN-Medienbezeichnungen und SEPA-Infos + * NEW: 0840 Update auf HBCI4Java 3.1.16 - Fehler 25 bei ChipTAN optisch behoben + * NEW: 0839 Update auf HBCI4Java 3.1.15 - Abruf der TAN-Medienbezeichnungen gefixt, neue URL der ING + * NEW: 0838 Update auf HBCI4Java 3.1.14 - Neueinreichung von INI-Briefen korrigiert, IBAN und BIC aus UPD nur noch übernehmen, wenn etwas empfangen wurde + +2019-09-17 Version 2.8.18 + + * NEW: 0837 Update auf HBCI4Java 3.1.13 + * CHG: 0836 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/9813da9a9898eadc65f07fa8724c3079502863cc + * BUG: 0835 Klickt man bei einem neu angelegten ChipTAN-USB-tauglichen Bankzugang direkt nach dem Anlegen nochmal auf Speichern, wurde ein Fehler angezeigt, weil die Checkbox "Kartenleser via USB..." noch fehlt + * NEW: 0834 Update auf HBCI4Java 3.1.12 + * NEW: 0833 Update auf HBCI4Java 3.1.12-SNAPSHOT + +2019-09-16 Version 2.8.17 + + * NEW: 0832 Update auf HBCI4Java 3.1.11 + * NEW: 0831 Update auf HBCI4Java 3.1.10 + * NEW: 0830 Neue Option "Bei Erhalt der TAN automatisch fortsetzen" bei ChipTAN USB + +2019-09-12 Version 2.8.16 + + * NEW: 0829 Update auf HBCI4Java 3.1.9 + * NEW: 0828 Update auf HBCI4Java 3.1.8 + * NEW: 0827 Update auf HBCI4Java 3.1.7 + * NEW: 0826 Update auf HBCI4Java 3.1.6 + +2019-09-09 Version 2.8.15 + + * NEW: 0826 Ergänzende Hilfetexte für die feste Zuordnung von Konten zu einem Bank-Zugang + * NEW: 0825 Update auf HBCI4Java 3.1.5 + +2019-09-06 Version 2.8.14 + + * NEW: 0824 Update auf HBCI4Java 3.1.4 + * NEW: 0823 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/d0c10a2ca4f64e2e010b4dcd7c254f4ae7cce91d - tolerieren, wenn Eingabestream nicht vorhanden ist + * BUG: 0822 Update auf HBCI4Java 3.1.3 - NPE beim Umsatzabruf im CAMT-Format, wenn BIC in Gegenkonto fehlt + * NEW: 0821 Update auf HBCI4Java 3.1.2 - SCA-Code 3076 auch in HIRMG suchen + * NEW: 0820 Hinweis-Text anzeigen, wenn nicht die erwartete HBCI4Java-Version geladen wurde - potentieller Installationsfehler + * NEW: 0819 Buttons zum Vergrößern und Verkleinern der Grafik bei Matrix-TAN + * CHG: 0818 Überlange Namen von Banken stärker kürzen + * NEW: 0817 Update auf HBCI4Java 3.1.1 - beim Aktualisieren eines Dauerauftrages war die Reihenfolge der HBCI-Nachrichten nicht korrekt + * NEW: 0816 Update auf HBCI4Java 3.1.0 + * NEW: 0815 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/8b4419305d56ef38ca459d1b0a1d07aa3aa36767 - Fehler beim Finalisieren der ChipTAN-USB Transaktion tolerieren + * NEW: 0814 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/443919107d3f172491e4ace2bd00410ae7b6caf0 - Sicherstellen, dass HBCI+ noch funktioniert - wenn auch ohne SCA + * NEW: 0813 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/e8f79e75ecadf7cafde769b85e5579c75f1d945e - Abruf TAN-Medien und SEPA-Infos nur noch, wenn nötig + * NEW: 0812 Fortschrittsbalken bei der Konten-Synchronisierung jetzt kontinuierlicher und mit übersichtlicherem Logging + * NEW: 0811 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/dbcebea52e1fedf6a680203ea33cb917c232ab86 - weniger Logging, dafür aber verständlicher + * NEW: 0810 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/f1b3ff7a7443742e3bd21d91a1ba01b20309c23b - HKTAN jetzt auch in der anonymen Dialog-Initialisierung mitsenden, wenn noch keine Infos zum TAN-Verfahren bekannt sind + * NEW: 0809 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/782a012ed602c43560125671e261249a4e188bde - erste funktional komplette Version mit SCA-Support + * NEW: 0808 Eigene Datumsformate in Velocity-Templates verwendbar + * NEW: 0807 Neue obantoo-Version mit aktualisierter BLZ-Datei gültig ab 09.09.2019 + * NEW: 0806 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/84444459efab1dc9ce08c839a8884d749f40069c - HKTAN mit SCA-Ausnahme via 3076 sollte jetzt auch bei GVs gehen + * NEW: 0805 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/d8b723f163db10983d718b2057cee8ee9b36e401 - besseres Handling bei fehlendem tanmedia + * NEW: 0804 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/500f0753218a136bec10ddee9ba47c2e52473a3d mit erstem SCA-Support für PSD2 + * CHG: 0803 Deutlicheren Hinweis anzeigen, wenn man versucht, eine SEPA-Lastschrift als Überweisung zu importieren (und umgekehrt) + * BUG: 0802 Wenn man in der Umsatzliste eine Kontogruppe ausgewählt hat und diese Auswahl bestehen blieb, führte das beim nächsten Hibiscus-Start zu einem internen Fehler, der anschließend das automatisch Backup beim Shutdown verhinderte + * NEW: 0801 Nummer der Umsatzbuchung beim Druck mit ausgeben + * BUG: 0800 Erneutes Fix bei der Auswertung des Job-Status - Auftrag konnte u.U. fälschlicherweise als ausgeführt markiert werden, obwohl die Bank einen Fehler gesendet hat + * BUG: 0799 Bei der Anzeige der Umsätze nach Kategorien kann es zu einem Fehler wegen der Sortierung kommen + * NEW: 0798 Spaltenbreite im Kategorie-Auswahl-Dialog speichern, die Spalte mit der Bezeichnung kann zu kurz werden, wenn man einen Suchbegriff eingibt + * BUG: 0797 Wenn eine Auftragsart nicht unterstützt wird, wurde beim Versuch diese abzusenden in der Logdatei eine NPE geloggt. Das leitete bei der Fehlersuche in die Irre - siehe https://homebanking-hilfe.de/forum/topic.php?p=145321#real145321 + +2019-06-24 Version 2.8.13 + + * NEW: 0796 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/4282abcadf1ae3813511f7e4d19359a829e71bec - fehlendes Tag ":25:" in MT940 tolerieren + * NEW: 0795 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/d075bbc6878aac28bcaf4c2dd6383ae33bd15749 mit Fallback-Länderkennung DE, wenn in UPD nicht/falsch übertragen + * NEW: 0794 Neue obantoo-Version mit aktualisierter BLZ-Datei gültig ab 03.06.2019 + * CHG: 0793 Auswahldialog für das Schlüsselformat beim Import einer Schlüsseldatei etwas höher gestaltet - Inhalt sonst kaum erkennbar + * NEW: 0792 Import von SEPA-Überweisungen: Wenn die PAIN-Datei ein Datum hat, dann Auftrag automatisch als Terminüberweisung markieren (da wir das Datum ja auch nur dann exportieren, wenn es wirklich eine Terminüberweisung ist) + * NEW: 0791 SEPA-Lastschrift: Whitespaces in Gläubiger-Identifikation automatisch entfernen - kann z.Bsp. passieren, wenn man sie via Zwischenablage eingefügt hat + * NEW: 0790 Im Kategorieauswahldialog die Namen der übergeordneten Kategorien mit anzeigen, wenn nach Eingabe eines Suchbegriffs nicht mehr ersichtlich ist, zu welcher übergeordneten Kategorie der Eintrag gehört - siehe https://homebanking-hilfe.de/forum/topic.php?t=22753 + * CHG: 0780 Eingabefelder für Benutzer- und Kundenkennung auf 30 Zeichen verlängert - siehe https://homebanking-hilfe.de/forum/topic.php?p=144122#real144122 + * DEL: 0779 Haspa-Sonderbehandlung für die neue URL ab 20.04. wieder entfernt - die neue URL ist inzwischen in blz.properties enthalten + * BUG: 0778 XML-Export von Adressen war nicht mehr möglich + * NEW: 0777 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/0072d401187a69a451eae1cbe928da3e2be6109f mit neuer BLZ-Datei per 20.04.2019 + * NEW: 0776 Beim Erhalt eines neuen INI-Briefs den Bestätigungsdialog dedizierten Schließen-Button anzeigen um mehrfaches Drucken zu erlauben + * BUG: 0775 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/77d70ab120bbbdc06432f0798e1c665417b1cf31 - NPE beim Anlegen einer neuen Schlüsseldatei + * NEW: 0774 Import von mehreren CAMT-Dateien in einer ZIP-Datei + * BUG: 0773 Auswahl einer Kontogruppe in "Einnahmen/Ausgaben" führte zur Anzeige der Konten, die nicht in der Gruppe sind + * BUG: 0772 Elektr. Kontoauszug: "$"-Zeichen im Parameter "Kontoauszüge speichern in" erlauben - es kann tatsächlich Pfade mit diesem Zeichen geben + * NEW: 0771 Tolerieren, wenn die Bank nur Warnings - auch mehrere - gesendet hat + * NEW: 0770 Nach der Synchronisierung nur jene Warnungen in der Zusammenfassung anzeigen, die sich nicht darauf beziehen, dass lediglich bei der Bank keine neuen Daten vorlagen + * NEW: 0769 Neuer Zeitfilter "Monat: Letzte 12" + * CHG: 0768 Bei der Auswertung der Bankantwort jetzt generell tolerieren, wenn die Bank keinen Erfolgscode meldet sondern nur eine Warnung (siehe auch 0739 und 0757) + +2019-04-05 Version 2.8.12 + + * BUG: 0767 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/31dcfdb0ad2313efd6f3e1596cba14314e59b232 - Fehler bei Erkennung des AES-Passport-Formats unter Java 8 + +2019-04-04 Version 2.8.11 + + * NEW: 0766 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/d0151ef400d59689fc836ccbe6664b45c918aebf + * NEW: 0765 Fenstergröße des Kategorie-Auswahl-Dialogs speichern - siehe https://homebanking-hilfe.de/forum/topic.php?p=143616#real143616 + * NEW: 0764 Fehlermeldungen bei HBCI-Synchronisierung am Ende noch etwas deutlicher hervorheben + * CHG: 0763 Default-Limit für PINs auf 50 Zeichen erhöht + * NEW: 0762 Fenstergröße des Adressauswahl-Dialogs speichern - siehe https://homebanking-hilfe.de/forum/topic.php?p=143572#real143572 + * NEW: 0761 Einnahmen/Ausgaben: Deaktivierte Konten ausblendbar - siehe https://homebanking-hilfe.de/forum/topic.php?t=22649 + * NEW: 0760 HASPA: Bei Anlage eines neuen Bankzugangs automatisch die neue URL vorschlagen, wenn das Systemdatum der Umstellungstag 20.04.2019 ist + * BUG: 0759 Nachtrag zu BUGZILLA 1860 - Bei langen Banknachricht wurde der Scrollbalken u.U. nicht angezeigt, weil die Höhe des Textes vom Control scheinbar falsch berechnet wurde + * NEW: 0758 Neue obantoo-Version mit aktualisierter BLZ-Datei gültig ab 04.03.2019 + * BUG: 0757 Code 3290 ebenfalls tolerieren (keine Dauerauftraege beim Abruf) + * BUG: 0756 Wertebereich für PmtInfId noch etwas eingeschränkt (RestrictedIdentificationSEPA1) + * BUG: 0755 Neues Feld mit der Mandatsreferenz wurde in der globalen Suche noch nicht berücksichtigt + * NEW: 0754 Neues CSV-Exportformat für "Einnahmen/Ausgaben" + * BUG: 0753 In Export "PDF-Format: Summen aller Kategorien mit Einnahmen und Ausgaben" war die Summenzeile nicht korrekt + * NEW: 0752 Feature #170 - Beim MT940-Export "pro Buchung eine logische Datei" ebenfalls immer chronologisch sortieren + * NEW: 0751 Feature #169 - Beim MT940-Export von CAMT-Umsätzen die Tags EREF, KREF und MREF mit berücksichtigen + * BUG: 0750 Bug #168 - Beim MT940-Export von CAMT-Umsätzen muss der Verwendungszweck pro 65 Zeichen umgebrochen werden. Mehr ist in MT940 nicht erlaubt, CAMT hat jedoch 140 Zeichen + * NEW: 0749 Feature #162 - neues dediziertes Feld für die Mandatsreferenz in Umsatzbuchungen + * BUG: 0748 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/4e8226142e319a3b6aabda7ef2a6bfdcf85c2b10 - Verbindung zum Kartenleser nur im Fehlerfall schliessen + * NEW: 0747 Sicherheitsabfrage beim Löschen eines Kontos stark erweitert. Zeigt jetzt auch die Anzahl der ebenfalls zu löschenden zugeordneten Daten an sowie eine extra Checkbox + * BUG: 0746 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/81a27b51809c6d7c0baa2ccd3e176cbf81d6a66c - automatisches Korrigieren von Passport-Dateinamen bei Chipkarten + * BUG: 0745 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/cac9ce383829e6d2a4a4c9349075b6be6a22dd76 - smsTAN in HHD-Version 1.3 wurde falsch als QR-TAN erkannt. + * NEW: 0744 Neue HBCI4Java-Version https://github.com/hbci4j/hbci4java/commit/5b28ebb5e1497c49547f28feeeadc8124bdb2d4e mit neuem PassportStorage + 2019-01-30 Version 2.8.10 * BUG: 0743 Nachtrag zu 0739 - einschränkenden Text "liegen keine" bzw. "keine Umsätze" entfernt, da noch weitere Textkombinationen existieren diff -Nru hibiscus-2.8.10+dfsg/debian/changelog hibiscus-2.8.21+dfsg/debian/changelog --- hibiscus-2.8.10+dfsg/debian/changelog 2019-01-30 20:11:43.000000000 +0000 +++ hibiscus-2.8.21+dfsg/debian/changelog 2019-12-21 19:26:48.000000000 +0000 @@ -1,3 +1,11 @@ +hibiscus (2.8.21+dfsg-1+deb10u1) buster; urgency=medium + + * New upstream version 2.8.21+dfsg (Closes: #946794) + * Update copyright + * Depend on new hbci4java version + + -- Jochen Sprickerhof Sat, 21 Dec 2019 20:26:48 +0100 + hibiscus (2.8.10+dfsg-1) unstable; urgency=medium * New upstream version 2.8.10+dfsg diff -Nru hibiscus-2.8.10+dfsg/debian/control hibiscus-2.8.21+dfsg/debian/control --- hibiscus-2.8.10+dfsg/debian/control 2019-01-30 20:08:36.000000000 +0000 +++ hibiscus-2.8.21+dfsg/debian/control 2019-12-21 19:26:48.000000000 +0000 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Debian Java maintainers Uploaders: Jochen Sprickerhof -Build-Depends: debhelper (>= 11), default-jdk, javahelper, ant, jameica, libhbci4j-core-java, libitext5-java, libobantoo-java, libsuper-csv-java, libswtchart-java +Build-Depends: debhelper (>= 11), default-jdk, javahelper, ant, jameica, libhbci4j-core-java (>= 3.1.29), libitext5-java, libobantoo-java, libsuper-csv-java, libswtchart-java Standards-Version: 4.3.0 Rules-Requires-Root: no Homepage: https://www.willuhn.de/products/hibiscus/ @@ -12,7 +12,7 @@ Package: hibiscus Architecture: all -Depends: ${misc:Depends}, jameica, libhbci4j-core-java, libitext5-java, libobantoo-java, libsuper-csv-java, libswtchart-java, libpostgresql-jdbc-java +Depends: ${misc:Depends}, jameica, libhbci4j-core-java (>= 3.1.29), libitext5-java, libobantoo-java, libsuper-csv-java, libswtchart-java, libpostgresql-jdbc-java Recommends: ${java:Recommends} Description: Java online banking client using the HBCI standard A Java based, platform independent (running on Linux, Windows, OS X, OpenBSD, diff -Nru hibiscus-2.8.10+dfsg/debian/copyright hibiscus-2.8.21+dfsg/debian/copyright --- hibiscus-2.8.10+dfsg/debian/copyright 2019-01-30 20:08:36.000000000 +0000 +++ hibiscus-2.8.21+dfsg/debian/copyright 2019-12-21 19:23:25.000000000 +0000 @@ -5,7 +5,7 @@ Comment: binary libraries (and related meta files) Files: * -Copyright: 2004-2018 Olaf Willuhn +Copyright: 2004-2019 Olaf Willuhn License: GPL-2+-with-CLASSPATH-exception Jameica is licensed under the terms of the GNU General Public License version 2 or later. diff -Nru hibiscus-2.8.10+dfsg/debian/patches/0006-Update-hbci4java-version.patch hibiscus-2.8.21+dfsg/debian/patches/0006-Update-hbci4java-version.patch --- hibiscus-2.8.10+dfsg/debian/patches/0006-Update-hbci4java-version.patch 1970-01-01 00:00:00.000000000 +0000 +++ hibiscus-2.8.21+dfsg/debian/patches/0006-Update-hbci4java-version.patch 2019-12-21 19:26:48.000000000 +0000 @@ -0,0 +1,21 @@ +From: Jochen Sprickerhof +Date: Sat, 21 Dec 2019 20:23:41 +0100 +Subject: Update hbci4java version + +--- + src/de/willuhn/jameica/hbci/HBCI.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/de/willuhn/jameica/hbci/HBCI.java b/src/de/willuhn/jameica/hbci/HBCI.java +index bdc858f..4fbf33b 100644 +--- a/src/de/willuhn/jameica/hbci/HBCI.java ++++ b/src/de/willuhn/jameica/hbci/HBCI.java +@@ -75,7 +75,7 @@ public class HBCI extends AbstractPlugin + */ + public final static HashMap LOGMAPPING = new HashMap(); + +- private final static String HBCI4JAVA_VERSION = "3.1.24"; ++ private final static String HBCI4JAVA_VERSION = "3.1.29"; + + private HBCICallback callback = null; + private Properties hbciProps = null; diff -Nru hibiscus-2.8.10+dfsg/debian/patches/series hibiscus-2.8.21+dfsg/debian/patches/series --- hibiscus-2.8.10+dfsg/debian/patches/series 2019-01-30 20:11:14.000000000 +0000 +++ hibiscus-2.8.21+dfsg/debian/patches/series 2019-12-21 19:26:48.000000000 +0000 @@ -3,3 +3,4 @@ 0003-Add-workaround-for-H2-197.patch 0004-Remove-ZUGFeRDImporter-missing-dependencies.patch 0005-Use-mariadb-as-default-driver.patch +0006-Update-hbci4java-version.patch diff -Nru hibiscus-2.8.10+dfsg/lib/velocity/de.willuhn.jameica.hbci.rmi.EinnahmeAusgabeZeitraum.csv.vm hibiscus-2.8.21+dfsg/lib/velocity/de.willuhn.jameica.hbci.rmi.EinnahmeAusgabeZeitraum.csv.vm --- hibiscus-2.8.10+dfsg/lib/velocity/de.willuhn.jameica.hbci.rmi.EinnahmeAusgabeZeitraum.csv.vm 1970-01-01 00:00:00.000000000 +0000 +++ hibiscus-2.8.21+dfsg/lib/velocity/de.willuhn.jameica.hbci.rmi.EinnahmeAusgabeZeitraum.csv.vm 2019-11-02 14:14:17.000000000 +0000 @@ -0,0 +1,16 @@ +"Konto";"Anfangssaldo";"Einnahmen";"Ausgaben";"Endsaldo";"Plus/Minus";"Differenz" +#foreach($ea in $objects) +#if($!ea.getClass().getSimpleName().equals("EinnahmeAusgabe")) +"$!{ea.Text}";"$!{decimalformat.format(${ea.anfangssaldo})}";"$!{decimalformat.format(${ea.einnahmen})}";"$!{decimalformat.format(${ea.ausgaben})}";"$!{decimalformat.format(${ea.endsaldo})}";"$!{decimalformat.format(${ea.plusminus})}";"$!{decimalformat.format(${ea.differenz})}" +#else +"$!{dateformat.format(${ea.startdatum})} - $!{dateformat.format(${ea.enddatum})}";"";"";"";"";"";"" +#set($it = $ea.getChildren()) +#foreach($i in [0..100]) +#if(!$it.hasNext()) + #break +#end +#set($myea = $it.next()) +"$!{myea.Text}";"$!{decimalformat.format(${myea.anfangssaldo})}";"$!{decimalformat.format(${myea.einnahmen})}";"$!{decimalformat.format(${myea.ausgaben})}";"$!{decimalformat.format(${myea.endsaldo})}";"$!{decimalformat.format(${myea.plusminus})}";"$!{decimalformat.format(${myea.differenz})}" +#end +#end +#end \ No newline at end of file diff -Nru hibiscus-2.8.10+dfsg/plugin.xml hibiscus-2.8.21+dfsg/plugin.xml --- hibiscus-2.8.10+dfsg/plugin.xml 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/plugin.xml 2019-11-02 14:14:17.000000000 +0000 @@ -3,10 +3,10 @@ + name="hibiscus" version="2.8.21" class="de.willuhn.jameica.hbci.HBCI"> HBCI-Onlinebanking-Plugin für Jameica - https://www.willuhn.de/products/hibiscus/releases/2.8/hibiscus-2.8.10.zip + https://www.willuhn.de/products/hibiscus/releases/2.8/hibiscus-2.8.21.zip http://www.willuhn.de/products/hibiscus GPL - http://www.gnu.org/copyleft/gpl.html hibiscus-large.png diff -Nru hibiscus-2.8.10+dfsg/sql/h2-create.sql hibiscus-2.8.21+dfsg/sql/h2-create.sql --- hibiscus-2.8.10+dfsg/sql/h2-create.sql 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/sql/h2-create.sql 2019-11-02 14:14:17.000000000 +0000 @@ -195,6 +195,8 @@ txid varchar(100), purposecode varchar(10), endtoendid varchar(100), + mandateid varchar(100), + empfaenger_name2 varchar(255), UNIQUE (id), PRIMARY KEY (id) ); @@ -446,6 +448,6 @@ CREATE INDEX idx_umsatz_valuta ON umsatz(valuta); CREATE INDEX idx_umsatz_flags ON umsatz(flags); -INSERT INTO version (name,version) values ('db',65); +INSERT INTO version (name,version) values ('db',66); COMMIT; diff -Nru hibiscus-2.8.10+dfsg/sql/mysql-create.sql hibiscus-2.8.21+dfsg/sql/mysql-create.sql --- hibiscus-2.8.10+dfsg/sql/mysql-create.sql 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/sql/mysql-create.sql 2019-11-02 14:14:17.000000000 +0000 @@ -304,6 +304,8 @@ , txid varchar(100) , purposecode varchar(10) , endtoendid varchar(100) + , mandateid varchar(100) + , empfaenger_name2 varchar(255) , UNIQUE (id) , PRIMARY KEY (id) ) ENGINE=InnoDB; @@ -475,4 +477,4 @@ ALTER TABLE ueberweisung ADD INDEX (termin); ALTER TABLE lastschrift ADD INDEX (termin); -INSERT INTO version (name,version) values ('db',65); +INSERT INTO version (name,version) values ('db',66); diff -Nru hibiscus-2.8.10+dfsg/sql/postgresql-create.sql hibiscus-2.8.21+dfsg/sql/postgresql-create.sql --- hibiscus-2.8.10+dfsg/sql/postgresql-create.sql 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/sql/postgresql-create.sql 2019-11-02 14:14:17.000000000 +0000 @@ -174,7 +174,9 @@ addkey varchar(3) NULL, txid varchar(100), purposecode varchar(10), - endtoendid varchar(100) + endtoendid varchar(100), + mandateid varchar(100), + empfaenger_name2 varchar(255) ); CREATE TABLE umsatztyp ( @@ -392,4 +394,4 @@ CREATE INDEX idx_umsatz_valuta ON umsatz(valuta); CREATE INDEX idx_umsatz_flags ON umsatz(flags); -INSERT INTO version (name,version) values ('db',65); +INSERT INTO version (name,version) values ('db',66); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/HBCI.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/HBCI.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/HBCI.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/HBCI.java 2019-11-02 14:14:17.000000000 +0000 @@ -29,6 +29,7 @@ import de.willuhn.jameica.hbci.rmi.HBCIDBService; import de.willuhn.jameica.hbci.server.DBSupportH2Impl; import de.willuhn.jameica.hbci.server.HBCIDBServiceImpl; +import de.willuhn.jameica.messaging.BootMessage; import de.willuhn.jameica.plugin.AbstractPlugin; import de.willuhn.jameica.plugin.Version; import de.willuhn.jameica.services.BeanService; @@ -40,7 +41,7 @@ import de.willuhn.util.I18N; /** - * + * Basis-Plugin-Klasse von Hibiscus. */ public class HBCI extends AbstractPlugin { @@ -73,6 +74,8 @@ * Mapper von HBCI4Java nach jameica Loglevels */ public final static HashMap LOGMAPPING = new HashMap(); + + private final static String HBCI4JAVA_VERSION = "3.1.24"; private HBCICallback callback = null; private Properties hbciProps = null; @@ -215,6 +218,18 @@ this.hbciProps.put("client.product.name","A44C2953982351617D475443E"); // Das ist die offizielle Produktkennung von Hibiscus - siehe http://hbci-zka.de/register/register_faq.htm this.hbciProps.put("client.product.version",v.getMajor() + "." + v.getMinor()); // Maximal 5 Zeichen + // Default-Passport-Format Legacy + this.hbciProps.put("passport.format", "LegacyFormat"); + + // Die Passports, die im Fehlerfall einfach neu erstellt werden koennen, konvetieren wir auf AESFormat + this.hbciProps.put("passport.format.HBCIPassportPinTan", "AESFormat"); + this.hbciProps.put("passport.format.HBCIPassportDDV", "AESFormat"); + this.hbciProps.put("passport.format.HBCIPassportDDVPCSC","AESFormat"); + this.hbciProps.put("passport.format.HBCIPassportDDVRSA", "AESFormat"); + + // Die Schluesseldateien lassen wir mal noch auf dem Legacy-Format. Denn wenn wir da einen Fehler haben, geht die kaputt + this.hbciProps.put("passport.format.HBCIPassportRDHNew", "LegacyFormat"); + ////////////////////////////////// // Log-Level int logLevel = HBCIUtils.LOG_INFO; // Default @@ -274,9 +289,20 @@ ////////////////////////////////// HBCIUtils.init(this.hbciProps,this.callback); + + final String version = HBCIUtils.version(); + if (version != null && !HBCI4JAVA_VERSION.equals(version)) + { + final String s = "Die Version der Systembibliothek HBCI4Java \"{0}\" stimmt nicht mit der erwarteten Version \"{1}\" überein. " + + "Das wird zu unerwarteten Fehlern führen. Bitte kopiere eine neuere Version von Hibiscus nicht über " + + "die vorherige drüber. Hierbei können Fragmente der vorherigen Version erhalten bleiben. Installiere Updates " + + "stattdessen per \"Datei->Einstellungen->Plugins\"."; + Application.getMessagingFactory().getMessagingQueue("jameica.boot").queueMessage(new BootMessage(getResources().getI18N().tr(s,version,HBCI4JAVA_VERSION))); + } } catch (Exception e) { + Logger.error("unable to init HBCI4Java",e); throw new ApplicationException(getResources().getI18N().tr("Fehler beim Initialisieren des HBCI-Subsystems"),e); } } @@ -371,71 +397,3 @@ } } - - -/********************************************************************** - * $Log: HBCI.java,v $ - * Revision 1.127 2012/04/23 21:03:41 willuhn - * @N BUGZILLA 1227 - * - * Revision 1.126 2012/03/06 23:23:34 willuhn - * @N BUGZILLA 1129 - * - * Revision 1.125 2011-10-12 16:15:38 willuhn - * @C Neue Wiki-URL - * - * Revision 1.124 2011-06-19 12:03:19 willuhn - * @N Wallet loeschen, wenn bei der Deinstallation die Benutzerdaten geloescht werden sollen - * - * Revision 1.123 2011-06-17 16:06:58 willuhn - * @N Die MessageConsumer fuer die benamten Queues werden jetzt in plugin.xml deklariert - * - * Revision 1.122 2011-06-01 21:21:31 willuhn - * *** empty log message *** - * - * Revision 1.121 2010-11-02 11:32:09 willuhn - * @R Alten SQL-Update-Mechanismus komplett entfernt. Wir haben das jetzt seit Hibiscus 1.8 (2008) aus Migrationsgruenden mit uns herumgetragen. Das ist jetzt lange genug her. User, die noch Hibiscus < 1.8 nutzen, muessen jetzt erst auf 1.8 updaten, damit noch die letzten sql/update_x.y-x.y.sql ausgefuehrt werden und dann erst auf die aktuelle Version - * - * Revision 1.120 2010/05/15 19:05:56 willuhn - * @N BUGZILLA 865 - * - * Revision 1.119 2010/03/18 11:37:59 willuhn - * @N Ausfuehrlichere und hilfreichere Fehlermeldung, wenn Hibiscus-Datenbank defekt ist oder nicht geoeffnet werden konnte. - * - * Revision 1.118 2009/10/14 14:29:35 willuhn - * @N Neuer HBCI4Java-Snapshot (2.5.11) - das SSL-Logging kann nun auch via HBCICallback in das jameica.log geleitet werden (wenn kein log.ssl.filename angegeben ist). Damit kann das Flag "log.ssl.enable" automatisch von Hibiscus aktiviert/deaktiviert werden, wenn das Jameica-Loglevel auf DEBUG oder !DEBUG steht - * - * Revision 1.117 2009/10/14 11:11:49 willuhn - * @N neuer HBCI4Java-Snapshot (2.5.11), der die neuen Parameter "log.ssl.enable" und "log.ssl.filename" mitbringt, um die PIN/TAN-Kommunikation auf HTTP-Ebene zu Debugging-Zwecken mitschneiden zu koennen - * @N Moeglichkeit, HBCI4Java mit zusaetzlichen eigenen Parametern aus ~/.jameica/hibiscus/hbci4java.properties initialisieren zu koennen - * - * Revision 1.116 2009/03/18 22:08:25 willuhn - * *** empty log message *** - * - * Revision 1.115 2009/02/17 00:00:02 willuhn - * @N BUGZILLA 159 - Erster Code fuer Auslands-Ueberweisungen - * - * Revision 1.114 2009/01/04 17:22:14 willuhn - * @B service.checkConsistency versehentlich entfernt - dadurch wurden keine Datenbank-Updates mehr durchgefuehrt. - * - * Revision 1.113 2008/12/31 12:17:37 willuhn - * @B client.product.name darf hoechstens 25 Zeichen lang sein - * - * Revision 1.112 2008/12/30 15:21:40 willuhn - * @N Umstellung auf neue Versionierung - * - * Revision 1.111 2008/11/04 11:55:17 willuhn - * @N Update auf HBCI4Java 2.5.9 - * - * Revision 1.110 2008/09/26 15:37:47 willuhn - * @N Da das Messaging-System inzwischen Consumer solange sammeln kann, bis sie initialisiert ist, besteht kein Bedarf mehr, das explizite Registrieren von Consumern bis zum Versand der SystemMessage.SYSTEM_STARTED zu verzoegern - * - * Revision 1.109 2008/08/29 16:46:24 willuhn - * @N BUGZILLA 616 - * - * Revision 1.108 2008/01/25 12:24:05 willuhn - * @B Messaging-Consumer zu frueh registriert - * - * Revision 1.107 2008/01/03 18:20:31 willuhn - * @N geaendertes Jameica-Loglevel live in HBCI4Java uebernehmen - **********************************************************************/ \ No newline at end of file diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/HBCICallbackSWT.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/HBCICallbackSWT.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/HBCICallbackSWT.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/HBCICallbackSWT.java 2019-11-02 14:14:17.000000000 +0000 @@ -66,7 +66,7 @@ { SynchronizeSession session = this.backend.getCurrentSession(); - boolean log = true; + boolean mon = true; String type = null; switch (level) @@ -74,47 +74,51 @@ case HBCIUtils.LOG_INTERN: case HBCIUtils.LOG_DEBUG2: Logger.trace(msg); - log = false; + mon = false; break; case HBCIUtils.LOG_DEBUG: Logger.debug(msg); - log = false; + mon = false; break; case HBCIUtils.LOG_INFO: + this.updateProgress(); Logger.info(msg); break; case HBCIUtils.LOG_WARN: + this.updateProgress(); // Die logge ich mit DEBUG - die nerven sonst - type = "warn"; - if (msg != null && (msg.startsWith("konnte folgenden nutzerdefinierten Wert nicht in Nachricht einsetzen:") || - msg.startsWith("could not insert the following user-defined data")) - ) + type = "Hinweis"; + if (msg != null && (msg.startsWith("konnte folgenden nutzerdefinierten Wert nicht in Nachricht einsetzen:") || msg.startsWith("could not insert the following user-defined data"))) { Logger.debug(msg); - log = false; + mon = false; break; } if (msg != null && msg.matches(".* Algorithmus .* nicht implementiert")) { Logger.debug(msg); - log = false; + mon = false; break; } Logger.warn(msg); break; case HBCIUtils.LOG_ERR: + this.updateProgress(); if (session != null && session.getStatus() == ProgressMonitor.STATUS_CANCEL) { - log = false; + mon = false; break; } else { - type = "error"; + if (session != null && msg != null) + session.getErrors().add(msg.replace("HBCI error code: ","")); + + type = "Fehler"; Logger.error(msg + " " + trace.toString()); break; } @@ -123,21 +127,22 @@ Logger.warn(msg); } - if (log && session != null) + if (mon && session != null) { ProgressMonitor monitor = session.getProgressMonitor(); if (type != null) - monitor.log("[" + type + "] " + msg); + monitor.log(" [" + type + "] " + msg); else - monitor.log(msg); + monitor.log(" " + msg); } } /** * @see org.kapott.hbci.callback.HBCICallback#callback(org.kapott.hbci.passport.HBCIPassport, int, java.lang.String, int, java.lang.StringBuffer) */ - public void callback(HBCIPassport passport, int reason, String msg, int datatype, StringBuffer retData) { - + public void callback(HBCIPassport passport, int reason, String msg, int datatype, StringBuffer retData) + { + this.updateProgress(); SynchronizeSession session = this.backend.getCurrentSession(); try { @@ -361,6 +366,7 @@ return; SynchronizeSession session = this.backend.getCurrentSession(); + this.updateProgress(); if (session != null) { @@ -368,6 +374,32 @@ monitor.log(text + "\n"); } } + + /** + * Schreibt den Fortschrittsbalken etwas weiter. + */ + private void updateProgress() + { + final SynchronizeSession session = this.backend.getCurrentSession(); + if (session == null) + return; + + ProgressMonitor m = session.getProgressMonitor(); + if (m == null) + return; + + // Das ist die Gesamt-Zahl der Prozentpunkte, die wir zur Verfuegung haben + double window = session.getProgressWindow(); + if (window <= 1d) + return; + + // Wir wissen nicht wirklich, wie oft wir aufgerufen werden. + // Daher machen wir das hier nur geschaetzt + m.addPercentComplete(1); + session.setProgressWindow(window - 0.2d); + + + } /** * Speichert das aktuelle Handle. diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/HBCIProperties.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/HBCIProperties.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/HBCIProperties.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/HBCIProperties.java 2019-11-02 14:14:17.000000000 +0000 @@ -18,6 +18,7 @@ import java.util.Set; import org.apache.commons.lang.StringUtils; +import org.kapott.hbci.manager.BankInfo; import org.kapott.hbci.manager.HBCIUtils; import org.kapott.hbci.passport.HBCIPassport; import org.kapott.hbci.structures.Konto; @@ -78,6 +79,11 @@ public final static String HBCI_SEPA_MANDATE_VALIDCHARS = settings.getString("hbci.sepa.mandate.validchars", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789':?,-(+.)/"); /** + * Liste der fuer die Referenz gueltigen Zeichen. RestrictedIdentificationSEPA1. + */ + public final static String HBCI_SEPA_PMTINF_VALIDCHARS = HBCI_SEPA_MANDATE_VALIDCHARS + " "; + + /** * Liste der in einer IBAN erlaubten Zeichen. */ public final static String HBCI_IBAN_VALIDCHARS = settings.getString("hbci.iban.validchars", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); @@ -201,7 +207,7 @@ /** * Maximale Laenge fuer PINs. */ - public final static int HBCI_PIN_MAXLENGTH = settings.getInt("hbci.pin.maxlength",20); + public final static int HBCI_PIN_MAXLENGTH = settings.getInt("hbci.pin.maxlength",50); /** * Minimale Laenge fuer PINs. @@ -414,7 +420,17 @@ // Normalerweise nicht noetig. Es gibt aber einige Banken, die z.Bsp. folgenden // Namen haben: "Landesbank Baden-Württemberg/Baden-Württembergische Bank" // Das verzerrt sonst die Layouts an einigen Stellen - return StringUtils.abbreviateMiddle(bank.getBezeichnung(),"...",38); + return StringUtils.abbreviateMiddle(bank.getBezeichnung(),"...",24); + } + + /** + * Liefert die Bankdaten fuer die Bank. + * @param blz die BLZ. + * @return die Bankdaten. NULL, wenn sie nicht gefunden wurden. + */ + public static BankInfo getBankInfo(String blz) + { + return HBCIUtils.getBankInfo(blz); } /** diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/MetaKey.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/MetaKey.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/MetaKey.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/MetaKey.java 2019-11-02 14:14:17.000000000 +0000 @@ -100,7 +100,12 @@ /** * Legt fest, ob CAMT fuer den Umsatz-Abruf verwendet werden soll. */ - UMSATZ_CAMT("umsatz.camt","CAMT-Format für Umsatz-Abruf verwenden",null); + UMSATZ_CAMT("umsatz.camt","CAMT-Format für Umsatz-Abruf verwenden",null), + + /** + * TAN-Eingabe abgebrochen + */ + TAN_CANCEL("sync.tan-cancel","TAN-Eingabe abgebrochen",null), ; diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/HBCIAccountPinTan.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/HBCIAccountPinTan.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/HBCIAccountPinTan.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/HBCIAccountPinTan.java 2019-11-02 14:14:17.000000000 +0000 @@ -17,7 +17,6 @@ { private String blz = null; private String url = null; - private String version = null; private String customer = null; private String username = null; @@ -40,24 +39,6 @@ } /** - * Liefert die HBCI-Version. - * @return version - */ - public String getVersion() - { - return this.version; - } - - /** - * Speichert die HBCI-Version. - * @param version version - */ - public void setVersion(String version) - { - this.version = version; - } - - /** * Liefert die URL. * @return die URL. */ diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/HBCIVariantChipcard.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/HBCIVariantChipcard.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/HBCIVariantChipcard.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/HBCIVariantChipcard.java 2019-11-02 14:14:17.000000000 +0000 @@ -32,7 +32,7 @@ @Override public String getName() { - return i18n.tr("Chipkarte"); + return i18n.tr("DDV-Chipkarte"); } /** @@ -44,7 +44,7 @@ InfoPanel info = new InfoPanel(); info.setTitle(this.getName()); info.setText(i18n.tr("Verwenden Sie dieses Verfahren, wenn Sie eine spezielle HBCI-Chipkarte besitzen.")); - info.setComment(i18n.tr("Sie benötigen hierfür zusätzlich ein Chipkarten-Lesegerät mit USB-Anschluss.")); + info.setComment(i18n.tr("Sie benötigen hierfür zusätzlich ein Chipkarten-Lesegerät mit USB-Anschluss.\nFalls Sie ChipTAN USB nutzen möchten, wählen Sie stattdessen PIN/TAN.")); info.setUrl("http://www.willuhn.de/wiki/doku.php?id=support:list:kartenleser"); info.setIcon("gcr-smart-card.png"); return info; diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/HBCIVariantPinTan.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/HBCIVariantPinTan.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/HBCIVariantPinTan.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/HBCIVariantPinTan.java 2019-11-02 14:14:17.000000000 +0000 @@ -48,7 +48,7 @@ InfoPanel info = new InfoPanel(); info.setTitle(this.getName()); info.setText(i18n.tr("Verwenden Sie dieses Verfahren, wenn Sie PIN/TAN (z.Bsp. smsTAN oder chipTAN mit TAN-Generator) nutzen möchten.")); - info.setComment(i18n.tr("Das PIN/TAN-Verfahren wird von den meisten Banken unterstützt.")); + info.setComment(i18n.tr("Wenn Sie nicht sicher sind, welches Verfahren Ihre Bank verwendet, wählen Sie im Zweifel PIN/TAN.\nDas PIN/TAN-Verfahren wird von den meisten Banken unterstützt.")); info.setUrl("http://www.willuhn.de/wiki/doku.php?id=support:list:tan-verfahren"); info.setIcon("hbci-pintan.png"); return info; diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/action/HBCIVariantPinTanTest.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/action/HBCIVariantPinTanTest.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/action/HBCIVariantPinTanTest.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/action/HBCIVariantPinTanTest.java 2019-11-02 14:14:17.000000000 +0000 @@ -140,9 +140,6 @@ conf = new PinTanConfigImpl(PinTanConfigFactory.load(f),f); conf.setBezeichnung(account.getBlz()); - if (account.getVersion() != null) - conf.setHBCIVersion(account.getVersion()); - PinTanConfigFactory.store(conf); if (stop) diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/controller/HBCIVariantPinTanController.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/controller/HBCIVariantPinTanController.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/controller/HBCIVariantPinTanController.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/controller/HBCIVariantPinTanController.java 2019-11-02 14:14:17.000000000 +0000 @@ -10,7 +10,6 @@ package de.willuhn.jameica.hbci.accounts.hbci.controller; -import java.rmi.RemoteException; import java.util.List; import org.apache.commons.lang.StringUtils; @@ -18,7 +17,6 @@ import org.eclipse.swt.widgets.Listener; import org.kapott.hbci.manager.BankInfo; import org.kapott.hbci.manager.HBCIUtils; -import org.kapott.hbci.manager.HBCIVersion; import de.willuhn.annotation.Lifecycle; import de.willuhn.annotation.Lifecycle.Type; @@ -32,10 +30,8 @@ import de.willuhn.jameica.hbci.accounts.hbci.action.HBCIVariantPinTanTest; import de.willuhn.jameica.hbci.accounts.hbci.views.HBCIVariantPinTanStep2; import de.willuhn.jameica.hbci.gui.input.BankInfoInput; -import de.willuhn.jameica.hbci.gui.input.HBCIVersionInput; import de.willuhn.jameica.messaging.StatusBarMessage; import de.willuhn.jameica.system.Application; -import de.willuhn.logging.Logger; import de.willuhn.util.ApplicationException; import de.willuhn.util.I18N; @@ -50,7 +46,6 @@ private HBCIAccountPinTan account = new HBCIAccountPinTan(); private BankInfoInput bank = null; private URLInput url = null; - private HBCIVersionInput version = null; private TextInput customer = null; private TextInput username = null; @@ -137,30 +132,6 @@ } /** - * Liefert ein Auswahl-Feld fuer die HBCI-Version. - * @return Auswahl-Feld fuer die HBCI-Version. - */ - public HBCIVersionInput getVersion() - { - if (this.version != null) - return this.version; - - try - { - this.version = new HBCIVersionInput(); - this.version.setPreselected(HBCIVersion.HBCI_300.getId()); - this.version.setComment(i18n.tr("HBCI-Version (meist FinTS 3.0)")); - this.version.addListener(this.step1Listener); - return this.version; - } - catch (RemoteException re) - { - Logger.error("unable to create hbci-version input",re); - } - return null; - } - - /** * Liefert den Listener zur Freigabe des ersten Weiter-Buttons. * @return der Listener zur Freigabe des ersten Weiter-Buttons. */ @@ -222,7 +193,7 @@ if (this.step1 != null) return this.step1; - this.step1 = new Button(i18n.tr("Übernehmen"),new Action() { + this.step1 = new Button(i18n.tr("Weiter ..."),new Action() { @Override public void handleAction(Object context) throws ApplicationException { @@ -230,7 +201,6 @@ url = null; username = null; customer = null; - version = null; GUI.startView(HBCIVariantPinTanStep2.class,HBCIVariantPinTanController.this); } },null,true,"go-next.png"); @@ -247,7 +217,7 @@ if (this.step2 != null) return this.step2; - this.step2 = new Button(i18n.tr("Bankzugang jetzt testen..."),new HBCIVariantPinTanTest(),this.account,true,"mail-send-receive.png"); + this.step2 = new Button(i18n.tr("Weiter ..."),new HBCIVariantPinTanTest(),this.account,true,"mail-send-receive.png"); this.step2.setEnabled(false); return this.step2; } @@ -361,8 +331,6 @@ // Fallback, falls die Bank nicht bekannt ist if (account.getBlz() == null) account.setBlz(getBank().getText()); - - account.setVersion((String) getVersion().getValue()); } } } diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/views/HBCIVariantPinTanStep1.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/views/HBCIVariantPinTanStep1.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/views/HBCIVariantPinTanStep1.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/views/HBCIVariantPinTanStep1.java 2019-11-02 14:14:17.000000000 +0000 @@ -17,6 +17,7 @@ import de.willuhn.jameica.gui.GUI; import de.willuhn.jameica.gui.input.Input; +import de.willuhn.jameica.gui.internal.buttons.Back; import de.willuhn.jameica.gui.parts.ButtonArea; import de.willuhn.jameica.gui.parts.InfoPanel; import de.willuhn.jameica.gui.util.Container; @@ -37,7 +38,7 @@ @Override public void bind() throws Exception { - GUI.getView().setTitle(i18n.tr("Neuer FinTS/HBCI-Bankzugang PIN/TAN...")); + GUI.getView().setTitle(i18n.tr("Neuer FinTS/HBCI-Bankzugang PIN/TAN - Schritt 1 von 3")); final HBCIVariantPinTanController control = this.getController(HBCIVariantPinTanController.class); @@ -55,17 +56,14 @@ final Input bank = control.getBank(); final Input url = control.getURL(); - final Input version = control.getVersion(); cs.addPart(bank); cs.addPart(url); - if (version != null) - cs.addPart(version); - bank.getControl().addListener(SWT.KeyUp,control.getStep1Listener()); url.getControl().addListener(SWT.KeyUp,control.getStep1Listener()); ButtonArea buttons = new ButtonArea(); + buttons.addButton(new Back()); buttons.addButton(control.getStep1Button()); buttons.paint(comp); } diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/views/HBCIVariantPinTanStep2.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/views/HBCIVariantPinTanStep2.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/views/HBCIVariantPinTanStep2.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/accounts/hbci/views/HBCIVariantPinTanStep2.java 2019-11-02 14:14:17.000000000 +0000 @@ -37,7 +37,7 @@ @Override public void bind() throws Exception { - GUI.getView().setTitle(i18n.tr("Neuer FinTS/HBCI-Bankzugang PIN/TAN...")); + GUI.getView().setTitle(i18n.tr("Neuer FinTS/HBCI-Bankzugang PIN/TAN - Schritt 2 von 3")); final HBCIVariantPinTanController control = this.getController(HBCIVariantPinTanController.class); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/experiments/AbstractHBCI4JavaFeature.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/experiments/AbstractHBCI4JavaFeature.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/experiments/AbstractHBCI4JavaFeature.java 1970-01-01 00:00:00.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/experiments/AbstractHBCI4JavaFeature.java 2019-11-02 14:14:17.000000000 +0000 @@ -0,0 +1,73 @@ +/********************************************************************** + * + * Copyright (c) 2019 Olaf Willuhn + * All rights reserved. + * + * This software is copyrighted work licensed under the terms of the + * Jameica License. Please consult the file "LICENSE" for details. + * + **********************************************************************/ + +package de.willuhn.jameica.hbci.experiments; + +import de.willuhn.jameica.hbci.HBCI; +import de.willuhn.jameica.system.Application; +import de.willuhn.util.I18N; + +/** + * Abstrakte Basis-Klasse fuer HBCI4Java-Features. + */ +public abstract class AbstractHBCI4JavaFeature implements Feature +{ + protected final static I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N(); + + private org.kapott.hbci.manager.Feature feature = null; + + /** + * ct. + * @param f das HBCI4Java-Feature. + */ + protected AbstractHBCI4JavaFeature(org.kapott.hbci.manager.Feature f) + { + this.feature = f; + } + + /** + * @see de.willuhn.jameica.hbci.experiments.Feature#getName() + */ + @Override + public String getName() + { + return this.feature.name(); + } + + /** + * @see de.willuhn.jameica.hbci.experiments.Feature#getDescription() + */ + @Override + public String getDescription() + { + return ""; + } + + /** + * @see de.willuhn.jameica.hbci.experiments.Feature#getDefault() + */ + @Override + public boolean getDefault() + { + return this.feature.getDefault(); + } + + /** + * @see de.willuhn.jameica.hbci.experiments.Feature#setEnabled(boolean) + */ + @Override + public void setEnabled(boolean enabled) + { + this.feature.setEnabled(enabled); + } + +} + + diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/experiments/Feature.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/experiments/Feature.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/experiments/Feature.java 1970-01-01 00:00:00.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/experiments/Feature.java 2019-11-02 14:14:17.000000000 +0000 @@ -0,0 +1,44 @@ +/********************************************************************** + * + * Copyright (c) 2019 Olaf Willuhn + * All rights reserved. + * + * This software is copyrighted work licensed under the terms of the + * Jameica License. Please consult the file "LICENSE" for details. + * + **********************************************************************/ + +package de.willuhn.jameica.hbci.experiments; + +/** + * Interface fuer ein aktivierbares/deaktivierbares Feature. + */ +public interface Feature +{ + /** + * Liefert einen eindeutigen Namen fuer das Feature. + * @return eindeutiger Name fuer das Feature. + */ + public String getName(); + + /** + * Liefert die Beschreibung des Features. + * @return die Beschreibung des Features. + */ + public String getDescription(); + + /** + * Liefert true, wenn das Feature per Default aktiv sein soll. + * @return true, wenn das Feature per Default aktiv sein soll. + */ + public boolean getDefault(); + + /** + * Aktiviert/deaktiviert das Feature. + * Wird automatisch beim Start von Hibiscus aufgerufen, um den gewuenschten Feature-Zustand herzustellen. + * @param enabled true, wenn das Feature aktiviert sein soll. + */ + public void setEnabled(boolean enabled); +} + + diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/experiments/FeatureService.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/experiments/FeatureService.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/experiments/FeatureService.java 1970-01-01 00:00:00.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/experiments/FeatureService.java 2019-11-02 14:14:17.000000000 +0000 @@ -0,0 +1,135 @@ +/********************************************************************** + * + * Copyright (c) 2019 Olaf Willuhn + * All rights reserved. + * + * This software is copyrighted work licensed under the terms of the + * Jameica License. Please consult the file "LICENSE" for details. + * + **********************************************************************/ + +package de.willuhn.jameica.hbci.experiments; + +import java.util.LinkedList; +import java.util.List; + +import javax.annotation.PostConstruct; + +import de.willuhn.annotation.Lifecycle; +import de.willuhn.annotation.Lifecycle.Type; +import de.willuhn.jameica.hbci.HBCI; +import de.willuhn.jameica.services.BeanService; +import de.willuhn.jameica.system.Application; +import de.willuhn.jameica.system.Settings; +import de.willuhn.logging.Logger; + +/** + * Implementierung des Services fuer den Zugriff auf die Features. + */ +@Lifecycle(Type.CONTEXT) +public class FeatureService +{ + private Settings settings = new Settings(FeatureService.class); + private List features = new LinkedList(); + + /** + * Initialisiert den Service. + */ + @PostConstruct + private void init() + { + final boolean enabled = this.enabled(); + + if (enabled) + Logger.info("loading experimental features"); + + // Auch wenn die Features nicht genutzt werden, muessen sie dennoch geladen werden, damit sie konfiguriert werden koennen + try + { + BeanService service = Application.getBootLoader().getBootable(BeanService.class); + Class[] found = Application.getPluginLoader().getManifest(HBCI.class).getClassLoader().getClassFinder().findImplementors(Feature.class); + for (Class c:found) + { + try + { + final Feature f = service.get(c); + this.features.add(f); + + if (enabled) + { + // Aktivieren/Deaktivieren - je nach gespeichertem Zustand + final boolean state = this.isEnabled(f); + Logger.info(" " + c.getSimpleName() + ": " + state); + f.setEnabled(state); + } + } + catch (Exception e) + { + Logger.error("unable to load feature " + c.getName() + ", skipping",e); + } + } + } + catch (Exception e) + { + Logger.error("unable to load experimental features",e); + } + } + + /** + * Liefert die Liste der experimentellen Features. + * @return Liste der experimentellen Features. + */ + public List getFeatures() + { + return this.features; + } + + /** + * Liefert den aktuellen Zustand des Features. + * @param f das Feature. + * @return der aktuelle Zustand des Features. + */ + public boolean isEnabled(Feature f) + { + // Wenn der Feature-Service inaktiv ist, liefern wir generell die Default-Werte + if (!this.enabled()) + return f.getDefault(); + + return this.settings.getBoolean(f.getName(),f.getDefault()); + } + + /** + * Aktiviert/Deaktiviert ein Feature. + * @param f das Feature. + * @param enabled true, wenn es aktiviert sein soll. + */ + public void setEnabled(Feature f, boolean enabled) + { + Logger.info("set feature " + f.getName() + ": " + enabled); + + // 1. Feature aktivieren/deaktivieren + f.setEnabled(enabled); + + // 2. In den Einstellungen speichern, damit es beim naechsten Start wiederhergestellt wird. + this.settings.setAttribute(f.getName(),enabled); + } + + /** + * Liefert true, wenn die experimentellen Features verfuegbar sind. + * @return true, wenn die experimentellen Features verfuegbar sind. + */ + public boolean enabled() + { + return this.settings.getBoolean("enabled",false); + } + + /** + * Legt fest, ob die experimentellen Features verfuegbar sein sollen. + * @param b true, wenn die experimentellen Features verfuegbar sein sollen. + */ + public void setEnabled(boolean b) + { + Logger.info("feature service enabled: " + b); + this.settings.setAttribute("enabled",b); + } +} diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/experiments/FeatureServiceInitializer.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/experiments/FeatureServiceInitializer.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/experiments/FeatureServiceInitializer.java 1970-01-01 00:00:00.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/experiments/FeatureServiceInitializer.java 2019-11-02 14:14:17.000000000 +0000 @@ -0,0 +1,59 @@ +/********************************************************************** + * + * Copyright (c) 2019 Olaf Willuhn + * All rights reserved. + * + * This software is copyrighted work licensed under the terms of the + * Jameica License. Please consult the file "LICENSE" for details. + * + **********************************************************************/ + +package de.willuhn.jameica.hbci.experiments; + +import de.willuhn.jameica.messaging.Message; +import de.willuhn.jameica.messaging.MessageConsumer; +import de.willuhn.jameica.messaging.SystemMessage; +import de.willuhn.jameica.services.BeanService; +import de.willuhn.jameica.system.Application; + +/** + * Intitialisiert den Feature-Service nach dem Start. + */ +public class FeatureServiceInitializer implements MessageConsumer +{ + /** + * @see de.willuhn.jameica.messaging.MessageConsumer#getExpectedMessageTypes() + */ + @Override + public Class[] getExpectedMessageTypes() + { + return new Class[]{SystemMessage.class}; + } + + /** + * @see de.willuhn.jameica.messaging.MessageConsumer#handleMessage(de.willuhn.jameica.messaging.Message) + */ + @Override + public void handleMessage(Message message) throws Exception + { + SystemMessage msg = (SystemMessage) message; + if (msg.getStatusCode() != SystemMessage.SYSTEM_STARTED) + return; + + // Triggert das Initialisieren des Feature-Service + BeanService bs = Application.getBootLoader().getBootable(BeanService.class); + bs.get(FeatureService.class); + } + + /** + * @see de.willuhn.jameica.messaging.MessageConsumer#autoRegister() + */ + @Override + public boolean autoRegister() + { + return true; + } + +} + + diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/experiments/HBCI4JavaFeatureAutoMethod.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/experiments/HBCI4JavaFeatureAutoMethod.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/experiments/HBCI4JavaFeatureAutoMethod.java 1970-01-01 00:00:00.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/experiments/HBCI4JavaFeatureAutoMethod.java 2019-11-02 14:14:17.000000000 +0000 @@ -0,0 +1,41 @@ +/********************************************************************** + * + * Copyright (c) 2019 Olaf Willuhn + * All rights reserved. + * + * This software is copyrighted work licensed under the terms of the + * Jameica License. Please consult the file "LICENSE" for details. + * + **********************************************************************/ + +package de.willuhn.jameica.hbci.experiments; + +import org.kapott.hbci.manager.Feature; + +/** + * Implementierung fuer ein HBCI4Java-Feature. + */ +public class HBCI4JavaFeatureAutoMethod extends AbstractHBCI4JavaFeature +{ + + /** + * ct. + */ + public HBCI4JavaFeatureAutoMethod() + { + super(Feature.PINTAN_INIT_AUTOMETHOD); + } + + /** + * @see de.willuhn.jameica.hbci.experiments.AbstractHBCI4JavaFeature#getDescription() + */ + @Override + public String getDescription() + { + return i18n.tr("Versuchen, das TAN-Verfahren automatisch zu ermitteln, wenn die für den Benutzer verfügbaren TAN-Verfahren noch nicht übertragen wurden.\n" + + "Leider funktioniert das bei einigen Banken nicht (z.B. Deutsche Bank), da diese keine personalisierte Dialog-Initialisierung mit einem Einschritt-TAN-Verfahren erlauben."); + } + +} + + diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/experiments/HBCI4JavaFeatureSkipOneStepSCA.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/experiments/HBCI4JavaFeatureSkipOneStepSCA.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/experiments/HBCI4JavaFeatureSkipOneStepSCA.java 1970-01-01 00:00:00.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/experiments/HBCI4JavaFeatureSkipOneStepSCA.java 2019-11-02 14:14:17.000000000 +0000 @@ -0,0 +1,39 @@ +/********************************************************************** + * + * Copyright (c) 2019 Olaf Willuhn + * All rights reserved. + * + * This software is copyrighted work licensed under the terms of the + * Jameica License. Please consult the file "LICENSE" for details. + * + **********************************************************************/ + +package de.willuhn.jameica.hbci.experiments; + +import org.kapott.hbci.manager.Feature; + +/** + * Implementierung fuer ein HBCI4Java-Feature. + */ +public class HBCI4JavaFeatureSkipOneStepSCA extends AbstractHBCI4JavaFeature +{ + /** + * ct. + */ + public HBCI4JavaFeatureSkipOneStepSCA() + { + super(Feature.PINTAN_INIT_SKIPONESTEPSCA); + } + + /** + * @see de.willuhn.jameica.hbci.experiments.AbstractHBCI4JavaFeature#getDescription() + */ + @Override + public String getDescription() + { + return i18n.tr("Personalisierte FinTS-Dialoginitialisierung ohne HKTAN senden, wenn noch kein TAN-Medium ausgewählt wurde"); + } + +} + + diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/action/KontoDelete.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/action/KontoDelete.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/action/KontoDelete.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/action/KontoDelete.java 2019-11-02 14:14:17.000000000 +0000 @@ -13,8 +13,8 @@ import de.willuhn.jameica.gui.Action; import de.willuhn.jameica.gui.GUI; -import de.willuhn.jameica.gui.dialogs.YesNoDialog; import de.willuhn.jameica.hbci.HBCI; +import de.willuhn.jameica.hbci.gui.dialogs.KontoDeleteDialog; import de.willuhn.jameica.hbci.rmi.Konto; import de.willuhn.jameica.system.Application; import de.willuhn.jameica.system.OperationCanceledException; @@ -27,6 +27,7 @@ */ public class KontoDelete implements Action { + private final static I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N(); /** * Erwartet ein Objekt vom Typ Konto im Context. @@ -34,7 +35,6 @@ */ public void handleAction(Object context) throws ApplicationException { - I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N(); if (context == null || !(context instanceof Konto)) throw new ApplicationException(i18n.tr("Kein Konto ausgewählt")); @@ -45,18 +45,15 @@ if (k.isNewObject()) return; - YesNoDialog d = new YesNoDialog(YesNoDialog.POSITION_CENTER); - d.setTitle(i18n.tr("Konto löschen")); - d.setText(i18n.tr("Wollen Sie dieses Konto wirklich löschen?\nHierbei werden auch alle Umsätze, Überweisungen und Daueraufträge des Kontos lokal gelöscht.")); - + KontoDeleteDialog d = new KontoDeleteDialog(k); + try { Boolean choice = (Boolean) d.open(); - if (!choice.booleanValue()) + if (choice == null || !choice.booleanValue()) return; } catch (OperationCanceledException oce) { - Logger.info(oce.getMessage()); return; } catch (Exception e) diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/action/PassportDeleteBPD.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/action/PassportDeleteBPD.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/action/PassportDeleteBPD.java 1970-01-01 00:00:00.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/action/PassportDeleteBPD.java 2019-11-02 14:14:17.000000000 +0000 @@ -0,0 +1,122 @@ +/********************************************************************** + * + * Copyright (c) 2019 Olaf Willuhn + * All rights reserved. + * + * This software is copyrighted work licensed under the terms of the + * Jameica License. Please consult the file "LICENSE" for details. + * + **********************************************************************/ + +package de.willuhn.jameica.hbci.gui.action; + +import java.rmi.RemoteException; +import java.util.Properties; +import java.util.Set; + +import org.kapott.hbci.passport.AbstractHBCIPassport; + +import de.willuhn.jameica.gui.Action; +import de.willuhn.jameica.hbci.HBCI; +import de.willuhn.jameica.hbci.HBCIProperties; +import de.willuhn.jameica.hbci.Settings; +import de.willuhn.jameica.hbci.server.BPDUtil; +import de.willuhn.jameica.hbci.server.DBPropertyUtil; +import de.willuhn.jameica.hbci.server.DBPropertyUtil.Prefix; +import de.willuhn.jameica.hbci.server.VersionUtil; +import de.willuhn.jameica.system.Application; +import de.willuhn.logging.Logger; +import de.willuhn.util.ApplicationException; +import de.willuhn.util.I18N; + +/** + * Action zum Loeschen der BPD eines Passports. + */ +public class PassportDeleteBPD implements Action +{ + private final static I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N(); + + /** + * @see de.willuhn.jameica.gui.Action#handleAction(java.lang.Object) + * Erwartet ein Objekt vom Typ HBCIPassport. + */ + @Override + public void handleAction(Object context) throws ApplicationException + { + if (context == null || !(context instanceof AbstractHBCIPassport)) + throw new ApplicationException(i18n.tr("Bitte wählen Sie einen Bank-Zugang aus.")); + + AbstractHBCIPassport passport = (AbstractHBCIPassport) context; + + Logger.info("deleting BPD"); + passport.clearBPD(); + + // Das triggert beim naechsten Verbindungsaufbau + // HBCIHandler. + // -> HBCIHandler.registerUser() + // -> HBCIUser.register() + // -> HBCIUser.updateUserData() + // -> HBCIUser.fetchSysId() - und das holt die BPD beim naechsten mal ueber einen nicht-anonymen Dialog + Logger.info("mark sys id to be synced"); + passport.syncSysId(); + + // Ausserdem muessen wir noch sicherstellen, dass die UPD-Versionen 0 ist damit *beide* + // beim naechsten Mal definitiv neu abgerufen werden + Properties upd = passport.getUPD(); + if (upd != null) + { + Logger.info("setting UPD version to 0"); + upd.setProperty("UPA.version","0"); + } + + passport.saveChanges(); + + // Caches loeschen + Logger.info("deleting bpd/upd caches for user ids"); + Set customerIds = HBCIProperties.getCustomerIDs(passport); + for (String customerId:customerIds) + { + try + { + DBPropertyUtil.deleteScope(DBPropertyUtil.Prefix.BPD,customerId); + DBPropertyUtil.deleteScope(DBPropertyUtil.Prefix.UPD,customerId); + } + catch (Exception e) + { + // Auch wenn das fehlschlaegt, soll der Rest trotzdem durchgefuehrt werden + Logger.error("error while clearing BPD/UPD cache",e); + } + } + + // Versionsnummer Caches loeschen, um das Neubefuellen des Cache zu forcieren + Logger.info("deleting stored bpd/upd version numbers"); + String user = passport.getUserId(); + if (user != null && user.length() > 0) + { + try + { + VersionUtil.delete(Settings.getDBService(),DBPropertyUtil.Prefix.BPD.value() + "." + user); + } + catch (RemoteException re) + { + Logger.error("error while deleting bpd cache",re); + } + try + { + VersionUtil.delete(Settings.getDBService(),DBPropertyUtil.Prefix.UPD.value() + "." + user); + } + catch (RemoteException re) + { + Logger.error("error while deleting upd cache",re); + } + + // Wir markieren ausserdem auch noch den Cache als expired + Logger.info("mark upd/bpd caches expired"); + BPDUtil.expireCache(passport,Prefix.BPD); + BPDUtil.expireCache(passport,Prefix.UPD); + } + } + +} + + diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/action/PassportProcessCode3072.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/action/PassportProcessCode3072.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/action/PassportProcessCode3072.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/action/PassportProcessCode3072.java 2019-11-02 14:14:17.000000000 +0000 @@ -47,7 +47,7 @@ Object o = hbciPassport.getPersistentData(PassportHandle.CONTEXT_USERID_CHANGED); if (o == null) { - Logger.info("no changed customer data in persistent data of passport found"); + Logger.debug("no changed customer data in persistent data of passport found"); return; } diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/action/PassportSync.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/action/PassportSync.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/action/PassportSync.java 1970-01-01 00:00:00.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/action/PassportSync.java 2019-11-02 14:14:17.000000000 +0000 @@ -0,0 +1,235 @@ +/********************************************************************** + * + * Copyright (c) 2004 Olaf Willuhn + * All rights reserved. + * + * This software is copyrighted work licensed under the terms of the + * Jameica License. Please consult the file "LICENSE" for details. + * + **********************************************************************/ +package de.willuhn.jameica.hbci.gui.action; + +import org.kapott.hbci.manager.HBCIHandler; + +import de.willuhn.jameica.gui.Action; +import de.willuhn.jameica.gui.GUI; +import de.willuhn.jameica.hbci.HBCI; +import de.willuhn.jameica.hbci.HBCIProperties; +import de.willuhn.jameica.hbci.gui.DialogFactory; +import de.willuhn.jameica.hbci.passport.Passport; +import de.willuhn.jameica.hbci.passport.PassportHandle; +import de.willuhn.jameica.messaging.StatusBarMessage; +import de.willuhn.jameica.system.Application; +import de.willuhn.jameica.system.BackgroundTask; +import de.willuhn.logging.Level; +import de.willuhn.logging.Logger; +import de.willuhn.logging.Message; +import de.willuhn.logging.targets.Target; +import de.willuhn.util.ApplicationException; +import de.willuhn.util.I18N; +import de.willuhn.util.ProgressMonitor; + +/** + * Action zum Synchronisieren des Bankzugangs. + */ +public class PassportSync implements Action +{ + + /** + * Erwartet ein Objekt vom Typ de.willuhn.jameica.hbci.passport.Passport oder + * de.willuhn.jameica.hbci.passport.PassportHandle oder + * @see de.willuhn.jameica.gui.Action#handleAction(java.lang.Object) + */ + public void handleAction(final Object context) throws ApplicationException + { + final I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N(); + + if (context == null || (!(context instanceof Passport) && !(context instanceof PassportHandle))) + throw new ApplicationException(i18n.tr("Bitte wählen Sie einen Bank-Zugang aus.")); + + Logger.info("performing passport re-sync"); + + BackgroundTask task = new BackgroundTask() { + public void run(final ProgressMonitor monitor) throws ApplicationException + { + HBCIHandler handler = null; + Target target = null; + try { + monitor.setStatusText(i18n.tr("Synchronisiere Bank-Zugang...")); + + // Log-Ausgaben temporaer auch mit im Progressbar-Fenster + // ausgeben + target = new Target() { + public void write(Message msg) throws Exception + { + monitor.addPercentComplete(2); + format(monitor,msg.getText()); + } + public void close() throws Exception + { + } + }; + Logger.addTarget(target); + + PassportHandle handle = null; + if (context instanceof Passport) + handle = ((Passport)context).getHandle(); + else + handle = (PassportHandle) context; + + handler = handle.open(); + monitor.log("Lösche BPD"); + new PassportDeleteBPD().handleAction(handler.getPassport()); + monitor.log("Synchronisiere Bankzugang"); + handler.sync(true); + handle.close(); // nein, nicht im finally, denn wenn das Oeffnen + // fehlschlaegt, ist nichts zum Schliessen da ;) + + Logger.flush(); + monitor.setStatus(ProgressMonitor.STATUS_DONE); + monitor.setPercentComplete(100); + monitor.setStatusText(i18n.tr("Bank-Zugang erfolgreich synchronisiert.")); + Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Bank-Zugang erfolgreich synchronisiert."), StatusBarMessage.TYPE_SUCCESS)); + removeTarget(target); + + if (!Application.getCallback().askUser(i18n.tr("Bank-Zugang synchronisiert. Konten automatisch anlegen?"))) + return; + + try + { + new KontoMerge().handleAction(handle.getKonten()); + // Wir starten die aktuelle View neu, damit die Liste der Konten + // gleich aktualisiert wird + GUI.startView(GUI.getCurrentView().getClass(),GUI.getCurrentView().getCurrentObject()); + } + catch (Exception e) + { + // Das darf fehlschlagen. Zum Beispiel, wenn die Bank sowas nicht unterstuetzt + Logger.error("unable to fetch accounts",e); + monitor.log(i18n.tr("Automatisches Anlegen der Konten fehlgeschlagen. Bitte legen Sie sie manuell an")); + } + } + catch (ApplicationException ae) + { + // Wenn ein Fehler auftrat, MUSS der PIN-Cache geloescht werden. Denn falls + // es genau deshalb fehlschlug, WEIL der User eine falsche PIN eingegeben + // hat, kriegt er sonst keine Chance, seine Eingabe zu korrigieren + DialogFactory.dirtyPINCache(handler != null ? handler.getPassport() : null); + + Application.getMessagingFactory().sendMessage(new StatusBarMessage(ae.getMessage(), StatusBarMessage.TYPE_ERROR)); + monitor.setStatus(ProgressMonitor.STATUS_ERROR); + monitor.setPercentComplete(100); + monitor.setStatusText(ae.getMessage()); + removeTarget(target); + } + catch (Exception e) + { + Throwable cause = HBCIProperties.getCause(e); + if (cause == null) cause = e; // NPE proof - man weiss ja nie ;) + Logger.info("test of passport failed: " + cause.getClass() + ": " + cause.getMessage()); + + // Den kompletten Stacktrace loggen wir nur auf DEBUG, weil der beim Testen bzw. Suchen nach + // einem Kartenleser durchaus auftreten kann. + Logger.write(Level.DEBUG,"error while testing passport",e); + + // Wenn ein Fehler auftrat, MUSS der PIN-Cache geloescht werden. Denn falls + // es genau deshalb fehlschlug, WEIL der User eine falsche PIN eingegeben + // hat, kriegt er sonst keine Chance, seine Eingabe zu korrigieren + DialogFactory.dirtyPINCache(handler != null ? handler.getPassport() : null); + + // Wir entfernen das Ding vor dem Ausgeben der Fehlermeldungen. + // die kommen sonst alle doppelt. + removeTarget(target); + + monitor.setStatus(ProgressMonitor.STATUS_ERROR); + String errorText = i18n.tr("Fehler beim Testen des Sicherheits-Mediums: {0}",cause.getMessage()); + Application.getMessagingFactory().sendMessage(new StatusBarMessage(errorText, StatusBarMessage.TYPE_ERROR)); + monitor.setStatusText(errorText); + + monitor.log(i18n.tr("Aufgetretene Fehlermeldungen:")); + monitor.log("-----------------------------"); + Throwable current = e; + for (int i=0;i<10;++i) + { + if (current == null) + break; // Wir sind oben angekommen + format(monitor,current.getMessage()); // Loggen + Throwable parent = current.getCause(); + if (parent == null || parent == current) + break; // oben angekommen + current = parent; + } + monitor.log("-----------------------------"); + monitor.setPercentComplete(100); + } + } + + public void interrupt() {} + public boolean isInterrupted() + { + return false; + } + }; + + Application.getController().start(task); + } + + /** + * @param t + */ + private void removeTarget(final Target t) + { + if (t == null) + return; + Thread thread = new Thread() { + public void run() + { + Logger.removeTarget(t); + Logger.info("log target removed"); + } + }; + thread.start(); + } + + /** + * Schneidet Stacktrace-Elemente aus dem Text raus. + * @param monitor Monitor, an den geloggt werden soll. + * @param msg Die Nachricht. + */ + private void format(ProgressMonitor monitor, String msg) + { + if (msg == null || msg.length() == 0) + return; + // Wenn der Fehlertext ein Mehrzeiler ist, ignoren wir alle Stracktrace-Elemente + String[] stack = msg.split(System.getProperty("line.separator","\n")); + if (stack != null && stack.length > 1) + { + for (int k=0;k konten = KontoUtil.getKonten(onlyActive ? KontoFilter.ACTIVE : KontoFilter.ALL); + for (Konto k:konten) { - EinnahmeAusgabe ea = new EinnahmeAusgabe((Konto) it.next(),start,end); + // Einschraenken auf gewaehlte Kontogruppe + if (group != null && !ObjectUtils.equals(k.getKategorie(),group)) + continue; + + EinnahmeAusgabe ea = new EinnahmeAusgabe(k,start,end); // Zu den Summen hinzufuegen summeAnfangssaldo += ea.getAnfangssaldo(); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/controller/KontoauszugPdfControl.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/controller/KontoauszugPdfControl.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/controller/KontoauszugPdfControl.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/controller/KontoauszugPdfControl.java 2019-11-02 14:14:17.000000000 +0000 @@ -432,7 +432,11 @@ try { final Kontoauszug k = this.getKontoauszug(); - k.setKonto((Konto)getKonto().getValue()); + final Konto konto = (Konto)getKonto().getValue(); + if (konto == null) + throw new ApplicationException("Bitte wählen Sie ein Konto aus."); + k.setKonto(konto); + k.setBis((Date) this.getBisDatum().getValue()); k.setVon((Date) this.getVonDatum().getValue()); k.setJahr((Integer) this.getJahr().getValue()); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/controller/SepaLastschriftControl.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/controller/SepaLastschriftControl.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/controller/SepaLastschriftControl.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/controller/SepaLastschriftControl.java 2019-11-02 14:14:17.000000000 +0000 @@ -272,7 +272,7 @@ this.pmtInfId = new TextInput(getTransfer().getPmtInfId(),HBCIProperties.HBCI_SEPA_ENDTOENDID_MAXLENGTH); this.pmtInfId.setName(i18n.tr("Referenz (Payment-Information ID)")); - this.pmtInfId.setValidChars(HBCIProperties.HBCI_SEPA_VALIDCHARS); + this.pmtInfId.setValidChars(HBCIProperties.HBCI_SEPA_PMTINF_VALIDCHARS); this.pmtInfId.setEnabled(!getTransfer().ausgefuehrt()); this.pmtInfId.setHint(i18n.tr("freilassen wenn nicht benötigt")); this.pmtInfId.setMandatory(false); @@ -500,7 +500,7 @@ t.setTermin((Date) getTermin().getValue()); t.setEndtoEndId((String) getEndToEndId().getValue()); t.setPmtInfId((String) getPmtInfId().getValue()); - t.setCreditorId((String) getCreditorId().getValue()); + t.setCreditorId(StringUtils.trimToNull((String) getCreditorId().getValue())); t.setMandateId((String) getMandateId().getValue()); t.setSignatureDate((Date) getSignatureDate().getValue()); t.setSequenceType((SepaLastSequenceType)getSequenceType().getValue()); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/controller/SepaSammelLastBuchungControl.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/controller/SepaSammelLastBuchungControl.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/controller/SepaSammelLastBuchungControl.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/controller/SepaSammelLastBuchungControl.java 2019-11-02 14:14:17.000000000 +0000 @@ -201,7 +201,7 @@ s.transactionBegin(); - s.setCreditorId((String) getCreditorId().getValue()); + s.setCreditorId(StringUtils.trimToNull((String) getCreditorId().getValue())); s.setMandateId((String) getMandateId().getValue()); s.setSignatureDate((Date) getSignatureDate().getValue()); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/controller/SettingsControl.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/controller/SettingsControl.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/controller/SettingsControl.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/controller/SettingsControl.java 2019-11-02 14:14:17.000000000 +0000 @@ -10,6 +10,8 @@ package de.willuhn.jameica.hbci.gui.controller; import java.rmi.RemoteException; +import java.util.ArrayList; +import java.util.List; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Color; @@ -28,9 +30,13 @@ import de.willuhn.jameica.hbci.HBCI; import de.willuhn.jameica.hbci.HBCIProperties; import de.willuhn.jameica.hbci.Settings; +import de.willuhn.jameica.hbci.experiments.Feature; +import de.willuhn.jameica.hbci.experiments.FeatureService; import de.willuhn.jameica.hbci.gui.DialogFactory; import de.willuhn.jameica.hbci.gui.action.UmsatzTypNew; import de.willuhn.jameica.hbci.gui.parts.UmsatzTypTree; +import de.willuhn.jameica.messaging.StatusBarMessage; +import de.willuhn.jameica.services.BeanService; import de.willuhn.jameica.system.Application; import de.willuhn.jameica.system.OperationCanceledException; import de.willuhn.logging.Logger; @@ -58,6 +64,9 @@ private Input ueberweisungLimit = null; + private CheckboxInput exFeatures = null; + private List experiments = null; + /** * @param view */ @@ -210,6 +219,66 @@ }); return storePin; } + + /** + * Liefert eine Checkbox, mit der eingestellt werden kann, ob die experimentellen Features aktiv sein sollen. + * @return Checkbox. + */ + public CheckboxInput getExFeatures() + { + if (this.exFeatures != null) + return this.exFeatures; + + final BeanService bs = Application.getBootLoader().getBootable(BeanService.class); + final FeatureService fs = bs.get(FeatureService.class); + + this.exFeatures = new CheckboxInput(fs.enabled()); + this.exFeatures.setName(i18n.tr("Experimentelle Funktionen aktivieren")); + final Listener l = new Listener() { + + @Override + public void handleEvent(Event event) + { + boolean enabled = ((Boolean) getExFeatures().getValue()).booleanValue(); + for (CheckboxInput c:getExperiments()) + { + c.setEnabled(enabled); + } + } + }; + this.exFeatures.addListener(l); + + l.handleEvent(null); // Einmal initial ausloesen + + return this.exFeatures; + } + + /** + * Liefert eine Liste mit Checkboxen zum Einstellen experimenteller Funktionen. + * @return eine Liste mit Checkboxen zum Einstellen experimenteller Funktionen. + * Liefert NULL, wenn es kein Nightly-Build ist. + */ + public List getExperiments() + { + if (this.experiments != null) + return this.experiments; + + final BeanService bs = Application.getBootLoader().getBootable(BeanService.class); + final FeatureService fs = bs.get(FeatureService.class); + + this.experiments = new ArrayList(); + + for (Feature f:fs.getFeatures()) + { + CheckboxInput c = new CheckboxInput(fs.isEnabled(f)); + c.setData("feature",f); + c.setData("description",f.getDescription() + "\n\n" + i18n.tr("Vorgabewert: {0}",i18n.tr(f.getDefault() ? "aktiviert" : "deaktiviert"))); + c.setName(f.getName()); + this.experiments.add(c); + } + + return this.experiments; + } /** * Eingabe-Feld fuer ein Limit bei Ueberweisungen. @@ -274,7 +343,41 @@ if (!storeEnabled) DialogFactory.clearPINStore(null); Double limit = (Double) getUeberweisungLimit().getValue(); - Settings.setUeberweisungLimit(limit == null ? 0.0d : limit.doubleValue()); + + Settings.setUeberweisungLimit(limit == null ? 0.0d : limit.doubleValue()); + + final BeanService bs = Application.getBootLoader().getBootable(BeanService.class); + final FeatureService fs = bs.get(FeatureService.class); + final boolean ex = ((Boolean) this.getExFeatures().getValue()).booleanValue(); + boolean changed = ex != fs.enabled(); + fs.setEnabled(ex); + if (ex) + { + try + { + for (CheckboxInput c:this.getExperiments()) + { + Feature f = (Feature) c.getData("feature"); + fs.setEnabled(f,(Boolean) c.getValue()); + } + } + catch (Exception e) + { + Logger.error("unable to store feature",e); + Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Speichern der experimentellen Features fehlgeschlagen"),StatusBarMessage.TYPE_ERROR)); + } + } + if (changed) + { + try + { + GUI.getCurrentView().reload(); + } + catch (Exception e) + { + Logger.error("unable to reload view",e); + } + } GUI.getStatusBar().setSuccessText(i18n.tr("Einstellungen gespeichert.")); } diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/controller/UmsatzDetailControl.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/controller/UmsatzDetailControl.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/controller/UmsatzDetailControl.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/controller/UmsatzDetailControl.java 2019-11-02 14:14:17.000000000 +0000 @@ -76,6 +76,7 @@ private Input art = null; private Input customerRef = null; private TextInput endToEndId = null; + private TextInput mandateId = null; private TextInput gvcode = null; private Input kommentar = null; @@ -391,7 +392,30 @@ } return this.endToEndId; } - + + /** + * Liefert ein Eingabe-Feld mit der Mandatsreferenz. + * @return Eingabe-Feld. + * @throws RemoteException + */ + public Input getMandateId() throws RemoteException + { + if (this.mandateId == null) + { + String mref = StringUtils.trimToNull(getUmsatz().getMandateId()); + + // Fuer die Abwaertskompatibilitaet + if (mref == null) + mref = VerwendungszweckUtil.getTag(getUmsatz(),Tag.MREF); + + this.mandateId = new TextInput(mref,HBCIProperties.HBCI_SEPA_MANDATEID_MAXLENGTH); + this.mandateId.setValidChars(HBCIProperties.HBCI_SEPA_VALIDCHARS); + this.mandateId.setEnabled(false); + + } + return this.mandateId; + } + /** * Liefert ein Eingabe-Feld fuer den GV-Code. * @return Eingabe-Feld. diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/controller/UmsatzDetailEditControl.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/controller/UmsatzDetailEditControl.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/controller/UmsatzDetailEditControl.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/controller/UmsatzDetailEditControl.java 2019-11-02 14:14:17.000000000 +0000 @@ -243,6 +243,18 @@ input.setEnabled(true); return input; } + + /** + * @see de.willuhn.jameica.hbci.gui.controller.UmsatzDetailControl#getMandateId() + */ + @Override + public Input getMandateId() throws RemoteException + { + Input input = super.getMandateId(); + if (!input.isEnabled()) + input.setEnabled(true); + return input; + } /** * @see de.willuhn.jameica.hbci.gui.controller.UmsatzDetailControl#getGvCode() @@ -338,6 +350,7 @@ u.setCustomerRef((String)getCustomerRef().getValue()); u.setPrimanota((String)getPrimanota().getValue()); u.setEndToEndId((String)getEndToEndId().getValue()); + u.setMandateId((String)getMandateId().getValue()); Date valuta = (Date) getValuta().getValue(); Date datum = (Date) getDatum().getValue(); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/AccountContainerDialog.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/AccountContainerDialog.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/AccountContainerDialog.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/AccountContainerDialog.java 2019-11-02 14:14:17.000000000 +0000 @@ -14,7 +14,7 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; -import org.kapott.hbci.manager.HBCIUtils; +import org.kapott.hbci.manager.BankInfo; import org.kapott.hbci.passport.AbstractPinTanPassport; import org.kapott.hbci.passport.HBCIPassport; @@ -31,6 +31,7 @@ import de.willuhn.jameica.gui.util.SimpleContainer; import de.willuhn.jameica.hbci.AccountContainer; import de.willuhn.jameica.hbci.HBCI; +import de.willuhn.jameica.hbci.HBCIProperties; import de.willuhn.jameica.hbci.gui.input.BLZInput; import de.willuhn.jameica.system.Application; import de.willuhn.jameica.system.OperationCanceledException; @@ -183,25 +184,29 @@ { try { - String b = (String)blz.getValue(); - // Neu im aktuellen HBCI4Java-Snapshot. IP/Hostname zur BLZ ermitteln String host = (String) getHost().getValue(); if (host == null || host.length() == 0) { - String clazz = passport.getClass().getName(); - if (clazz.toUpperCase().indexOf("PINTAN") != -1) + + String b = (String) blz.getValue(); + BankInfo bi = HBCIProperties.getBankInfo(b); + + if (bi != null) { - Logger.info("auto detecting pin/tan url by blz"); - String s = HBCIUtils.getPinTanURLForBLZ(b); - if (s != null && s.startsWith("https://")) - s = s.replaceFirst("https://",""); - getHost().setValue(s); - } - else - { - Logger.info("auto detecting rdh/ddv ip by blz"); - getHost().setValue(HBCIUtils.getHBCIHostForBLZ(b)); + String clazz = passport.getClass().getName(); + if (clazz.toUpperCase().indexOf("PINTAN") != -1) + { + String s = bi.getPinTanAddress(); + if (s != null && s.startsWith("https://")) + s = s.replaceFirst("https://",""); + getHost().setValue(s); + } + else + { + getHost().setValue(bi.getRdhAddress()); + } } + } } catch (Exception e) @@ -273,7 +278,7 @@ { if (this.userid == null) { - this.userid = new TextInput(this.passport.getUserId()); + this.userid = new TextInput(this.passport.getUserId(),30); this.userid.setMandatory(true); } return this.userid; @@ -287,7 +292,7 @@ { if (this.customerid == null) { - this.customerid = new TextInput(this.passport.getCustomerId()); + this.customerid = new TextInput(this.passport.getCustomerId(),30); this.customerid.setComment(i18n.tr("Meist identisch mit Benutzerkennung")); } return this.customerid; diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/AdresseAuswahlDialog.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/AdresseAuswahlDialog.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/AdresseAuswahlDialog.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/AdresseAuswahlDialog.java 2019-11-02 14:14:17.000000000 +0000 @@ -9,9 +9,13 @@ **********************************************************************/ package de.willuhn.jameica.hbci.gui.dialogs; +import org.eclipse.swt.events.DisposeEvent; +import org.eclipse.swt.events.DisposeListener; +import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; +import org.eclipse.swt.widgets.Shell; import de.willuhn.jameica.gui.Action; import de.willuhn.jameica.gui.dialogs.AbstractDialog; @@ -26,6 +30,8 @@ import de.willuhn.jameica.hbci.rmi.Address; import de.willuhn.jameica.system.Application; import de.willuhn.jameica.system.OperationCanceledException; +import de.willuhn.jameica.system.Settings; +import de.willuhn.logging.Logger; import de.willuhn.util.ApplicationException; import de.willuhn.util.I18N; @@ -36,6 +42,10 @@ { private final static I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N(); + private final static Settings settings = new Settings(AdresseAuswahlDialog.class); + + private final static int WINDOW_WIDTH = 640; + private final static int WINDOW_HEIGHT = 460; private Address choosen = null; private AddressFilter filter = null; @@ -59,7 +69,7 @@ this.filter = filter; this.setTitle(i18n.tr("Adressbuch")); - this.setSize(640,460); + setSize(settings.getInt("window.width",WINDOW_WIDTH),settings.getInt("window.height",WINDOW_HEIGHT)); } /** @@ -118,6 +128,25 @@ Container c2 = new SimpleContainer(parent); c2.addButtonArea(b); + + // Unabhaengig von dem, was der User als Groesse eingestellt hat, bleibt das die Minimalgroesse. + getShell().setMinimumSize(WINDOW_WIDTH,WINDOW_HEIGHT); + + getShell().addDisposeListener(new DisposeListener() { + + @Override + public void widgetDisposed(DisposeEvent e) + { + Shell shell = getShell(); + if (shell == null || shell.isDisposed()) + return; + + Point size = shell.getSize(); + Logger.debug("saving window size: " + size.x + "x" + size.y); + settings.setAttribute("window.width",size.x); + settings.setAttribute("window.height",size.y); + } + }); } /** diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/KontoDeleteDialog.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/KontoDeleteDialog.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/KontoDeleteDialog.java 1970-01-01 00:00:00.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/KontoDeleteDialog.java 2019-11-02 14:14:17.000000000 +0000 @@ -0,0 +1,301 @@ +/********************************************************************** + * + * Copyright (c) 2019 Olaf Willuhn + * All rights reserved. + * + * This software is copyrighted work licensed under the terms of the + * Jameica License. Please consult the file "LICENSE" for details. + * + **********************************************************************/ + +package de.willuhn.jameica.hbci.gui.dialogs; + +import java.rmi.RemoteException; + +import org.eclipse.swt.custom.BusyIndicator; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Listener; + +import de.willuhn.jameica.gui.Action; +import de.willuhn.jameica.gui.GUI; +import de.willuhn.jameica.gui.dialogs.AbstractDialog; +import de.willuhn.jameica.gui.input.CheckboxInput; +import de.willuhn.jameica.gui.internal.buttons.Cancel; +import de.willuhn.jameica.gui.parts.Button; +import de.willuhn.jameica.gui.parts.ButtonArea; +import de.willuhn.jameica.gui.parts.Column; +import de.willuhn.jameica.gui.parts.TablePart; +import de.willuhn.jameica.gui.parts.table.FeatureSummary; +import de.willuhn.jameica.gui.util.Container; +import de.willuhn.jameica.gui.util.SWTUtil; +import de.willuhn.jameica.gui.util.SimpleContainer; +import de.willuhn.jameica.hbci.HBCI; +import de.willuhn.jameica.hbci.rmi.Konto; +import de.willuhn.jameica.system.Application; +import de.willuhn.logging.Logger; +import de.willuhn.util.ApplicationException; +import de.willuhn.util.I18N; + +/** + * Dialog mit dem Sicherheitshinweis beim Loeschen eines Kontos. + */ +public class KontoDeleteDialog extends AbstractDialog +{ + private final static I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N(); + + private final static int WINDOW_WIDTH = 800; + private final static int WINDOW_HEIGHT= 400; + + private Konto konto = null; + private TablePart deps = null; + private CheckboxInput check = null; + private Button apply = null; + private Boolean choice = null; + + /** + * ct. + * @param k das zu loeschende Konto. + */ + public KontoDeleteDialog(Konto k) + { + super(KontoDeleteDialog.POSITION_CENTER); + this.konto = k; + this.setTitle(i18n.tr("Konto löschen")); + this.setSize(WINDOW_WIDTH,WINDOW_HEIGHT); + this.setSideImage(SWTUtil.getImage("dialog-warning-large.png")); + } + + /** + * @see de.willuhn.jameica.gui.dialogs.AbstractDialog#paint(org.eclipse.swt.widgets.Composite) + */ + @Override + protected void paint(Composite parent) throws Exception + { + Container c = new SimpleContainer(parent,true); + c.addHeadline(i18n.tr("Warnung")); + c.addText(i18n.tr("Wollen Sie das Konto wirklich löschen?\nHierbei werden auch alle Daten gelöscht, die diesem Konto zugeordnet sind.") + "\n",true); + c.addPart(this.getDependencies()); + c.addInput(this.getCheck()); + + ButtonArea buttons = new ButtonArea(); + buttons.addButton(getApply()); + buttons.addButton(new Cancel()); + c.addButtonArea(buttons); + + this.getShell().setMinimumSize(getShell().computeSize(WINDOW_WIDTH,WINDOW_HEIGHT)); + } + + /** + * Liefert eine Checkbox, die der User ankreuzen muss, um den Loesch-Button freizuschalten. + * @return Checkbox. + */ + private CheckboxInput getCheck() + { + if (this.check != null) + return this.check; + + this.check = new CheckboxInput(false); + this.check.setName(i18n.tr("Konto und alle zugeordneten Daten löschen")); + this.check.addListener(new Listener() { + + @Override + public void handleEvent(Event event) + { + getApply().setEnabled(((Boolean)getCheck().getValue()).booleanValue()); + } + }); + return this.check; + } + + /** + * Liefert den Apply-Button. + * @return der Apply-Button. + */ + private Button getApply() + { + if (this.apply != null) + return this.apply; + + this.apply = new Button(i18n.tr("Jetzt löschen"),new Action() { + + @Override + public void handleAction(Object context) throws ApplicationException + { + choice = Boolean.TRUE; + close(); + } + },null,false,"user-trash-full.png"); + this.apply.setEnabled(false); + + return this.apply; + } + + /** + * Liefert die Liste der Daten, die beim Loeschen des Kontos ebenfalls geloescht werden. + * @return Liste der abhaengigen Daten. + * @throws RemoteException + */ + private TablePart getDependencies() throws RemoteException + { + if (this.deps != null) + return this.deps; + + this.deps = new TablePart(null); + this.deps.removeFeature(FeatureSummary.class); + this.deps.addColumn(i18n.tr("Art der zugeordneten Daten"),"name"); + this.deps.addColumn(i18n.tr("Anzahl"),"size",null,false,Column.ALIGN_RIGHT); + this.deps.addColumn(i18n.tr("Bemerkung"),"comment"); + + // Wir laden die Daten im Hintergrund. Das kann sonst bei vielen Daten laenger dauern + new Thread() + { + public void run() { + GUI.getDisplay().asyncExec(new Runnable() { + + @Override + public void run() + { + BusyIndicator.showWhile(GUI.getDisplay(), new Runnable() { + + @Override + public void run() + { + try + { + boolean added = false; + added |= add(i18n.tr("Umsätze"),konto.getNumUmsaetze(),null); + added |= add(i18n.tr("Elektr. Kontoauszüge"),konto.getKontoauszuege().size(),i18n.tr("Die PDF-Dateien werden nicht gelöscht")); + added |= add(i18n.tr("Überweisungen"),konto.getAuslandsUeberweisungen().size(),i18n.tr("Gesendete Terminüberweisungen werden nicht bei der Bank gelöscht")); + added |= add(i18n.tr("Daueraufträge"),konto.getDauerauftraege().size(),i18n.tr("Aufträge werden nicht bei der Bank gelöscht")); + added |= add(i18n.tr("Lastschriften"),konto.getSepaLastschriften().size(),null); + added |= add(i18n.tr("Sammelüberweisungen"),konto.getSepaSammelUeberweisungen().size(),null); + added |= add(i18n.tr("Sammellastschriften"),konto.getSepaSammelLastschriften().size(),null); + + if (!added) + { + getDependencies().addItem(new Dep("-",0,i18n.tr("Keine weiteren zugeordneten Daten"))); + getCheck().setName(i18n.tr("Konto löschen")); + } + } + catch (RemoteException re) + { + Logger.error("unable to add data",re); + } + } + }); + } + }); + }; + }.start(); + + return this.deps; + } + + /** + * Fuegt den Eintrag zur Liste hinzu, wenn data Daten enthaelt. + * @param name Name des Eintrages. + * @param size die Anzahl der Daten. + * @param comment optionaler Kommentar. + * @return true, wenn die Zeile hinzugefuegt wurde. + * @throws RemoteException + */ + private boolean add(String name, int size, String comment) throws RemoteException + { + if (size == 0) + return false; + + this.getDependencies().addItem(new Dep(name,size,comment)); + return true; + } + + /** + * @see de.willuhn.jameica.gui.dialogs.AbstractDialog#getData() + */ + @Override + protected Boolean getData() throws Exception + { + return choice; + } + + /** + * Kapselt eine Zeile in den Abhaengigkeiten + */ + public class Dep + { + private String name = null; + private int size = 0; + private String comment = null; + + /** + * ct. + * @param name + * @param size + * @param comment + */ + private Dep(String name, int size, String comment) + { + this.name = name; + this.size = size; + this.comment = comment; + } + + /** + * Liefert einen sprechenden Namen. + * @return sprechender Name. + */ + public String getName() + { + return this.name; + } + + /** + * Speichert den Namen. + * Methode noetig wegen Bean-Spezifikation. + * @param name der Name. + */ + public void setName(String name) + { + this.name = name; + } + + /** + * Liefert die Anzahl der Datensaetze. + * @return Anzahl der Datensaetze. + */ + public int getSize() + { + return this.size; + } + + /** + * Speichert die Anzahl- + * Methode noetig wegen Bean-Spezifikation. + * @param size die Groesse. + */ + public void setSize(int size) + { + this.size = size; + } + + /** + * Liefert einen Kommentar. + * @return Kommentar. + */ + public String getComment() + { + return this.comment; + } + + /** + * Speichert den Kommentar. + * Methode noetig wegen Bean-Spezifikation. + * @param comment der Kommentar. + */ + public void setComment(String comment) + { + this.comment = comment; + } + } + +} diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/KontoauszugPdfSettingsDialog.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/KontoauszugPdfSettingsDialog.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/KontoauszugPdfSettingsDialog.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/KontoauszugPdfSettingsDialog.java 2019-11-02 14:14:17.000000000 +0000 @@ -538,8 +538,11 @@ label.setValue(s); - - if (s.contains("{") || s.contains("}") || s.contains("$")) + // Testen, ob die Platzhalter korrekt gesetzt waren. Bei dem Test darf + // der Basis-Pfad nicht verwenden werden, weil der auch "$" enthalten kann. + // Siehe Mail von Thomas vom 12.04.2019 + String test = KontoauszugPdfUtil.createPath(konto,null,"",folder,name); + if (test.contains("{") || test.contains("}") || test.contains("$")) { comment.setValue(i18n.tr("Definition der Platzhalter ungültig")); comment.setColor(Color.ERROR); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/NewKeysDialog.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/NewKeysDialog.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/NewKeysDialog.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/NewKeysDialog.java 2019-11-02 14:14:17.000000000 +0000 @@ -128,7 +128,6 @@ public void handleAction(Object context) throws ApplicationException { print(); - close(); } },null,true,"document-print.png"); print.setEnabled((printers instanceof SelectInput)); // Drucken nur moeglich, wenn Drucker vorhanden. @@ -141,6 +140,13 @@ save(); } },null,false,"document-save.png"); + buttons.addButton(i18n.tr("Schließen"),new Action() + { + public void handleAction(Object context) throws ApplicationException + { + close(); + } + },null,false,"window-close.png"); buttons.addButton(i18n.tr("Abbrechen"), new Action() { public void handleAction(Object context) throws ApplicationException diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/PassportPropertyDialog.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/PassportPropertyDialog.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/PassportPropertyDialog.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/PassportPropertyDialog.java 2019-11-02 14:14:17.000000000 +0000 @@ -10,11 +10,7 @@ package de.willuhn.jameica.hbci.gui.dialogs; -import java.util.Properties; -import java.util.Set; - import org.eclipse.swt.widgets.Composite; -import org.kapott.hbci.passport.AbstractHBCIPassport; import org.kapott.hbci.passport.HBCIPassport; import de.willuhn.jameica.gui.Action; @@ -23,13 +19,8 @@ import de.willuhn.jameica.gui.util.Container; import de.willuhn.jameica.gui.util.SimpleContainer; import de.willuhn.jameica.hbci.HBCI; -import de.willuhn.jameica.hbci.HBCIProperties; -import de.willuhn.jameica.hbci.Settings; +import de.willuhn.jameica.hbci.gui.action.PassportDeleteBPD; import de.willuhn.jameica.hbci.gui.parts.PassportPropertyList; -import de.willuhn.jameica.hbci.server.BPDUtil; -import de.willuhn.jameica.hbci.server.DBPropertyUtil; -import de.willuhn.jameica.hbci.server.DBPropertyUtil.Prefix; -import de.willuhn.jameica.hbci.server.VersionUtil; import de.willuhn.jameica.messaging.StatusBarMessage; import de.willuhn.jameica.system.Application; import de.willuhn.jameica.system.OperationCanceledException; @@ -89,53 +80,7 @@ if (!Application.getCallback().askUser(s)) return; - Logger.info("deleting BPD"); - passport.clearBPD(); - - // Das triggert beim naechsten Verbindungsaufbau - // HBCIHandler. - // -> HBCIHandler.registerUser() - // -> HBCIUser.register() - // -> HBCIUser.updateUserData() - // -> HBCIUser.fetchSysId() - und das holt die BPD beim naechsten mal ueber einen nicht-anonymen Dialog - AbstractHBCIPassport p = (AbstractHBCIPassport) passport; - p.syncSysId(); - - // Ausserdem muessen wir noch sicherstellen, dass die UPD-Versionen 0 ist damit *beide* - // beim naechsten Mal definitiv neu abgerufen werden - Properties upd = p.getUPD(); - if (upd != null) - upd.setProperty("UPA.version","0"); - - passport.saveChanges(); - - // Caches loeschen - Set customerIds = HBCIProperties.getCustomerIDs(passport); - for (String customerId:customerIds) - { - try - { - DBPropertyUtil.deleteScope(DBPropertyUtil.Prefix.BPD,customerId); - DBPropertyUtil.deleteScope(DBPropertyUtil.Prefix.UPD,customerId); - } - catch (Exception e) - { - // Auch wenn das fehlschlaegt, soll der Rest trotzdem durchgefuehrt werden - Logger.error("error while clearing BPD/UPD cache",e); - } - } - - // Versionsnummer Caches loeschen, um das Neubefuellen des Cache zu forcieren - String user = passport.getUserId(); - if (user != null && user.length() > 0) - { - VersionUtil.delete(Settings.getDBService(),DBPropertyUtil.Prefix.BPD.value() + "." + user); - VersionUtil.delete(Settings.getDBService(),DBPropertyUtil.Prefix.UPD.value() + "." + user); - - // Wir markieren ausserdem auch noch den Cache als expired - BPDUtil.expireCache(passport,Prefix.BPD); - BPDUtil.expireCache(passport,Prefix.UPD); - } + new PassportDeleteBPD().handleAction(passport); // Aus der Tabelle in der Anzeige loeschen table.clearBPD(); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/UmsatzTypListDialog.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/UmsatzTypListDialog.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/UmsatzTypListDialog.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/dialogs/UmsatzTypListDialog.java 2019-11-02 14:14:17.000000000 +0000 @@ -14,13 +14,18 @@ import java.util.Hashtable; import java.util.List; +import org.apache.commons.lang.StringUtils; +import org.eclipse.swt.events.DisposeEvent; +import org.eclipse.swt.events.DisposeListener; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; +import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.TableItem; import de.willuhn.jameica.gui.Action; @@ -53,8 +58,12 @@ public class UmsatzTypListDialog extends AbstractDialog { private final static I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N(); + private final static de.willuhn.jameica.system.Settings settings = new de.willuhn.jameica.system.Settings(UmsatzTypListDialog.class); private static Hashtable colorCache = new Hashtable(); + private final static int WINDOW_WIDTH = 370; + private final static int WINDOW_HEIGHT = 500; + private List list = null; private UmsatzTyp choosen = null; private int typ = UmsatzTyp.TYP_EGAL; @@ -82,7 +91,7 @@ this.list = UmsatzTypUtil.getList(null,this.typ); this.setTitle(i18n.tr("Auswahl der Kategorie")); - this.setSize(370,500); + setSize(settings.getInt("window.width",WINDOW_WIDTH),settings.getInt("window.height",WINDOW_HEIGHT)); } /** @@ -132,6 +141,25 @@ },null,false,"process-stop.png"); group.addButtonArea(buttons); + + // Unabhaengig von dem, was der User als Groesse eingestellt hat, bleibt das die Minimalgroesse. + getShell().setMinimumSize(WINDOW_WIDTH,WINDOW_HEIGHT); + + getShell().addDisposeListener(new DisposeListener() { + + @Override + public void widgetDisposed(DisposeEvent e) + { + Shell shell = getShell(); + if (shell == null || shell.isDisposed()) + return; + + Point size = shell.getSize(); + Logger.debug("saving window size: " + size.x + "x" + size.y); + settings.setAttribute("window.width",size.x); + settings.setAttribute("window.height",size.y); + } + }); } /** @@ -174,6 +202,7 @@ this.table = new TablePart(this.list,new Apply()); this.table.setSummary(false); + this.table.setRememberColWidths(true); this.table.addColumn(i18n.tr("Bezeichnung"),"indented"); this.table.addColumn(i18n.tr("Kommentar"),"kommentar"); this.table.setFormatter(new TableFormatter() @@ -196,6 +225,16 @@ if (ut == null) return; + // Uebergeordnete Kategorie nur anzeigen, wenn sie derzeit aufgrund eines Filters nicht angezeigt wird + String q = (String) getSearch().getValue(); + if (StringUtils.trimToNull(q) != null) // Wenn nichts in der Suche steht, muss die Eltern-Kategorie da sein + { + // Nur dann etwas eintragen, wenn sie ein Parent hat und wenn dieses derzeit nicht angezeigt wird + UmsatzTypBean parent = b.getParent(); + if (parent != null && !table.getItems().contains(parent)) + item.setText(0,b.getPathName()); + } + Color c = null; if (ut.isCustomColor()) diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/input/BICInput.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/input/BICInput.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/input/BICInput.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/input/BICInput.java 2019-11-02 14:14:17.000000000 +0000 @@ -108,7 +108,7 @@ catch (Exception e) { Logger.error("error while checking BIC",e); - Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Fehler beim Prüfen der BIC: {}",e.getMessage()),StatusBarMessage.TYPE_INFO)); + Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Fehler beim Prüfen der BIC: {0}",e.getMessage()),StatusBarMessage.TYPE_INFO)); } } } diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/input/KontoInput.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/input/KontoInput.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/input/KontoInput.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/input/KontoInput.java 2019-11-02 14:14:17.000000000 +0000 @@ -128,17 +128,36 @@ { try { - Konto k = (Konto) Settings.getDBService().createObject(Konto.class,id); - this.setPreselected(k); + // Checken, ob wir das Konto haben + for (Konto k:KontoUtil.getKonten(null)) + { + if (id.equals(k.getID())) + { + this.setPreselected(k); + return; + } + } + + // OK, wir haben die ID nicht gefunden. Eventuell ist es eine Gruppe + if (this.supportGroups) + { + for (String group:KontoUtil.getGroups()) + { + if (id.equals(group)) + { + this.setPreselected(group); + return; + } + } + } + else + { + settings.setAttribute(this.token,(String) null); // Vorauswahl loeschen + } } catch (Exception e) { - // wir koennen leider nicht checken, ob "id" =~ /[0-9]{1,9}/ ist, weil der Gruppen-Name ja auch nur aus Zahlen bestehen kann - // daher halt direkt im catch der ObjectNotFoundException - if (this.supportGroups) - this.setPreselected(id); // Koennte eine Kategorie sein - else - settings.setAttribute(this.token,(String) null); // Konto konnte nicht geladen werden. Vorauswahl loeschen + Logger.error("unable to load accounts",e); } } } diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/menus/KontoList.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/menus/KontoList.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/menus/KontoList.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/menus/KontoList.java 2019-11-02 14:14:17.000000000 +0000 @@ -48,33 +48,71 @@ */ public class KontoList extends ContextMenu implements Extendable { - private final static I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N(); + + /** + * Stil des Kontextmenus. + */ + public enum Style + { + /** + * Stil bei den Bankzugaengen. + */ + PASSPORT, + + /** + * Default-Stil. + */ + DEFAULT, + + ; + } /** * Erzeugt ein Kontext-Menu fuer eine Liste von Konten. */ public KontoList() { + this(Style.DEFAULT); + } + + + /** + * Erzeugt ein Kontext-Menu fuer eine Liste von Konten. + * @param style der Stil. + */ + public KontoList(Style style) + { + final boolean shortMenu = style != null && style == Style.PASSPORT; + addItem(new CheckedSingleContextMenuItem(i18n.tr("Öffnen"), new KontoNew(),"document-open.png")); - addItem(new ContextMenuItem(i18n.tr("Neues Konto..."), new KNeu(),"list-add.png")); - addItem(new CheckedSingleContextMenuItem(i18n.tr("Löschen..."), new KontoDelete(),"user-trash-full.png")); + + if (!shortMenu) + { + addItem(new ContextMenuItem(i18n.tr("Neues Konto..."), new KNeu(),"list-add.png")); + addItem(new CheckedSingleContextMenuItem(i18n.tr("Löschen..."), new KontoDelete(),"user-trash-full.png")); + } + addItem(ContextMenuItem.SEPARATOR); addItem(new CheckedSingleContextMenuItem(i18n.tr("Umsätze anzeigen..."),new KontoauszugList(),"text-x-generic.png")); addItem(new AccountItem(i18n.tr("Saldo/Umsätze abrufen..."),new KontoFetchUmsaetze(),"mail-send-receive.png")); addItem(ContextMenuItem.SEPARATOR); - addItem(new AccountItem(i18n.tr("Neue Überweisung..."),new AuslandsUeberweisungNew(),"ueberweisung.png")); - addItem(new AccountItem(i18n.tr("Neue Lastschrift..."),new SepaLastschriftNew(),"lastschrift.png")); - addItem(new AccountItem(i18n.tr("Neuer Dauerauftrag..."),new SepaDauerauftragNew(),"dauerauftrag.png")); - addItem(new AccountItem(i18n.tr("Umsatz anlegen"),new UmsatzDetailEdit(),"emblem-documents.png",true)); + if (!shortMenu) + { + addItem(new AccountItem(i18n.tr("Neue Überweisung..."),new AuslandsUeberweisungNew(),"ueberweisung.png")); + addItem(new AccountItem(i18n.tr("Neue Lastschrift..."),new SepaLastschriftNew(),"lastschrift.png")); + addItem(new AccountItem(i18n.tr("Neuer Dauerauftrag..."),new SepaDauerauftragNew(),"dauerauftrag.png")); + addItem(new AccountItem(i18n.tr("Umsatz anlegen"),new UmsatzDetailEdit(),"emblem-documents.png",true)); + + addItem(ContextMenuItem.SEPARATOR); + addItem(new CheckedContextMenuItem(i18n.tr("Konten exportieren..."),new KontoExport(),"document-save.png")); + addItem(new ContextMenuItem(i18n.tr("Konten importieren..."),new KontoImport(),"document-open.png")); + addItem(new ContextMenuItem(i18n.tr("Umsätze importieren..."),new UmsatzImport(),"document-open.png")); + } addItem(ContextMenuItem.SEPARATOR); - addItem(new CheckedContextMenuItem(i18n.tr("Konten exportieren..."),new KontoExport(),"document-save.png")); - addItem(new ContextMenuItem(i18n.tr("Konten importieren..."),new KontoImport(),"document-open.png")); - addItem(new ContextMenuItem(i18n.tr("Umsätze importieren..."),new UmsatzImport(),"document-open.png")); - addItem(ContextMenuItem.SEPARATOR); - addMenu(new ExtendedMenu()); + addMenu(new ExtendedMenu(style)); // Wir geben das Context-Menu jetzt noch zur Erweiterung frei. ExtensionRegistry.extend(this); @@ -165,14 +203,21 @@ private class ExtendedMenu extends ContextMenu { /** - * + * @param style der Style. */ - private ExtendedMenu() + private ExtendedMenu(Style style) { this.setText(i18n.tr("Erweitert")); this.setImage(SWTUtil.getImage("emblem-symbolic-link.png")); + + final boolean shortMenu = style != null && style == Style.PASSPORT; + addItem(new CheckedSingleContextMenuItem(i18n.tr("Saldo und Datum zurücksetzen..."), new KontoResetAuszugsdatum(),"edit-undo.png")); - addItem(new CheckedSingleContextMenuItem(i18n.tr("Salden neu berechnen..."), new KontoRecalculateOfflineSaldo(),"accessories-calculator.png")); + if (!shortMenu) + { + addItem(new CheckedSingleContextMenuItem(i18n.tr("Salden neu berechnen..."), new KontoRecalculateOfflineSaldo(),"accessories-calculator.png")); + } + addItem(new ChangeFlagsMenuItem(i18n.tr("Konto deaktivieren..."), new KontoDisable(),"network-offline.png",false)); addItem(new ChangeFlagsMenuItem(i18n.tr("Konto aktivieren..."), new FlaggableChange(Konto.FLAG_DISABLED,false),"network-transmit-receive.png",true)); } diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/parts/KontoList.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/parts/KontoList.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/parts/KontoList.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/parts/KontoList.java 2019-11-02 14:14:17.000000000 +0000 @@ -31,6 +31,8 @@ import de.willuhn.jameica.gui.Action; import de.willuhn.jameica.gui.GUI; import de.willuhn.jameica.gui.Part; +import de.willuhn.jameica.gui.extension.Extendable; +import de.willuhn.jameica.gui.extension.ExtensionRegistry; import de.willuhn.jameica.gui.formatter.DateFormatter; import de.willuhn.jameica.gui.formatter.Formatter; import de.willuhn.jameica.gui.formatter.TableFormatter; @@ -76,7 +78,7 @@ /** * Implementierung einer fix und fertig vorkonfigurierten Liste aller Konten. */ -public class KontoList extends TablePart implements Part +public class KontoList extends TablePart implements Part, Extendable { private final static I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N(); private final static de.willuhn.jameica.system.Settings settings = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getSettings(); @@ -218,9 +220,19 @@ featureEvent(Feature.Event.REFRESH,null); } }); + + ExtensionRegistry.extend(this); } /** + * @see de.willuhn.jameica.gui.extension.Extendable#getExtendableID() + */ + public String getExtendableID() + { + return this.getClass().getName(); + } + + /** * Legt fest, ob die Filtermoeglichkeiten angezeigt werden sollen. * @param b true, wenn die Filtermoeglichkeiten angezeigt werden sollen. */ @@ -276,6 +288,7 @@ Application.getMessagingFactory().unRegisterMessageConsumer(mc); } }); + super.paint(parent); } diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/parts/KontoauszugPdfList.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/parts/KontoauszugPdfList.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/parts/KontoauszugPdfList.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/parts/KontoauszugPdfList.java 2019-11-02 14:14:17.000000000 +0000 @@ -74,15 +74,16 @@ { private final static I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N(); - private MessageConsumer mc = null; + private MessageConsumer mc = null; - private KontoInput kontoAuswahl = null; - private Input from = null; - private Input to = null; - private RangeInput range = null; - private CheckboxInput unread = null; + private KontoInput kontoAuswahl = null; + private Input from = null; + private Input to = null; + private RangeInput range = null; + private CheckboxInput unread = null; + private CheckboxInput inclusiveFilter = null; - private Listener listener = null; + private Listener listener = null; /** * ct. @@ -134,6 +135,8 @@ this.addColumn(new KontoColumn()); this.addColumn(i18n.tr("Jahr"),"jahr"); this.addColumn(i18n.tr("Nummer"),"nummer"); + this.addColumn(i18n.tr("Von"),"von",df); + this.addColumn(i18n.tr("Bis"),"bis",df); this.addColumn(i18n.tr("Erstellt am"),"erstellungsdatum",df); this.addColumn(i18n.tr("Abgerufen am"),"ausgefuehrt_am",df); this.addColumn(i18n.tr("Quittiert am"),"quittiert_am",df); @@ -188,6 +191,7 @@ { Container left = new SimpleContainer(cols.getComposite()); left.addInput(this.getKontoAuswahl()); + left.addInput(this.getInclusiveFilter()); left.addInput(this.getUnread()); } @@ -308,6 +312,29 @@ this.unread.addListener(this.listener); return this.unread; } + + /** + * Liefert eine Checkbox, um auch nur teilweise im Zeitraum liegende Kontoauszuege anzuzeigen. + * @return Checkbox. + */ + public CheckboxInput getInclusiveFilter() + { + if (this.inclusiveFilter != null) + return this.inclusiveFilter; + + this.inclusiveFilter = new CheckboxInput(settings.getBoolean("kontoauszuege.filter.inclusivefilter",false)); + this.inclusiveFilter.setName(i18n.tr("Auch nur teilweise im Zeitraum liegende Kontoauszüge anzeigen")); + this.inclusiveFilter.addListener(this.listener); + this.inclusiveFilter.addListener(new Listener() + { + @Override + public void handleEvent(Event event) + { + settings.setAttribute("kontoauszuege.filter.inclusivefilter", (Boolean) getInclusiveFilter().getValue()); + } + }); + return this.inclusiveFilter; + } /** * Aktualisiert die Tabelle der angezeigten Daten. @@ -324,6 +351,7 @@ final Date dfrom = (Date) getFrom().getValue(); final Date dto = (Date) getTo().getValue(); final Boolean unread = (Boolean) getUnread().getValue(); + final Boolean inclusiveFilter = (Boolean) getInclusiveFilter().getValue(); if (!force) { @@ -349,7 +377,7 @@ removeAll(); // Liste neu laden - GenericIterator items = KontoauszugPdfUtil.getList(konto,dfrom,dto,unread != null ? unread.booleanValue() : false); + GenericIterator items = KontoauszugPdfUtil.getList(konto,dfrom,dto,unread != null ? unread.booleanValue() : false, inclusiveFilter != null ? inclusiveFilter.booleanValue() : false); if (items == null) return; @@ -387,7 +415,8 @@ return (kontoAuswahl != null && kontoAuswahl.hasChanged()) || (from != null && from.hasChanged()) || (to != null && to.hasChanged()) || - (unread != null && unread.hasChanged()); + (unread != null && unread.hasChanged()) || + (inclusiveFilter != null && inclusiveFilter.hasChanged()); } catch (Exception e) { diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/parts/SparQuote.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/parts/SparQuote.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/parts/SparQuote.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/parts/SparQuote.java 2019-11-02 14:14:17.000000000 +0000 @@ -263,7 +263,7 @@ catch (RemoteException re) { Logger.error("unable to export data",re); - throw new ApplicationException(i18n.tr("Export fehlgeschlagen: {}",re.getMessage())); + throw new ApplicationException(i18n.tr("Export fehlgeschlagen: {0}",re.getMessage())); } } },null,false,"document-save.png"); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/parts/UmsatzTree.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/parts/UmsatzTree.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/parts/UmsatzTree.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/parts/UmsatzTree.java 2019-11-02 14:14:17.000000000 +0000 @@ -201,7 +201,15 @@ if (u.getParent() == null) items.add(u); } - Collections.sort(items); + + try + { + Collections.sort(items); + } + catch (Exception e) + { + Logger.warn("unable to sort categories: " + e.getMessage()); + } //////////////////////////////////////////////////////////////// super.setList(PseudoIterator.fromArray((GenericObject[])items.toArray(new GenericObject[items.size()]))); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/views/AbstractUmsatzDetail.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/views/AbstractUmsatzDetail.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/views/AbstractUmsatzDetail.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/views/AbstractUmsatzDetail.java 2019-11-02 14:14:17.000000000 +0000 @@ -79,8 +79,8 @@ SimpleContainer right = new SimpleContainer(columns.getComposite(),true); right.addHeadline(i18n.tr("Sonstige Informationen")); right.addLabelPair(i18n.tr("Art der Buchung"), control.getArt()); - right.addLabelPair(i18n.tr("Kundenreferenz"), control.getCustomerRef()); right.addInput(control.getEndToEndId()); + right.addLabelPair(i18n.tr("Kunden-/Mandatsreferenz"), new MultiInput(control.getCustomerRef(),control.getMandateId())); right.addLabelPair(i18n.tr("Primanota/GV-Code"),new MultiInput(control.getPrimanota(),control.getGvCode())); right.addHeadline(i18n.tr("Notizen")); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/views/EinnahmenAusgaben.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/views/EinnahmenAusgaben.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/views/EinnahmenAusgaben.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/views/EinnahmenAusgaben.java 2019-11-02 14:14:17.000000000 +0000 @@ -62,6 +62,7 @@ Container left = new SimpleContainer(cols.getComposite()); left.addInput(control.getKontoAuswahl()); left.addInput(control.getInterval()); + left.addInput(control.getActiveOnly()); Container right = new SimpleContainer(cols.getComposite()); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/views/KontoauszugList.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/views/KontoauszugList.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/views/KontoauszugList.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/views/KontoauszugList.java 2019-11-02 14:14:17.000000000 +0000 @@ -29,7 +29,7 @@ import de.willuhn.util.I18N; /** - * Zeigt Kontoauszüge an und gibt gibt sie in eine PDF-Datei aus. + * Zeigt die Umsatzbuchungen an. */ public class KontoauszugList extends AbstractView { diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/views/NachrichtDetails.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/views/NachrichtDetails.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/views/NachrichtDetails.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/views/NachrichtDetails.java 2019-11-02 14:14:17.000000000 +0000 @@ -11,8 +11,8 @@ import de.willuhn.jameica.gui.AbstractView; import de.willuhn.jameica.gui.GUI; +import de.willuhn.jameica.gui.input.TextAreaInput; import de.willuhn.jameica.gui.parts.ButtonArea; -import de.willuhn.jameica.gui.util.ScrolledContainer; import de.willuhn.jameica.gui.util.SimpleContainer; import de.willuhn.jameica.hbci.HBCI; import de.willuhn.jameica.hbci.HBCIProperties; @@ -41,17 +41,19 @@ GUI.getView().setTitle(i18n.tr("System-Nachricht vom {0}", HBCI.DATEFORMAT.format(n.getDatum()))); - SimpleContainer container = new SimpleContainer(getParent(),true); + SimpleContainer container = new SimpleContainer(getParent(),true,1); String name = HBCIProperties.getNameForBank(n.getBLZ()); if (name != null) container.addText(i18n.tr("{0} [BLZ: {1}]", new String[] {name,n.getBLZ()}) + "\n",true); else container.addText(i18n.tr("BLZ: {0}", new String[] {n.getBLZ()}) + "\n",true); - ScrolledContainer sc = new ScrolledContainer(container.getComposite()); String msg = n.getNachricht(); msg = msg.replace("\\n","\n"); // Falls die Zeilenumbrueche escaped waren - sc.addText(msg,true); + + TextAreaInput text = new TextAreaInput(msg); + text.setEnabled(false); + text.paint(container.getComposite()); ButtonArea buttons = new ButtonArea(); buttons.addButton(i18n.tr("In Zwischenablage kopieren"),new NachrichtCopy(),n,false,"edit-copy.png"); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/views/Settings.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/views/Settings.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/gui/views/Settings.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/gui/views/Settings.java 2019-11-02 14:14:17.000000000 +0000 @@ -17,7 +17,9 @@ import de.willuhn.jameica.gui.Action; import de.willuhn.jameica.gui.GUI; import de.willuhn.jameica.gui.extension.Extendable; +import de.willuhn.jameica.gui.input.CheckboxInput; import de.willuhn.jameica.gui.parts.ButtonArea; +import de.willuhn.jameica.gui.util.Color; import de.willuhn.jameica.gui.util.TabGroup; import de.willuhn.jameica.hbci.HBCI; import de.willuhn.jameica.hbci.gui.action.UmsatzTypNew; @@ -42,28 +44,32 @@ * Der Tabfolder. */ private TabFolder folder = null; - + /** * @see de.willuhn.jameica.gui.AbstractView#bind() */ public void bind() throws Exception { - GUI.getView().setTitle(i18n.tr("Einstellungen")); + final SettingsControl control = new SettingsControl(this); // Grund-Einstellungen TabGroup system = new TabGroup(getTabFolder(),i18n.tr("Grundeinstellungen")); + system.addHeadline(i18n.tr("Sicherheit")); system.addCheckbox(control.getCachePin(),i18n.tr("PIN-Eingaben für die aktuelle Sitzung zwischenspeichern")); system.addCheckbox(control.getStorePin(),i18n.tr("PIN-Eingaben permanent speichern (nur bei PIN/TAN)")); + system.addHeadline(i18n.tr("Kontrolle")); system.addCheckbox(control.getKontoCheck(),i18n.tr("Kontonummern und Bankleitzahlen mittels Prüfsumme testen")); system.addCheckbox(control.getKontoCheckExcludeAddressbook(),i18n.tr("Außer Bankverbindungen des Adressbuches")); system.addLabelPair(i18n.tr("Limit für Aufträge"), control.getUeberweisungLimit()); - + // Farb-Einstellungen TabGroup ui = new TabGroup(getTabFolder(),i18n.tr("Benutzeroberfläche")); + ui.addHeadline(i18n.tr("Farben")); ui.addLabelPair(i18n.tr("Textfarbe von Sollbuchungen"),control.getBuchungSollForeground()); ui.addLabelPair(i18n.tr("Textfarbe von Habenbuchungen"),control.getBuchungHabenForeground()); + ui.addHeadline(i18n.tr("Formatierung")); ui.addCheckbox(control.getDecimalGrouping(),i18n.tr("Tausender-Trennzeichen bei Geld-Beträgen anzeigen")); ui.addCheckbox(control.getBoldValues(),i18n.tr("Geld-Beträgen fett gedruckt anzeigen")); @@ -73,6 +79,17 @@ ButtonArea umsatzButtons = new ButtonArea(); umsatzButtons.addButton(i18n.tr("Neue Umsatz-Kategorie..."),new UmsatzTypNew(),null,false,"text-x-generic.png"); umsatztypes.addButtonArea(umsatzButtons); + + TabGroup extended = new TabGroup(getTabFolder(),"Erweitert",true); + extended.addHeadline(i18n.tr("Experimentelle Funktionen")); + extended.addText(i18n.tr("Wenn die experimentellen Funktionen nicht aktiviert sind, gelten die Vorgabewerte.") + "\n",true); + extended.addInput(control.getExFeatures()); + extended.addSeparator(); + for (CheckboxInput c:control.getExperiments()) + { + extended.addInput(c); + extended.addText((String) c.getData("description") + "\n",true, Color.COMMENT); + } ButtonArea buttons = new ButtonArea(); buttons.addButton(i18n.tr("&Speichern"),new Action() @@ -88,7 +105,7 @@ if (lastActiveTab != null) getTabFolder().setSelection(lastActiveTab.intValue()); } - + /** * Liefert den Tab-Folder, in dem die einzelnen Module der Einstellungen * untergebracht sind. @@ -112,7 +129,7 @@ // Wir merken uns das aktive Tab lastActiveTab = new Integer(getTabFolder().getSelectionIndex()); } - + /** * @see de.willuhn.jameica.gui.extension.Extendable#getExtendableID() */ diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/io/AbstractSepaImporter.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/io/AbstractSepaImporter.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/io/AbstractSepaImporter.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/io/AbstractSepaImporter.java 2019-11-02 14:14:17.000000000 +0000 @@ -26,11 +26,12 @@ import org.kapott.hbci.sepa.SepaVersion.Type; import de.willuhn.io.IOUtil; +import de.willuhn.jameica.gui.dialogs.YesNoDialog; +import de.willuhn.jameica.gui.util.SWTUtil; import de.willuhn.jameica.hbci.gui.dialogs.KontoAuswahlDialog; import de.willuhn.jameica.hbci.gui.filter.KontoFilter; import de.willuhn.jameica.hbci.rmi.Konto; import de.willuhn.jameica.hbci.server.KontoUtil; -import de.willuhn.jameica.system.Application; import de.willuhn.jameica.system.OperationCanceledException; import de.willuhn.logging.Logger; import de.willuhn.util.ApplicationException; @@ -81,11 +82,17 @@ SepaVersion.Type type = this.getSupportedPainType(); if (type != null && type != version.getType()) { + boolean b = type == SepaVersion.Type.PAIN_001; String l = i18n.tr("Lastschrift"); String u = i18n.tr("Überweisung"); - String q = i18n.tr("Sie versuchen, eine {0} als {1} zu importieren.\nVorgang wirklich fortsetzen?"); - boolean b = type == SepaVersion.Type.PAIN_001; - if (!Application.getCallback().askUser(q,new String[]{b ? l : u, b ? u : l})) + String q = i18n.tr("Sie versuchen, eine {0} als {1} zu importieren.\nVorgang wirklich fortsetzen?",b ? l : u, b ? u : l); + + YesNoDialog d = new YesNoDialog(YesNoDialog.POSITION_CENTER); + d.setTitle(i18n.tr("Warnung")); + d.setSideImage(SWTUtil.getImage("dialog-warning-large.png")); + d.setText("\n" + q + "\n"); + b = ((Boolean) d.open()).booleanValue(); + if (!b) throw new OperationCanceledException(); } diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/io/CamtUmsatzImporter.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/io/CamtUmsatzImporter.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/io/CamtUmsatzImporter.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/io/CamtUmsatzImporter.java 2019-11-02 14:14:17.000000000 +0000 @@ -16,6 +16,8 @@ import java.rmi.RemoteException; import java.util.ArrayList; import java.util.List; +import java.util.zip.ZipEntry; +import java.util.zip.ZipInputStream; import org.kapott.hbci.GV.parsers.ISEPAParser; import org.kapott.hbci.GV.parsers.SEPAParserFactory; @@ -28,7 +30,7 @@ import de.willuhn.jameica.hbci.HBCI; import de.willuhn.jameica.hbci.gui.dialogs.KontoAuswahlDialog; import de.willuhn.jameica.hbci.messaging.ImportMessage; -import de.willuhn.jameica.hbci.rmi.Protokoll; +import de.willuhn.jameica.hbci.rmi.Konto; import de.willuhn.jameica.hbci.rmi.Umsatz; import de.willuhn.jameica.hbci.server.Converter; import de.willuhn.jameica.system.Application; @@ -56,9 +58,11 @@ if (is == null) throw new ApplicationException(i18n.tr("Keine zu importierende Datei ausgewählt")); - if (format == null) + if (format == null || !(format instanceof MyIOFormat)) throw new ApplicationException(i18n.tr("Kein Datei-Format ausgewählt")); + final MyIOFormat myFormat = (MyIOFormat) format; + try { @@ -77,80 +81,45 @@ if (monitor != null) monitor.setStatusText(i18n.tr("Lese Datei ein")); - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - IOUtil.copy(is,bos); - - SepaVersion version = SepaVersion.autodetect(new ByteArrayInputStream(bos.toByteArray())); - if (version == null) - throw new ApplicationException(i18n.tr("SEPA-Version der XML-Datei nicht ermittelbar")); - - SepaVersion.Type type = version.getType(); - if (type == null || type != SepaVersion.Type.CAMT_052) - throw new ApplicationException(i18n.tr("Keine gültige CAMT-Datei")); - - monitor.log(i18n.tr("SEPA-Version: {0}",version.getURN())); - - List tage = new ArrayList(); - ISEPAParser> parser = SEPAParserFactory.get(version); - parser.parse(new ByteArrayInputStream(bos.toByteArray()),tage); + Stats stats = new Stats(); - List lines = new ArrayList(); - for (BTag tag:tage) + if (myFormat.isZip()) { - lines.addAll(tag.lines); + Logger.info("reading zip file"); + // Wir kriegen aus dem ZIP-Inputstream nicht raus, wieviele Dateien enthalten sind sondern koennen nur drueber iterieren. + // Daher rechnen wir fuer den Fortschrittsbalken mal pauschal mit 22 Dateien (pro Buchungstag aka Wochentag eines Monats eine Datei) + ZipInputStream zis = new ZipInputStream(is); + ZipEntry ze = null; + double fc = 22d; + int no = 1; + while ((ze = zis.getNextEntry()) != null) + { + if (ze.isDirectory()) + continue; + + String name = ze.getName(); + if (name == null) + continue; + + if (!name.toLowerCase().endsWith(".xml")) + continue; + + Logger.info(" reading " + name); + + int chunk = (int) (100 / fc); + Stats s = doImport(chunk,no,zis,konto,monitor,t); + stats.created += s.created; + stats.error += s.error; + no++; + } } - - if (lines.size() == 0) + else { - konto.addToProtokoll(i18n.tr("Keine Umsätze importiert"),Protokoll.TYP_ERROR); - return; + Logger.info("reading xml file"); + stats = doImport(100,1,is,konto,monitor,t); } - double factor = 100d / (double) lines.size(); - - int created = 0; - int error = 0; - - for (int i=0;i tage = new ArrayList(); + ISEPAParser> parser = SEPAParserFactory.get(version); + parser.parse(new ByteArrayInputStream(bos.toByteArray()),tage); + + List lines = new ArrayList(); + for (BTag tag:tage) + { + lines.addAll(tag.lines); + } + + double factor = chunk / (double) lines.size(); + for (int i=0;i list = new LinkedList(); + for (int i=0;i 9) + return m; + + // Feld hat keinen Wert. + text = StringUtils.trimToNull(text); + if (text == null) + return m; + + out.write("?2" + Integer.toString(m) + tag.name() + "+" + text); + m++; + return m; + } + + /** + * Sortiert die Buchungen chronologisch - aeltestest zuerst. + * @param list die zu sortierenden Buchungen. + */ + protected void sort(List list) + { + Collections.sort(list,new Comparator() { + /** + * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) + */ + @Override + public int compare(Umsatz o1, Umsatz o2) + { + try + { + Date d1 = (Date) o1.getAttribute("datum_pseudo"); + Date d2 = (Date) o2.getAttribute("datum_pseudo"); + if (d1 == d2) + return 0; + if (d1 == null) + return -1; + if (d2 == null) + return 1; + return d1.compareTo(d2); + } + catch (RemoteException re) + { + Logger.error("unable to sort data",re); + return 0; + } + } + }); + } /** * @see de.willuhn.jameica.hbci.io.IO#getIOFormats(java.lang.Class) @@ -217,7 +300,7 @@ */ public String getName() { - return i18n.tr("Swift MT940-Format (pro Buchungen eine logische Datei)"); + return i18n.tr("Swift MT940-Format (pro Buchung eine logische Datei)"); } /** diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/io/MT940UmsatzExporterMerged.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/io/MT940UmsatzExporterMerged.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/io/MT940UmsatzExporterMerged.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/io/MT940UmsatzExporterMerged.java 2019-11-02 14:14:17.000000000 +0000 @@ -14,9 +14,6 @@ import java.io.OutputStream; import java.io.OutputStreamWriter; import java.rmi.RemoteException; -import java.util.Collections; -import java.util.Comparator; -import java.util.Date; import java.util.LinkedList; import java.util.List; @@ -75,32 +72,7 @@ throw new ApplicationException(i18n.tr("Die zu exportierenden Umsätze müssen vom selben Konto stammen")); list.add(u); } - Collections.sort(list,new Comparator() { - /** - * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) - */ - @Override - public int compare(Umsatz o1, Umsatz o2) - { - try - { - Date d1 = (Date) o1.getAttribute("datum_pseudo"); - Date d2 = (Date) o2.getAttribute("datum_pseudo"); - if (d1 == d2) - return 0; - if (d1 == null) - return -1; - if (d2 == null) - return 1; - return d1.compareTo(d2); - } - catch (RemoteException re) - { - Logger.error("unable to sort data",re); - return 0; - } - } - }); + sort(list); ////////////////////////////////////////////////////////////////////////// String curr = k.getWaehrung(); @@ -156,8 +128,9 @@ out.write(":86:" + gvcode + "?00" + StringUtils.trimToEmpty(u.getArt()) + "?10" + StringUtils.trimToEmpty(u.getPrimanota())); //Verwendungszweck - String[] lines = VerwendungszweckUtil.toArray(u); - for (int m=0;m children = node.getSubGroups(); for (int i=0; i= 0 ? typeHaben : typeSoll))); @@ -195,24 +197,3 @@ return i18n.tr("Umsätze"); } } - - - -/********************************************************************** - * $Log: PrintSupportUmsatzList.java,v $ - * Revision 1.5 2011/05/11 09:12:07 willuhn - * @C Merge-Funktionen fuer den Verwendungszweck ueberarbeitet - * - * Revision 1.4 2011-04-29 07:44:56 willuhn - * @B Siehe http://www.willuhn.de/blog/index.php?/archives/553-Hibiscus-Druck-Support.html#c1293 - * - * Revision 1.3 2011-04-14 08:43:43 willuhn - * *** empty log message *** - * - * Revision 1.2 2011-04-14 08:42:53 willuhn - * @N Konto-Header - * - * Revision 1.1 2011-04-13 17:35:46 willuhn - * @N Druck-Support fuer Kontoauszuege fehlte noch - * - **********************************************************************/ \ No newline at end of file diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/ddv/Controller.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/ddv/Controller.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/ddv/Controller.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/ddv/Controller.java 2019-11-02 14:14:17.000000000 +0000 @@ -36,6 +36,7 @@ import de.willuhn.jameica.hbci.HBCI; import de.willuhn.jameica.hbci.HBCICallbackSWT; import de.willuhn.jameica.hbci.HBCIProperties; +import de.willuhn.jameica.hbci.gui.action.PassportSync; import de.willuhn.jameica.hbci.gui.action.PassportTest; import de.willuhn.jameica.hbci.gui.dialogs.AccountContainerDialog; import de.willuhn.jameica.hbci.gui.dialogs.PassportPropertyDialog; @@ -491,6 +492,33 @@ } /** + * Synchronisiert den Bankzugang neu. + */ + public synchronized void handleSync() + { + try + { + if (!Application.getCallback().askUser(i18n.tr("Sind Sie sicher?"))) + return; + + new PassportSync().handleAction(new PassportHandleImpl(getConfig())); + } + catch (ApplicationException ae) + { + Application.getMessagingFactory().sendMessage(new StatusBarMessage(ae.getMessage(),StatusBarMessage.TYPE_ERROR)); + } + catch (OperationCanceledException oce) + { + Logger.info("operation cancelled"); + } + catch (Exception e) + { + Logger.error("error while testing passport",e); + Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Fehler beim Synchronisieren des Bank-Zugangs: {}",e.getMessage()),StatusBarMessage.TYPE_ERROR)); + } + } + + /** * Speichert die Einstellungen. * @return true, wenn die Einstellungen gespeichert werden konnten. */ diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/ddv/Detail.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/ddv/Detail.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/ddv/Detail.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/ddv/Detail.java 2019-11-02 14:14:17.000000000 +0000 @@ -15,7 +15,6 @@ import de.willuhn.jameica.gui.parts.ButtonArea; import de.willuhn.jameica.gui.util.ColumnLayout; import de.willuhn.jameica.gui.util.Container; -import de.willuhn.jameica.gui.util.Headline; import de.willuhn.jameica.gui.util.SimpleContainer; import de.willuhn.jameica.hbci.HBCI; import de.willuhn.jameica.system.Application; @@ -66,8 +65,13 @@ container.addInput(control.getSoftPin()); } - new Headline(getParent(),i18n.tr("Fest zugeordnete Konten")); - control.getKontoAuswahl().paint(getParent()); + Container c = new SimpleContainer(getParent(),true); + c.addHeadline(i18n.tr("Fest zugeordnete Konten")); + c.addText(i18n.tr("Die folgende Liste enthält alle Konten, welche diesem Bankzugang fest zugeordnet werden können. " + + "Aktivieren Sie die Kontrollkästchen der gewünschten Konten in der Spalte \"Kontonummer\", um diese Konten fest zuzuordnen. Klicken Sie anschließend \"Speichern\". " + + "Weitere Informationen hierzu finden Sie links in der Hilfe.\n"),true); + c.addPart(control.getKontoAuswahl()); + ButtonArea buttonArea = new ButtonArea(); buttonArea.addButton(i18n.tr("BPD/UPD"),new Action() @@ -77,6 +81,13 @@ control.handleDisplayProperties(); } },null,false,"document-properties.png"); + buttonArea.addButton(i18n.tr("Synchronisieren"),new Action() + { + public void handleAction(Object context) throws ApplicationException + { + control.handleSync(); + } + },null,false,"view-refresh.png"); buttonArea.addButton(i18n.tr("Konfiguration testen"), new Action() { public void handleAction(Object context) throws ApplicationException diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/ddv/KontoList.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/ddv/KontoList.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/ddv/KontoList.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/ddv/KontoList.java 2019-11-02 14:14:17.000000000 +0000 @@ -20,7 +20,9 @@ import de.willuhn.datasource.GenericObject; import de.willuhn.datasource.pseudo.PseudoIterator; import de.willuhn.datasource.rmi.DBIterator; +import de.willuhn.jameica.gui.parts.table.FeatureSummary; import de.willuhn.jameica.hbci.gui.action.KontoNew; +import de.willuhn.jameica.hbci.gui.menus.KontoList.Style; import de.willuhn.jameica.hbci.passports.ddv.server.PassportImpl; import de.willuhn.jameica.hbci.rmi.Konto; @@ -40,8 +42,9 @@ { super(null,new KontoNew()); this.setShowFilter(false); + this.setContextMenu(new de.willuhn.jameica.hbci.gui.menus.KontoList(Style.PASSPORT)); this.setCheckable(true); - this.setSummary(false); + this.removeFeature(FeatureSummary.class); this.myConfig = config; } @@ -110,22 +113,3 @@ } } - - -/********************************************************************* - * $Log: KontoList.java,v $ - * Revision 1.2 2011/08/05 11:21:58 willuhn - * @N Erster Code fuer eine Umsatz-Preview - * @C Compiler-Warnings - * @N DateFromInput/DateToInput - damit sind die Felder fuer den Zeitraum jetzt ueberall einheitlich - * - * Revision 1.1 2010-09-07 15:28:05 willuhn - * @N BUGZILLA 391 - Kartenleser-Konfiguration komplett umgebaut. Damit lassen sich jetzt beliebig viele Kartenleser und Konfigurationen parellel einrichten - * - * Revision 1.1 2010/06/17 11:38:15 willuhn - * @C kompletten Code aus "hbci_passport_pintan" in Hibiscus verschoben - es macht eigentlich keinen Sinn mehr, das in separaten Projekten zu fuehren - * - * Revision 1.1 2007/08/31 09:43:55 willuhn - * @N Einer PIN/TAN-Config koennen jetzt mehrere Konten zugeordnet werden - * - **********************************************************************/ \ No newline at end of file diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/ChipTANDialog.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/ChipTANDialog.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/ChipTANDialog.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/ChipTANDialog.java 2019-11-02 14:14:17.000000000 +0000 @@ -29,7 +29,9 @@ import org.eclipse.swt.widgets.Canvas; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.ProgressBar; import org.eclipse.swt.widgets.Spinner; import org.eclipse.swt.widgets.Text; @@ -39,6 +41,7 @@ import de.willuhn.jameica.gui.GUI; import de.willuhn.jameica.gui.Part; +import de.willuhn.jameica.gui.input.CheckboxInput; import de.willuhn.jameica.gui.util.Container; import de.willuhn.jameica.gui.util.SWTUtil; import de.willuhn.jameica.gui.util.SimpleContainer; @@ -58,11 +61,13 @@ public class ChipTANDialog extends TANDialog { private final static Settings settings = new Settings(ChipTANDialog.class); + private final static String PARAM_AUTOCONTINUE = "usb.autocontinue"; private String code = null; private boolean smallDisplay = false; private boolean usb = false; private ChipTanCardService service = null; + private CheckboxInput autoContinue = null; /** * ct. @@ -125,6 +130,30 @@ } /** + * Liefert eine Checkbox, mit der man einstellen kann, ob bei Erhalt der TAN via USB automatisch fortgesetzt werden soll. + * @return die Checkbox. + * @throws RemoteException + */ + private CheckboxInput getAutoContinue() throws RemoteException + { + if (this.autoContinue != null) + return this.autoContinue; + + this.autoContinue = new CheckboxInput(settings.getBoolean(PARAM_AUTOCONTINUE,false)); + this.autoContinue.setName(i18n.tr("Bei Erhalt der TAN automatisch fortsetzen")); + this.autoContinue.addListener(new Listener() { + + @Override + public void handleEvent(Event event) + { + settings.setAttribute(PARAM_AUTOCONTINUE,((Boolean)autoContinue.getValue()).booleanValue()); + } + }); + + return this.autoContinue; + } + + /** * Findet heraus, ob alle Vorbedingungen fuer die Nutzung von ChipTAN USB erfuellt sind. * @throws RemoteException */ @@ -268,6 +297,18 @@ } /** + * @see de.willuhn.jameica.gui.dialogs.PasswordDialog#extend(de.willuhn.jameica.gui.util.Container) + */ + @Override + protected void extend(Container container) throws Exception + { + super.extend(container); + + if (this.usb) + container.addInput(this.getAutoContinue()); + } + + /** * Ueberschrieben, um Abwaertskompatibilitaet zu Jameica 2.8.0 herzustellen. * Dort war es noch nicht moeglich, das Passwort per Code zu setzen. * @param password das zu setzende Passwort. @@ -285,11 +326,16 @@ // Checken, ob es das Passwort-Eingabefeld schon als Member in der Klasse gibt try { - Object input = JameicaCompat.get(this,null,"passwordInput"); + Object input = JameicaCompat.get(ChipTANDialog.this,null,"passwordInput"); // OK, das Feld gibts. Dann ist die Version aktuell. if (input != null) + { + boolean ok = settings.getBoolean(PARAM_AUTOCONTINUE,false); + if (password != null && password.length() > 0 && ok) + close(); return; + } // Feld gibts nicht. Dann muessen wir das Eingabefeld suchen applyPassword(password,parent.getChildren()); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/Controller.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/Controller.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/Controller.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/Controller.java 2019-11-02 14:14:17.000000000 +0000 @@ -42,6 +42,7 @@ import de.willuhn.jameica.hbci.HBCI; import de.willuhn.jameica.hbci.HBCIProperties; import de.willuhn.jameica.hbci.gui.action.PassportChange; +import de.willuhn.jameica.hbci.gui.action.PassportSync; import de.willuhn.jameica.hbci.gui.action.PassportTest; import de.willuhn.jameica.hbci.gui.dialogs.PassportPropertyDialog; import de.willuhn.jameica.hbci.gui.input.BLZInput; @@ -376,7 +377,7 @@ { if (customerId != null) return customerId; - customerId = new TextInput(getConfig().getCustomerId(),20); + customerId = new TextInput(getConfig().getCustomerId(),30); customerId.setName(i18n.tr("Kundenkennung")); customerId.setMandatory(true); return customerId; @@ -391,7 +392,7 @@ { if (userId != null) return userId; - userId = new TextInput(getConfig().getUserId(),20); + userId = new TextInput(getConfig().getUserId(),30); userId.setName(i18n.tr("Benutzerkennung")); userId.setMandatory(true); return userId; @@ -527,11 +528,39 @@ } /** + * Synchronisiert den Bankzugang neu. + */ + public synchronized void handleSync() + { + this.handleDeleteTanSettings(); + + try + { + if (!Application.getCallback().askUser(i18n.tr("Sind Sie sicher?"))) + return; + + new PassportSync().handleAction(new PassportHandleImpl(getConfig())); + } + catch (ApplicationException ae) + { + Application.getMessagingFactory().sendMessage(new StatusBarMessage(ae.getMessage(),StatusBarMessage.TYPE_ERROR)); + } + catch (OperationCanceledException oce) + { + Logger.info("operation cancelled"); + } + catch (Exception e) + { + Logger.error("error while testing passport",e); + Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Fehler beim Synchronisieren des Bank-Zugangs: {}",e.getMessage()),StatusBarMessage.TYPE_ERROR)); + } + } + + /** * Testet die Konfiguration. */ public synchronized void handleTest() { - // Speichern, damit sicher ist, dass wir vernuenftige Daten fuer den // Test haben und die auch gespeichert sind if (!handleStore()) @@ -612,11 +641,19 @@ if (secMech != null && secMech.useUSB()) { CheckboxInput check = this.getChipTANUSB(); - Button button = (Button)check.getControl(); - if (button != null && !button.isDisposed()) + try + { + Button button = (Button)check.getControl(); + if (button != null && !button.isDisposed()) + { + boolean gray = button.getGrayed(); + config.setChipTANUSB((Boolean) (gray ? null : check.getValue())); + } + } + catch (IllegalArgumentException e) { - boolean gray = button.getGrayed(); - config.setChipTANUSB((Boolean) (gray ? null : check.getValue())); + // Das kann passieren, wenn der Bankzugang ganz neu eingerichtet wurde. Dann fehlt die Checkbox + // noch. Daher tolerieren wir den Fehler } } diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/Detail.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/Detail.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/Detail.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/Detail.java 2019-11-02 14:14:17.000000000 +0000 @@ -17,7 +17,6 @@ import de.willuhn.jameica.gui.parts.ButtonArea; import de.willuhn.jameica.gui.util.ColumnLayout; import de.willuhn.jameica.gui.util.Container; -import de.willuhn.jameica.gui.util.Headline; import de.willuhn.jameica.gui.util.SimpleContainer; import de.willuhn.jameica.hbci.HBCI; import de.willuhn.jameica.system.Application; @@ -64,8 +63,8 @@ Container group = new SimpleContainer(getParent()); group.addHeadline(i18n.tr("Erweiterte Einstellungen")); - group.addCheckbox(control.getShowTan(),i18n.tr("TANs während der Eingabe anzeigen")); group.addInput(control.getBezeichnung()); + group.addCheckbox(control.getShowTan(),i18n.tr("TANs während der Eingabe anzeigen")); PtSecMech secMech = control.getConfig().getCurrentSecMech(); if (secMech != null && secMech.useUSB()) @@ -100,8 +99,12 @@ buttons.paint(getParent()); } - new Headline(getParent(),i18n.tr("Fest zugeordnete Konten")); - control.getKontoAuswahl().paint(getParent()); + Container c = new SimpleContainer(getParent(),true); + c.addHeadline(i18n.tr("Fest zugeordnete Konten")); + c.addText(i18n.tr("Die folgende Liste enthält alle Konten, welche diesem Bankzugang fest zugeordnet werden können. " + + "Aktivieren Sie die Kontrollkästchen der gewünschten Konten in der Spalte \"Kontonummer\", um diese Konten fest zuzuordnen. Klicken Sie anschließend \"Speichern\". " + + "Weitere Informationen hierzu finden Sie links in der Hilfe.\n"),true); + c.addPart(control.getKontoAuswahl()); ButtonArea buttons = new ButtonArea(); buttons.addButton(i18n.tr("BPD/UPD"),new Action() @@ -111,6 +114,13 @@ control.handleDisplayProperties(); } },null,false,"document-properties.png"); + buttons.addButton(i18n.tr("Synchronisieren"),new Action() + { + public void handleAction(Object context) throws ApplicationException + { + control.handleSync(); + } + },null,false,"view-refresh.png"); buttons.addButton(i18n.tr("Konfiguration testen"),new Action() { public void handleAction(Object context) throws ApplicationException diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/KontoList.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/KontoList.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/KontoList.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/KontoList.java 2019-11-02 14:14:17.000000000 +0000 @@ -19,7 +19,9 @@ import de.willuhn.datasource.GenericObject; import de.willuhn.datasource.pseudo.PseudoIterator; import de.willuhn.datasource.rmi.DBIterator; +import de.willuhn.jameica.gui.parts.table.FeatureSummary; import de.willuhn.jameica.hbci.gui.action.KontoNew; +import de.willuhn.jameica.hbci.gui.menus.KontoList.Style; import de.willuhn.jameica.hbci.passports.pintan.rmi.PinTanConfig; import de.willuhn.jameica.hbci.passports.pintan.server.PassportImpl; import de.willuhn.jameica.hbci.rmi.Konto; @@ -41,8 +43,9 @@ { super(null,new KontoNew()); this.setShowFilter(false); + this.setContextMenu(new de.willuhn.jameica.hbci.gui.menus.KontoList(Style.PASSPORT)); this.setCheckable(true); - this.setSummary(false); + this.removeFeature(FeatureSummary.class); this.myConfig = config; } @@ -51,6 +54,7 @@ */ public synchronized void paint(Composite parent) throws RemoteException { + // Erst das Parent zeichnen, damit wir anschliessend die // Konten checkable machen koennen. super.paint(parent); @@ -115,22 +119,3 @@ } } - - -/********************************************************************* - * $Log: KontoList.java,v $ - * Revision 1.3 2011/08/05 11:21:59 willuhn - * @N Erster Code fuer eine Umsatz-Preview - * @C Compiler-Warnings - * @N DateFromInput/DateToInput - damit sind die Felder fuer den Zeitraum jetzt ueberall einheitlich - * - * Revision 1.2 2010-09-07 15:17:07 willuhn - * @N GUI-Cleanup - * - * Revision 1.1 2010/06/17 11:38:15 willuhn - * @C kompletten Code aus "hbci_passport_pintan" in Hibiscus verschoben - es macht eigentlich keinen Sinn mehr, das in separaten Projekten zu fuehren - * - * Revision 1.1 2007/08/31 09:43:55 willuhn - * @N Einer PIN/TAN-Config koennen jetzt mehrere Konten zugeordnet werden - * - **********************************************************************/ \ No newline at end of file diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/PhotoTANDialog.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/PhotoTANDialog.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/PhotoTANDialog.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/PhotoTANDialog.java 2019-11-02 14:14:17.000000000 +0000 @@ -14,16 +14,26 @@ import java.rmi.RemoteException; import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.GC; import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Shell; import org.kapott.hbci.manager.MatrixCode; +import de.willuhn.jameica.gui.GUI; import de.willuhn.jameica.gui.util.Container; import de.willuhn.jameica.gui.util.SWTUtil; import de.willuhn.jameica.gui.util.SimpleContainer; import de.willuhn.jameica.hbci.passports.pintan.rmi.PinTanConfig; +import de.willuhn.jameica.system.Settings; import de.willuhn.util.ApplicationException; /** @@ -31,7 +41,12 @@ */ public class PhotoTANDialog extends TANDialog { + private final static Settings SETTINGS = new Settings(PhotoTANDialog.class); + private String hhduc = null; + private int initialSize = 0; + private Image image = null; + private Label imageLabel = null; /** * ct. @@ -55,23 +70,102 @@ Container container = new SimpleContainer(parent,true,1); container.addHeadline(i18n.tr("Matrixcode")); + Composite buttonComp = new Composite(container.getComposite(),SWT.NONE); + GridData buttonGd = new GridData(); + buttonGd.horizontalAlignment = SWT.CENTER; + buttonComp.setLayoutData(buttonGd); + buttonComp.setLayout(new GridLayout(2,true)); + + Button smaller = new Button(buttonComp,SWT.PUSH); + smaller.setToolTipText(i18n.tr("Bild verkleinern")); + smaller.setImage(SWTUtil.getImage("list-remove.png")); + smaller.setLayoutData(new GridData()); + smaller.addSelectionListener(new SelectionAdapter() + { + /** + * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent) + */ + public void widgetSelected(SelectionEvent e) + { + resize(-30); + } + }); + Button larger = new Button(buttonComp,SWT.PUSH); + larger.setImage(SWTUtil.getImage("list-add.png")); + larger.setToolTipText(i18n.tr("Bild vergrößern")); + larger.setLayoutData(new GridData()); + larger.addSelectionListener(new SelectionAdapter() + { + /** + * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent) + */ + public void widgetSelected(SelectionEvent e) + { + resize(30); + } + }); + + MatrixCode code = new MatrixCode(this.hhduc); InputStream stream = new ByteArrayInputStream(code.getImage()); - Image image = SWTUtil.getImage(stream); + + this.image = SWTUtil.getImage(stream); + this.initialSize = this.image.getBounds().width; // Breite des Dialogs ermitteln (+ ein paar Pixel Toleranz am Rand) - int width = image.getBounds().width + 200; + int width = image.getBounds().width + 250; - Label imageLabel = new Label(container.getComposite(),SWT.NONE); + this.imageLabel = new Label(container.getComposite(),SWT.NONE); GridData gd = new GridData(GridData.FILL_BOTH); gd.horizontalAlignment = SWT.CENTER; - imageLabel.setLayoutData(gd); - imageLabel.setImage(image); + this.imageLabel.setLayoutData(gd); + this.imageLabel.setImage(image); this.setSize(width,SWT.DEFAULT); // Hier stehen dann noch die Anweisungen von der Bank drin super.paint(parent); getShell().setMinimumSize(getShell().computeSize(width,SWT.DEFAULT)); + + // Checken, ob wir gespeicherte Resize-Werte haben, wenn ja gleicht resizen + int scaled = SETTINGS.getInt("resize." + this.initialSize,0); + if (scaled != 0) + this.resize(scaled); + + } + + /** + * Aendert die Groesse der Matrix-Grafik um die angegebene Anzahl Pixel. + * @param resize die Anzahl der Pixel, um die die Grafik vergroessert/verkleinert werden soll. + */ + private void resize(int resize) + { + final Rectangle rect = this.image.getBounds(); + + int width = rect.width + resize; + int height = rect.height + resize; + Image scaled = new Image(GUI.getDisplay(), width, height); + final GC gc = new GC(scaled); + gc.setAntialias(SWT.ON); + gc.setInterpolation(SWT.HIGH); + gc.drawImage(this.image, 0, 0, rect.width, rect.height, 0, 0, width, height); + gc.dispose(); + + if (!this.image.isDisposed()) + this.image.dispose(); + + this.image = scaled; + + this.imageLabel.setImage(this.image); + this.imageLabel.setSize(width,height); + this.imageLabel.getParent().layout(true); + + // Dialog-Groesse mit anpassen + final Shell shell = this.getShell(); + final Point sh = shell.getSize(); + shell.setSize(sh.x,sh.y + resize); + + // Neue Groesse abspeichern - pro Ausgangsproesse + SETTINGS.setAttribute("resize." + this.initialSize,width - this.initialSize); } } diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/PinTanConfigFactory.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/PinTanConfigFactory.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/PinTanConfigFactory.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/PinTanConfigFactory.java 2019-11-02 14:14:17.000000000 +0000 @@ -14,6 +14,10 @@ import java.rmi.RemoteException; import java.util.ArrayList; import java.util.Set; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; import org.kapott.hbci.manager.HBCIUtils; import org.kapott.hbci.passport.AbstractHBCIPassport; @@ -51,8 +55,8 @@ */ public static synchronized PinTanConfig create() throws Exception { - File f = createFilename(); - HBCIPassport p = load(f); + File f = createFilename(); + Future p = load(f); return new PinTanConfigImpl(p,f); } @@ -70,30 +74,30 @@ String[] existing = settings.getList("config",new String[0]); - boolean found = false; - if (existing != null && existing.length > 0) - { - for (int i=0;i 0) + { + for (int i=0;i customerIds = HBCIProperties.getCustomerIDs(passport); - for (String customerId:customerIds) + try { - try + HBCIPassport passport = config.getPassport(); + Set customerIds = HBCIProperties.getCustomerIDs(passport); + for (String customerId:customerIds) { - DBPropertyUtil.deleteScope(DBPropertyUtil.Prefix.BPD,customerId); - DBPropertyUtil.deleteScope(DBPropertyUtil.Prefix.UPD,customerId); + try + { + DBPropertyUtil.deleteScope(DBPropertyUtil.Prefix.BPD,customerId); + DBPropertyUtil.deleteScope(DBPropertyUtil.Prefix.UPD,customerId); + } + catch (Exception e) + { + // Auch wenn das fehlschlaegt, soll der Rest trotzdem durchgefuehrt werden + Logger.error("error while clearing BPD/UPD cache",e); + } } - catch (Exception e) + + // Versionsnummer der Caches loeschen, um das Neubefuellen des Cache zu forcieren + String user = passport.getUserId(); + if (user != null && user.length() > 0) { - // Auch wenn das fehlschlaegt, soll der Rest trotzdem durchgefuehrt werden - Logger.error("error while clearing BPD/UPD cache",e); + Logger.info("deleting BPD/UPD cache versions"); + VersionUtil.delete(de.willuhn.jameica.hbci.Settings.getDBService(),DBPropertyUtil.Prefix.BPD.value() + "." + user); + VersionUtil.delete(de.willuhn.jameica.hbci.Settings.getDBService(),DBPropertyUtil.Prefix.UPD.value() + "." + user); } } - - // Versionsnummer der Caches loeschen, um das Neubefuellen des Cache zu forcieren - String user = passport.getUserId(); - if (user != null && user.length() > 0) - { - Logger.info("deleting BPD/UPD cache versions"); - VersionUtil.delete(de.willuhn.jameica.hbci.Settings.getDBService(),DBPropertyUtil.Prefix.BPD.value() + "." + user); - VersionUtil.delete(de.willuhn.jameica.hbci.Settings.getDBService(),DBPropertyUtil.Prefix.UPD.value() + "." + user); + catch (Exception e) + { + // Das kann passieren, wenn der Passport unvollstaendig ist } - } catch (ApplicationException ae) { @@ -189,16 +199,50 @@ /** * Erzeugt ein Passport-Objekt basierend auf der uebergebenen Config. * @param f das HBCI4Java-Config-File. - * @return Passport. + * @return Passport. Wir liefern hier ein Future zurueck, damit das eigentliche Laden erst bei Bedarf stattfinden muss. */ - public static HBCIPassport load(File f) + public static Future load(final File f) { HBCIUtils.setParam("client.passport.default","PinTan"); - HBCIUtils.setParam("client.passport.PinTan.filename",f.getAbsolutePath()); +// HBCIUtils.setParam("client.passport.PinTan.filename",f.getAbsolutePath()); HBCIUtils.setParam("client.passport.PinTan.init","1"); HBCIUtils.setParam("client.passport.PinTan.checkcert","1"); - return AbstractHBCIPassport.getInstance("PinTan"); + + return new Future() { + + private HBCIPassport p = null; + /** + * @see java.util.concurrent.Future#get() + */ + @Override + public HBCIPassport get() throws InterruptedException, ExecutionException + { + if (this.p == null) + this.p = AbstractHBCIPassport.getInstance("PinTan",f); + return this.p; + } + @Override + public boolean cancel(boolean mayInterruptIfRunning) + { + return false; + } + @Override + public boolean isCancelled() + { + return false; + } + @Override + public boolean isDone() + { + return this.p != null; + } + @Override + public HBCIPassport get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException + { + return this.get(); + } + }; } /** @@ -211,9 +255,9 @@ public static synchronized PinTanConfig findByKonto(Konto konto) throws RemoteException, ApplicationException { - GenericIterator i = getConfigs(); - if (!i.hasNext()) - throw new ApplicationException(i18n.tr("Bitte legen Sie zuerst eine PIN/TAN-Konfiguration an")); + GenericIterator i = getConfigs(); + if (!i.hasNext()) + throw new ApplicationException(i18n.tr("Bitte legen Sie zuerst eine PIN/TAN-Konfiguration an")); Logger.info("searching config for konto " + konto.getKontonummer() + ", blz: " + konto.getBLZ()); PinTanConfig config = null; @@ -295,13 +339,13 @@ { if (found[i] != null && found[i].length() > 0) { - File f = toAbsolutePath(found[i]); + File f = toAbsolutePath(found[i]); if (!f.exists()) continue; try { - HBCIPassport p = load(f); + Future p = load(f); configs.add(new PinTanConfigImpl(p,f)); } catch (Exception e) diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/PtSecMech.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/PtSecMech.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/PtSecMech.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/PtSecMech.java 2019-11-02 14:14:17.000000000 +0000 @@ -111,7 +111,29 @@ return result; } + + /** + * Erzeugt ein PTSechMech-Objekt aus dem Text. + * Hier wird auch toleriert, wenn nur die Nummer angegeben ist. + * @param text der Text mit dem TAN-Verfahren. + * @return das PTSechMech-Objekt oder NULL, wenn kein Text angegeben wurde. + */ + public static PtSecMech createFailsafe(String text) + { + if (text == null || text.length() == 0) + return null; + + int pos = text.indexOf(":"); + if (pos > 0) + return create(text); + + PtSecMech result = new PtSecMech(); + result.id = text; + result.name = i18n.tr("TAN-Verfahren"); // Dummy-Name + return result; + } + /** * Liefert die ID des TAN-Verfahrens. * @return id die ID des TAN-Verfahrens. @@ -129,6 +151,15 @@ { return name; } + + /** + * Liefert den Namen des TAN-Verfahrens mit der ID. + * @return der Name des TAN-Verfahrens mit der ID. + */ + public String getLongname() + { + return "[" + this.id + "] " + this.name; + } /** * @see java.lang.Object#equals(java.lang.Object) diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/PtSecMechDialog.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/PtSecMechDialog.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/PtSecMechDialog.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/PtSecMechDialog.java 2019-11-02 14:14:17.000000000 +0000 @@ -177,7 +177,7 @@ List list = PtSecMech.parse(this.options); this.type = new SelectInput(list,null); - this.type.setAttribute("name"); + this.type.setAttribute("longname"); return this.type; } } diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/TANDialog.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/TANDialog.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/TANDialog.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/TANDialog.java 2019-11-02 14:14:17.000000000 +0000 @@ -10,13 +10,17 @@ package de.willuhn.jameica.hbci.passports.pintan; import java.rmi.RemoteException; +import java.util.Date; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Listener; import de.willuhn.jameica.gui.dialogs.PasswordDialog; import de.willuhn.jameica.hbci.HBCI; import de.willuhn.jameica.hbci.HBCIProperties; +import de.willuhn.jameica.hbci.MetaKey; import de.willuhn.jameica.hbci.passports.pintan.rmi.PinTanConfig; import de.willuhn.jameica.hbci.rmi.HibiscusDBObject; import de.willuhn.jameica.hbci.rmi.Konto; @@ -65,9 +69,9 @@ String s = null; try { - BeanService service = Application.getBootLoader().getBootable(BeanService.class); - SynchronizeSession session = service.get(HBCISynchronizeBackend.class).getCurrentSession(); - Konto konto = session != null ? session.getKonto() : null; + final BeanService service = Application.getBootLoader().getBootable(BeanService.class); + final SynchronizeSession session = service.get(HBCISynchronizeBackend.class).getCurrentSession(); + final Konto konto = session != null ? session.getKonto() : null; if (konto != null) { @@ -76,6 +80,33 @@ if (name != null && name.length() > 0) s += " [" + name + "]"; } + + if (session != null) + { + this.addCloseListener(new Listener() { + + @Override + public void handleEvent(Event event) + { + if (event.detail == SWT.CANCEL) + { + // TAN-Dialog wurde abgebrochen + if (context != null) + { + try + { + Logger.info("mark job as tan cancelled: " + HBCIContext.toString(context)); + MetaKey.TAN_CANCEL.set(context,HBCI.LONGDATEFORMAT.format(new Date())); + } + catch (Exception e) + { + Logger.error("unable to set tan cancel flag in object",e); + } + } + } + } + }); + } } catch (Exception e) { @@ -111,7 +142,7 @@ } /** - * Speichert den zugehoerigen Auftrag, insofrn ermittelbar. + * Speichert den zugehoerigen Auftrag, insofern ermittelbar. * @param context der zugehoerige Auftrag. */ public void setContext(HibiscusDBObject context) diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/server/PinTanConfigImpl.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/server/PinTanConfigImpl.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/server/PinTanConfigImpl.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/pintan/server/PinTanConfigImpl.java 2019-11-02 14:14:17.000000000 +0000 @@ -14,6 +14,7 @@ import java.rmi.RemoteException; import java.util.ArrayList; import java.util.List; +import java.util.concurrent.Future; import org.apache.commons.lang.StringUtils; import org.kapott.hbci.manager.HBCIVersion; @@ -40,18 +41,31 @@ private final static Settings settings = new Settings(PinTanConfig.class); - private HBCIPassport passport = null; - private File file = null; + private HBCIPassport passport = null; + private Future future = null; + private File file = null; /** * ct. - * @param passport + * @param future * @param file * @throws RemoteException */ - public PinTanConfigImpl(HBCIPassport passport, File file) throws RemoteException + public PinTanConfigImpl(Future future, File file) throws RemoteException { - this.passport = passport; + this.future = future; + this.file = file; + } + + /** + * ct. + * @param p + * @param file + * @throws RemoteException + */ + public PinTanConfigImpl(HBCIPassport p, File file) throws RemoteException + { + this.passport = p; this.file = file; } @@ -118,10 +132,18 @@ catch (Exception e) { Logger.error("unable to determine name",e); - return passport.getHost(); + try + { + return this.getPassport().getHost(); + } + catch (RemoteException re) + { + Logger.error("unable to determine host",re); + return " (" + re.getMessage() + ")"; + } } } - + /** * @see de.willuhn.jameica.hbci.passport.Configuration#getConfigDialog() */ @@ -181,7 +203,7 @@ */ public String getHBCIVersion() throws RemoteException { - String ppVersion = StringUtils.trimToNull(passport.getHBCIVersion()); + String ppVersion = StringUtils.trimToNull(this.getPassport().getHBCIVersion()); return settings.getString(getID() + ".hbciversion",ppVersion != null ? ppVersion : HBCIVersion.HBCI_300.getId()); } @@ -198,7 +220,7 @@ */ public String getURL() throws RemoteException { - return passport.getHost(); + return this.getPassport().getHost(); } /** @@ -206,18 +228,18 @@ */ public void setURL(String url) throws RemoteException { - if (url == null || url.length() == 0) - { - Logger.warn("no url entered"); - return; - } - if (url.startsWith("https://")) + if (url == null || url.length() == 0) + { + Logger.warn("no url entered"); + return; + } + if (url.startsWith("https://")) { Logger.warn("URL entered with https:// prefix, cutting"); - url = url.substring(8); + url = url.substring(8); } Logger.info("saving URL " + url); - passport.setHost(url); + this.getPassport().setHost(url); } /** @@ -225,7 +247,7 @@ */ public int getPort() throws RemoteException { - return passport.getPort().intValue(); + return this.getPassport().getPort().intValue(); } /** @@ -233,7 +255,7 @@ */ public void setPort(int port) throws RemoteException { - passport.setPort(new Integer(port)); + this.getPassport().setPort(new Integer(port)); } /** @@ -241,7 +263,7 @@ */ public String getFilterType() throws RemoteException { - return passport.getFilterType(); + return this.getPassport().getFilterType(); } /** @@ -249,7 +271,7 @@ */ public void setFilterType(String type) throws RemoteException { - passport.setFilterType(type); + this.getPassport().setFilterType(type); } /** @@ -257,7 +279,7 @@ */ public String getBLZ() throws RemoteException { - return passport.getBLZ(); + return this.getPassport().getBLZ(); } /** @@ -265,7 +287,7 @@ */ public String getCustomerId() throws RemoteException { - return passport.getCustomerId(); + return this.getPassport().getCustomerId(); } /** @@ -273,7 +295,7 @@ */ public void setCustomerId(String customer) throws RemoteException { - passport.setCustomerId(customer); + this.getPassport().setCustomerId(customer); } /** @@ -281,7 +303,7 @@ */ public String getUserId() throws RemoteException { - return passport.getUserId(); + return this.getPassport().getUserId(); } /** @@ -289,7 +311,7 @@ */ public void setUserId(String user) throws RemoteException { - passport.setUserId(user); + this.getPassport().setUserId(user); } /** @@ -305,7 +327,18 @@ */ public HBCIPassport getPassport() throws RemoteException { - return passport; + if (this.passport != null) + return this.passport; + + try + { + this.passport = this.future.get(); + return this.passport; + } + catch (Exception e) + { + throw new RemoteException("error while loading passport", e); + } } /** diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/Controller.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/Controller.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/Controller.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/Controller.java 2019-11-02 14:14:17.000000000 +0000 @@ -17,8 +17,6 @@ import org.eclipse.swt.widgets.FileDialog; import org.eclipse.swt.widgets.TableItem; import org.kapott.hbci.callback.HBCICallback; -import org.kapott.hbci.exceptions.NeedKeyAckException; -import org.kapott.hbci.manager.HBCIHandler; import org.kapott.hbci.passport.AbstractHBCIPassport; import org.kapott.hbci.passport.HBCIPassport; @@ -40,6 +38,7 @@ import de.willuhn.jameica.hbci.HBCICallbackSWT; import de.willuhn.jameica.hbci.gui.DialogFactory; import de.willuhn.jameica.hbci.gui.action.PassportChange; +import de.willuhn.jameica.hbci.gui.action.PassportSync; import de.willuhn.jameica.hbci.gui.action.PassportTest; import de.willuhn.jameica.hbci.gui.dialogs.NewKeysDialog; import de.willuhn.jameica.hbci.gui.dialogs.PassportPropertyDialog; @@ -49,7 +48,6 @@ import de.willuhn.jameica.hbci.passports.rdh.rmi.RDHKey; import de.willuhn.jameica.hbci.passports.rdh.server.PassportHandleImpl; import de.willuhn.jameica.hbci.rmi.Konto; -import de.willuhn.jameica.messaging.QueryMessage; import de.willuhn.jameica.messaging.StatusBarMessage; import de.willuhn.jameica.plugin.AbstractPlugin; import de.willuhn.jameica.system.Application; @@ -140,7 +138,7 @@ { if (this.benutzerkennung != null) return this.benutzerkennung; - this.benutzerkennung = new TextInput(getHBCIPassport().getUserId(),20); + this.benutzerkennung = new TextInput(getHBCIPassport().getUserId(),30); this.benutzerkennung.setName(i18n.tr("Benutzerkennung")); return this.benutzerkennung; } @@ -155,7 +153,7 @@ { if (this.kundenkennung != null) return this.kundenkennung; - this.kundenkennung = new TextInput(getHBCIPassport().getCustomerId(),20); + this.kundenkennung = new TextInput(getHBCIPassport().getCustomerId(),30); this.kundenkennung.setName(i18n.tr("Kundenkennung")); return this.kundenkennung; } @@ -490,9 +488,9 @@ } /** - * Synchronisiert die Signatur-ID. + * Synchronisiert den Bankzugang. */ - public synchronized void syncSigId() + public synchronized void handleSync() { RDHKey key = getKey(); if (key == null) @@ -502,66 +500,28 @@ } HBCIPassport passport = null; - HBCIHandler handler = null; try { - String s = i18n.tr("Sind Sie sicher?"); - if (!Application.getCallback().askUser(s)) + if (!Application.getCallback().askUser(i18n.tr("Sind Sie sicher?"))) return; passport = key.load(); passport.syncSigId(); - - QueryMessage msg = new QueryMessage(passport); - Application.getMessagingFactory().getMessagingQueue("hibiscus.passport.rdh.hbciversion").sendSyncMessage(msg); - Object data = msg.getData(); - if (data == null || !(data instanceof String)) - throw new ApplicationException(i18n.tr("HBCI-Version nicht ermittelbar")); - - String version = (String)msg.getData(); - Logger.info("using hbci version: " + version); - handler = new HBCIHandler(version,passport); - handler.close(); - handler = null; - Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Signatur-ID erfolgreich synchronisiert"), StatusBarMessage.TYPE_SUCCESS)); + new PassportSync().handleAction(new PassportHandleImpl(key)); } catch (ApplicationException ae) { - Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Fehler beim Synchronisieren der Signatur: {0}",ae.getMessage()), StatusBarMessage.TYPE_ERROR)); + Application.getMessagingFactory().sendMessage(new StatusBarMessage(ae.getMessage(),StatusBarMessage.TYPE_ERROR)); } catch (OperationCanceledException oce) { - Logger.warn("operation cancelled"); + Logger.info("operation cancelled"); } catch (Exception e) { - Throwable current = e; - for (int i=0;i<10;++i) - { - if (current == null) - break; - if (current instanceof NeedKeyAckException) - { - Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Schlüssel noch nicht freigegeben"), StatusBarMessage.TYPE_ERROR)); - return; - } - current = current.getCause(); - } - Logger.error("unable to sync key ",e); - Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Fehler beim Synchronisieren der Signatur: {0}",e.getMessage()), StatusBarMessage.TYPE_ERROR)); - } - finally - { - try - { - if (handler != null) - handler.close(); - } - catch (Throwable t) - { - Logger.error("error while closing handler",t); - } + Logger.error("error while testing passport",e); + Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Fehler beim Synchronisieren des Bank-Zugangs: {}",e.getMessage()),StatusBarMessage.TYPE_ERROR)); } } @@ -606,7 +566,6 @@ } } - /** * Speichert die Einstellungen fuer den aktuellen Schluessel. * @return true, wenn das Speichern erfolgreich war. diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/Detail.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/Detail.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/Detail.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/Detail.java 2019-11-02 14:14:17.000000000 +0000 @@ -15,7 +15,6 @@ import de.willuhn.jameica.gui.parts.ButtonArea; import de.willuhn.jameica.gui.util.ColumnLayout; import de.willuhn.jameica.gui.util.Container; -import de.willuhn.jameica.gui.util.Headline; import de.willuhn.jameica.gui.util.SimpleContainer; import de.willuhn.jameica.hbci.HBCI; import de.willuhn.jameica.hbci.HBCIProperties; @@ -89,9 +88,13 @@ } - new Headline(getParent(),i18n.tr("Fest zugeordnete Konten")); - control.getKontoAuswahl().paint(getParent()); - + Container c = new SimpleContainer(getParent(),true); + c.addHeadline(i18n.tr("Fest zugeordnete Konten")); + c.addText(i18n.tr("Die folgende Liste enthält alle Konten, welche diesem Bankzugang fest zugeordnet werden können. " + + "Aktivieren Sie die Kontrollkästchen der gewünschten Konten in der Spalte \"Kontonummer\", um diese Konten fest zuzuordnen. Klicken Sie anschließend \"Speichern\". " + + "Weitere Informationen hierzu finden Sie links in der Hilfe.\n"),true); + c.addPart(control.getKontoAuswahl()); + ButtonArea buttons = new ButtonArea(); buttons.addButton(i18n.tr("BPD/UPD"),new Action() { @@ -100,20 +103,20 @@ control.handleDisplayProperties(); } },null,false,"document-properties.png"); - buttons.addButton(i18n.tr("Konfiguration testen"),new Action() + buttons.addButton(i18n.tr("Synchronisieren"),new Action() { public void handleAction(Object context) throws ApplicationException { - control.handleTest(); + control.handleSync(); } - },null,false,"dialog-information.png"); - buttons.addButton(i18n.tr("Signatur-ID synchronisieren"),new Action() + },null,false,"view-refresh.png"); + buttons.addButton(i18n.tr("Konfiguration testen"),new Action() { public void handleAction(Object context) throws ApplicationException { - control.syncSigId(); + control.handleTest(); } - },null,false,"view-refresh.png"); + },null,false,"dialog-information.png"); buttons.addButton(i18n.tr("Speichern"),new Action() { public void handleAction(Object context) throws ApplicationException diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/KeyFormatDialog.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/KeyFormatDialog.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/KeyFormatDialog.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/KeyFormatDialog.java 2019-11-02 14:14:17.000000000 +0000 @@ -12,7 +12,6 @@ import java.util.Arrays; -import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import de.willuhn.jameica.gui.Action; @@ -20,6 +19,7 @@ import de.willuhn.jameica.gui.input.LabelInput; import de.willuhn.jameica.gui.parts.ButtonArea; import de.willuhn.jameica.gui.parts.TablePart; +import de.willuhn.jameica.gui.parts.table.FeatureSummary; import de.willuhn.jameica.gui.util.Color; import de.willuhn.jameica.gui.util.Container; import de.willuhn.jameica.gui.util.SimpleContainer; @@ -36,7 +36,8 @@ public class KeyFormatDialog extends AbstractDialog { private final static I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N(); - private final static int WINDOW_WIDTH = 440; + private final static int WINDOW_WIDTH = 440; + private final static int WINDOW_HEIGHT = 260; private TablePart table = null; private KeyFormat choosen = null; @@ -55,7 +56,7 @@ super(position); this.neededFeature = feature; setTitle(i18n.tr("Auswahl des Datei-Formats")); - setSize(WINDOW_WIDTH,SWT.DEFAULT); + setSize(WINDOW_WIDTH,WINDOW_HEIGHT); } /** @@ -83,7 +84,7 @@ }; - Container c = new SimpleContainer(parent); + Container c = new SimpleContainer(parent,true); c.addText(i18n.tr("Bitte wählen Sie das Datei-Format des Schlüssels"),true); c.addInput(this.warn); @@ -92,7 +93,7 @@ this.table.setMulti(false); this.table.setRememberColWidths(true); this.table.setRememberOrder(true); - this.table.setSummary(false); + this.table.removeFeature(FeatureSummary.class); c.addPart(this.table); @@ -107,7 +108,7 @@ c.addButtonArea(buttons); - getShell().setMinimumSize(getShell().computeSize(WINDOW_WIDTH,SWT.DEFAULT)); + getShell().setMinimumSize(getShell().computeSize(WINDOW_WIDTH,WINDOW_HEIGHT)); } /** @@ -119,47 +120,3 @@ } } - - -/********************************************************************* - * $Log: KeyFormatDialog.java,v $ - * Revision 1.2 2011/04/29 11:38:58 willuhn - * @N Konfiguration der HBCI-Medien ueberarbeitet. Es gibt nun direkt in der Navi einen Punkt "Bank-Zugaenge", in der alle Medien angezeigt werden. - * - * Revision 1.1 2010/06/17 11:26:48 willuhn - * @B In HBCICallbackSWT wurden die RDH-Passports nicht korrekt ausgefiltert - * @C komplettes Projekt "hbci_passport_rdh" in Hibiscus verschoben - es macht eigentlich keinen Sinn mehr, das in separaten Projekten zu fuehren - * @N BUGZILLA 312 - * @N Neue Icons in Schluesselverwaltung - * @N GUI-Polish in Schluesselverwaltung - * - * Revision 1.6 2010/06/14 22:55:00 willuhn - * @C Dialog-Groesse angepasst - * - * Revision 1.5 2010/06/14 22:46:10 willuhn - * @C Dialog-Groesse angepasst - * - * Revision 1.4 2008/11/06 21:44:37 willuhn - * @B Benoetigtes Feature wurde in Auswahldialog nicht beruecksichtigt - * - * Revision 1.3 2008/07/28 08:35:44 willuhn - * @N Finder-Methode fuer Schluesselformate in RDHKeyFactory verschoben - * - * Revision 1.2 2008/07/25 11:34:56 willuhn - * @B Bugfixing - * - * Revision 1.1 2008/07/25 11:06:08 willuhn - * @N RDH-2 Format - * @C Haufenweise Code-Cleanup - * - * Revision 1.3 2008/07/24 23:36:20 willuhn - * @N Komplette Umstellung der Schluessel-Verwaltung. Damit koennen jetzt externe Schluesselformate erheblich besser angebunden werden. - * ACHTUNG - UNGETESTETER CODE - BITTE NOCH NICHT VERWENDEN - * - * Revision 1.2 2006/01/23 17:19:48 willuhn - * @B bug 155 - * - * Revision 1.1 2005/11/14 11:00:18 willuhn - * @B bug 148 - * - **********************************************************************/ \ No newline at end of file diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/KontoList.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/KontoList.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/KontoList.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/KontoList.java 2019-11-02 14:14:17.000000000 +0000 @@ -19,7 +19,9 @@ import de.willuhn.datasource.GenericObject; import de.willuhn.datasource.pseudo.PseudoIterator; import de.willuhn.datasource.rmi.DBIterator; +import de.willuhn.jameica.gui.parts.table.FeatureSummary; import de.willuhn.jameica.hbci.gui.action.KontoNew; +import de.willuhn.jameica.hbci.gui.menus.KontoList.Style; import de.willuhn.jameica.hbci.passports.rdh.rmi.RDHKey; import de.willuhn.jameica.hbci.passports.rdh.server.PassportImpl; import de.willuhn.jameica.hbci.rmi.Konto; @@ -41,8 +43,9 @@ { super(null,new KontoNew()); this.setShowFilter(false); + this.setContextMenu(new de.willuhn.jameica.hbci.gui.menus.KontoList(Style.PASSPORT)); this.setCheckable(true); - this.setSummary(false); + this.removeFeature(FeatureSummary.class); this.myKey = key; } diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/keyformat/HBCI4JavaFormat.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/keyformat/HBCI4JavaFormat.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/keyformat/HBCI4JavaFormat.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/passports/rdh/keyformat/HBCI4JavaFormat.java 2019-11-02 14:14:17.000000000 +0000 @@ -24,6 +24,7 @@ import de.willuhn.jameica.hbci.HBCI; import de.willuhn.jameica.hbci.HBCICallbackSWT; import de.willuhn.jameica.hbci.HBCIProperties; +import de.willuhn.jameica.hbci.gui.DialogFactory; import de.willuhn.jameica.hbci.passports.rdh.InsertKeyDialog; import de.willuhn.jameica.hbci.passports.rdh.rmi.RDHKey; import de.willuhn.jameica.hbci.passports.rdh.server.PassportHandleImpl; @@ -254,6 +255,8 @@ if (oce != null) throw oce; + DialogFactory.clearPINCache(null); + ApplicationException ae = (ApplicationException) HBCIProperties.getCause(e,ApplicationException.class); if (ae != null) throw ae; diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/rmi/Umsatz.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/rmi/Umsatz.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/rmi/Umsatz.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/rmi/Umsatz.java 2019-11-02 14:14:17.000000000 +0000 @@ -223,7 +223,6 @@ */ public void setPurposeCode(String code) throws RemoteException; - /** * Liefert die EndToEnd-ID der Buchung. * Nur bei Umsaetzen vorhanden, die per CAMT abgerufen wurden. @@ -239,4 +238,19 @@ */ public void setEndToEndId(String id) throws RemoteException; + /** + * Liefert die Mandatsreferenz der Buchung. + * Nur bei Umsaetzen vorhanden, die per CAMT abgerufen wurden. + * @return der Mandatsreferenz der Buchung. + * @throws RemoteException + */ + public String getMandateId() throws RemoteException; + + /** + * Speichern die Mandatsreferenz der Buchung. + * @param id die Mandatsreferenz der Buchung. + * @throws RemoteException + */ + public void setMandateId(String id) throws RemoteException; + } diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/AbstractSepaSammelTransferImpl.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/AbstractSepaSammelTransferImpl.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/AbstractSepaSammelTransferImpl.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/AbstractSepaSammelTransferImpl.java 2019-11-02 14:14:17.000000000 +0000 @@ -79,7 +79,7 @@ throw new ApplicationException(i18n.tr("Bitte geben Sie eine Bezeichnung ein.")); HBCIProperties.checkLength(getPmtInfId(), HBCIProperties.HBCI_SEPA_ENDTOENDID_MAXLENGTH); - HBCIProperties.checkChars(getPmtInfId(), HBCIProperties.HBCI_SEPA_VALIDCHARS); + HBCIProperties.checkChars(getPmtInfId(), HBCIProperties.HBCI_SEPA_PMTINF_VALIDCHARS); if (this.getTermin() == null) this.setTermin(new Date()); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/AuslandsUeberweisungImpl.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/AuslandsUeberweisungImpl.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/AuslandsUeberweisungImpl.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/AuslandsUeberweisungImpl.java 2019-11-02 14:14:17.000000000 +0000 @@ -124,7 +124,7 @@ HBCIProperties.checkChars(getEndtoEndId(), HBCIProperties.HBCI_SEPA_VALIDCHARS); HBCIProperties.checkLength(getPmtInfId(), HBCIProperties.HBCI_SEPA_ENDTOENDID_MAXLENGTH); - HBCIProperties.checkChars(getPmtInfId(), HBCIProperties.HBCI_SEPA_VALIDCHARS); + HBCIProperties.checkChars(getPmtInfId(), HBCIProperties.HBCI_SEPA_PMTINF_VALIDCHARS); HBCIProperties.checkLength(getPurposeCode(), HBCIProperties.HBCI_SEPA_PURPOSECODE_MAXLENGTH); HBCIProperties.checkChars(getPurposeCode(), HBCIProperties.HBCI_SEPA_PURPOSECODE_VALIDCHARS); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/Converter.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/Converter.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/Converter.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/Converter.java 2019-11-02 14:14:17.000000000 +0000 @@ -66,6 +66,7 @@ umsatz.setTransactionId(u.id); umsatz.setPurposeCode(u.purposecode); umsatz.setEndToEndId(u.endToEndId); + umsatz.setMandateId(u.mandateId); //BUGZILLA 67 http://www.willuhn.de/bugzilla/show_bug.cgi?id=67 Saldo s = u.saldo; @@ -143,10 +144,21 @@ String eref = umsatz.getEndToEndId(); if (eref == null || eref.length() == 0) { - eref = cleanEndToEndId(VerwendungszweckUtil.getTag(umsatz,Tag.EREF)); + eref = cleanSepaId(VerwendungszweckUtil.getTag(umsatz,Tag.EREF)); if (eref != null && eref.length() > 0 && eref.length() <= 100) umsatz.setEndToEndId(eref); } + + // Wir checken mal, ob wir eine Mandatsreferenz haben. Falls ja, tragen wir die gleich + // in das dedizierte Feld ein. Aber nur, wenn wir noch keine haben + String mid = umsatz.getMandateId(); + if (mid == null || mid.length() == 0) + { + mid = cleanSepaId(VerwendungszweckUtil.getTag(umsatz,Tag.MREF)); + if (mid != null && mid.length() > 0 && mid.length() <= 100) + umsatz.setMandateId(mid); + } + } // //////////////////////////////////////////////////////////////////////////// @@ -222,15 +234,15 @@ } /** - * Bereinigt die EndToEnd-ID. + * Bereinigt eine SEPA-Kennung. * Bei einem User kam es vor, dass die ID nicht korrekt geparst wurde und daher auch den ganzen * Rest des Verwendungszwecks (inclusive aller weiteren SEPA-Tags) enthielt. Ich konnte den Fehler * nicht reproduzieren. Damit aber das Abrufen des Umsatzes deswegen nicht fehlschlaegt, kuerzen * wir in dem Fall die EndToEnd-ID so weit, dass sie rein passt. - * @param text die EndToEnd-ID. - * @return die bereinigte EndToEnd-ID. + * @param text die SEPA-Kennung. + * @return die bereinigte SEPA-Kennung. */ - public static String cleanEndToEndId(String text) + public static String cleanSepaId(String text) { text = clean(text); if (text == null || text.length() == 0 || text.length() <= 100) diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/EinnahmeAusgabe.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/EinnahmeAusgabe.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/EinnahmeAusgabe.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/EinnahmeAusgabe.java 2019-11-02 14:14:17.000000000 +0000 @@ -24,6 +24,7 @@ */ public class EinnahmeAusgabe implements EinnahmeAusgabeZeitraum { + private Konto konto; private String text; private double anfangssaldo; private double einnahmen; @@ -53,6 +54,7 @@ { this.startdatum = start; this.enddatum = end; + this.konto = k; this.text = k.getLongName(); this.anfangssaldo = KontoUtil.getAnfangsSaldo(k,start); @@ -62,6 +64,15 @@ } /** + * Liefert das Konto. + * @return das Konto. + */ + public Konto getKonto() + { + return this.konto; + } + + /** * Liefert den Beschreibungstext der Zeile. * @return der Beschreibungstext der Zeile. */ diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/HBCIDBServiceImpl.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/HBCIDBServiceImpl.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/HBCIDBServiceImpl.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/HBCIDBServiceImpl.java 2019-11-02 14:14:17.000000000 +0000 @@ -18,6 +18,9 @@ import java.sql.Types; import de.willuhn.datasource.db.DBServiceImpl; +import de.willuhn.datasource.rmi.DBIterator; +import de.willuhn.datasource.rmi.DBObject; +import de.willuhn.datasource.rmi.ResultSetExtractor; import de.willuhn.jameica.hbci.HBCI; import de.willuhn.jameica.hbci.rmi.DBSupport; import de.willuhn.jameica.hbci.rmi.HBCIDBService; @@ -254,6 +257,7 @@ catch (SQLException e) { Logger.error("error while executing sql update",e); + Application.getMessagingFactory().getMessagingQueue("jameica.error").sendMessage(new QueryMessage(e)); throw new RemoteException("error while executing sql update: " + e.getMessage(),e); } finally @@ -271,6 +275,57 @@ } } } + + /** + * @see de.willuhn.datasource.db.DBServiceImpl#createList(java.lang.Class) + */ + @Override + public DBIterator createList(Class arg0) throws RemoteException + { + try + { + return super.createList(arg0); + } + catch (RemoteException re) + { + Application.getMessagingFactory().getMessagingQueue("jameica.error").sendMessage(new QueryMessage(re)); + throw re; + } + } + + /** + * @see de.willuhn.datasource.db.DBServiceImpl#createObject(java.lang.Class, java.lang.String) + */ + @Override + public T createObject(Class arg0, String arg1) throws RemoteException + { + try + { + return super.createObject(arg0, arg1); + } + catch (RemoteException re) + { + Application.getMessagingFactory().getMessagingQueue("jameica.error").sendMessage(new QueryMessage(re)); + throw re; + } + } + + /** + * @see de.willuhn.datasource.db.DBServiceImpl#execute(java.lang.String, java.lang.Object[], de.willuhn.datasource.rmi.ResultSetExtractor) + */ + @Override + public Object execute(String arg0, Object[] arg1, ResultSetExtractor arg2) throws RemoteException + { + try + { + return super.execute(arg0, arg1, arg2); + } + catch (RemoteException re) + { + Application.getMessagingFactory().getMessagingQueue("jameica.error").sendMessage(new QueryMessage(re)); + throw re; + } + } /** * @see de.willuhn.jameica.hbci.rmi.HBCIDBService#install() diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/KontoauszugPdfUtil.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/KontoauszugPdfUtil.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/KontoauszugPdfUtil.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/KontoauszugPdfUtil.java 2019-11-02 14:14:17.000000000 +0000 @@ -504,25 +504,61 @@ * @param from das optionale Start-Datum. * @param to das optionale End-Datum. * @param unread true, wenn nur ungelesene Kontoauszuege geliefert werden sollen. + * @param inclusive true, wenn auch Kontoauszuege geliefert werden sollen, die nur in den Datumsbereich hineinreichen. * @return die Liste der passenden Kontoauszuege. * @throws RemoteException */ - public static GenericIterator getList(Object konto, Date from, Date to, boolean unread) throws RemoteException + public static GenericIterator getList(Object konto, Date from, Date to, boolean unread, boolean inclusive) throws RemoteException { HBCIDBService service = (HBCIDBService) Settings.getDBService(); DBIterator it = service.createList(Kontoauszug.class); + + final boolean haveFrom = from != null; + final boolean haveTo = to != null; + + java.sql.Date f = haveFrom ? new java.sql.Date(DateUtil.startOfDay(from).getTime()) : null; + java.sql.Date t = haveTo ? new java.sql.Date(DateUtil.endOfDay(to).getTime()) : null; // Bei HKEKP in Segment-Version 1 wird gar kein Zeitraum mitgeliefert. // Daher nehmen wir dort das Abrufdatum - if (from != null) + + if (inclusive && (haveFrom || haveTo)) // Wenigstens eines der beiden Daten muss vorhanden sein { - java.sql.Timestamp d = new java.sql.Timestamp(DateUtil.startOfDay(from).getTime()); - it.addFilter("(von >= ? OR erstellungsdatum >= ? OR (von IS NULL AND erstellungsdatum IS NULL AND ausgefuehrt_am >= ?))", d, d, d); + if (haveFrom && haveTo) + { + it.addFilter("(" + + "(von >= ? AND von <= ?)" + + " OR " + + "(bis >= ? AND bis <= ?)" + + " OR " + + "(von <= ? AND bis >= ?)" + + " OR " + + "(erstellungsdatum >= ? AND erstellungsdatum <= ?)" + + " OR " + + "(von IS NULL AND bis IS NULL AND erstellungsdatum IS NULL AND ausgefuehrt_am >= ? AND ausgefuehrt_am <= ?)" + + ")", f, t, f, t, f, t, f, t, f, t); + } + else if (haveFrom) + { + // Kontoauszug endet nach dem From-Datum + it.addFilter("((bis >= ? OR erstellungsdatum >= ?) OR (bis IS NULL AND erstellungsdatum IS NULL AND ausgefuehrt_am >= ?))", f, f, f); + } + else if (haveTo) + { + // Kontoauszug beginnt wenigstens vor dem To-Datum + it.addFilter("((von <= ? OR erstellungsdatum <= ?) OR (bis IS NULL AND erstellungsdatum IS NULL AND ausgefuehrt_am <= ?))", t, t, t); + } } - if (to != null) + else { - java.sql.Timestamp d = new java.sql.Timestamp(DateUtil.endOfDay(to).getTime()); - it.addFilter("(bis <= ? OR erstellungsdatum <= ? OR (bis IS NULL AND erstellungsdatum IS NULL AND ausgefuehrt_am <= ?))", d, d, d); + if (haveFrom) + { + it.addFilter("(von >= ? OR erstellungsdatum >= ? OR (von IS NULL AND erstellungsdatum IS NULL AND ausgefuehrt_am >= ?))", f, f, f); + } + if (haveTo) + { + it.addFilter("(bis <= ? OR erstellungsdatum <= ? OR (bis IS NULL AND erstellungsdatum IS NULL AND ausgefuehrt_am <= ?))", t, t, t); + } } if (konto != null && (konto instanceof Konto)) diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/Range.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/Range.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/Range.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/Range.java 2019-11-02 14:14:17.000000000 +0000 @@ -41,6 +41,7 @@ add(new ThisMonth()); add(new LastMonth()); add(new SecondLastMonth()); + add(new Last12Months()); add(new ThisQuarter()); add(new LastQuarter()); add(new SecondLastQuarter()); @@ -385,7 +386,42 @@ return i18n.tr("Monat: Vorletzter"); } } - + + /** + * Berechnet den Zeitraum der letzten 12 Monate. + */ + public static class Last12Months extends Range + { + /** + * @see de.willuhn.jameica.hbci.server.Range#getStart() + */ + public Date getStart() + { + Calendar cal = this.createCalendar(); + cal.add(Calendar.MONTH,-12); + cal.set(Calendar.DAY_OF_MONTH,1); + return DateUtil.startOfDay(cal.getTime()); + } + + /** + * @see de.willuhn.jameica.hbci.server.Range#getEnd() + */ + public Date getEnd() + { + Calendar cal = this.createCalendar(); + cal.set(Calendar.DAY_OF_MONTH,cal.getActualMaximum(Calendar.DAY_OF_MONTH)); + return DateUtil.endOfDay(cal.getTime()); + } + + /** + * @see java.lang.Object#toString() + */ + public String toString() + { + return i18n.tr("Monat: Letzte 12"); + } + } + /** * Berechnet dieses Quartal. */ diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/SepaDauerauftragImpl.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/SepaDauerauftragImpl.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/SepaDauerauftragImpl.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/SepaDauerauftragImpl.java 2019-11-02 14:14:17.000000000 +0000 @@ -149,7 +149,7 @@ HBCIProperties.checkChars(getEndtoEndId(), HBCIProperties.HBCI_SEPA_VALIDCHARS); HBCIProperties.checkLength(getPmtInfId(), HBCIProperties.HBCI_SEPA_ENDTOENDID_MAXLENGTH); - HBCIProperties.checkChars(getPmtInfId(), HBCIProperties.HBCI_SEPA_VALIDCHARS); + HBCIProperties.checkChars(getPmtInfId(), HBCIProperties.HBCI_SEPA_PMTINF_VALIDCHARS); HBCIProperties.checkLength(getPurposeCode(), HBCIProperties.HBCI_SEPA_PURPOSECODE_MAXLENGTH); HBCIProperties.checkChars(getPurposeCode(), HBCIProperties.HBCI_SEPA_PURPOSECODE_VALIDCHARS); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/SepaLastschriftImpl.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/SepaLastschriftImpl.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/SepaLastschriftImpl.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/SepaLastschriftImpl.java 2019-11-02 14:14:17.000000000 +0000 @@ -147,7 +147,7 @@ HBCIProperties.checkChars(getEndtoEndId(), HBCIProperties.HBCI_SEPA_VALIDCHARS); HBCIProperties.checkLength(getPmtInfId(), HBCIProperties.HBCI_SEPA_ENDTOENDID_MAXLENGTH); - HBCIProperties.checkChars(getPmtInfId(), HBCIProperties.HBCI_SEPA_VALIDCHARS); + HBCIProperties.checkChars(getPmtInfId(), HBCIProperties.HBCI_SEPA_PMTINF_VALIDCHARS); HBCIProperties.checkLength(getPurposeCode(), HBCIProperties.HBCI_SEPA_PURPOSECODE_MAXLENGTH); HBCIProperties.checkChars(getPurposeCode(), HBCIProperties.HBCI_SEPA_PURPOSECODE_VALIDCHARS); diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/UmsatzImpl.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/UmsatzImpl.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/UmsatzImpl.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/UmsatzImpl.java 2019-11-02 14:14:17.000000000 +0000 @@ -668,7 +668,19 @@ */ public void setWeitereVerwendungszwecke(String[] list) throws RemoteException { - setAttribute("zweck3",VerwendungszweckUtil.merge(list)); + String s = VerwendungszweckUtil.merge(list); + try + { + if (s != null && s.length() > 1000) + s = s.substring(0,1000); + } + catch (Exception e) + { + // Das catch hier nur zur Sicherheit, weil das ein Quickfix ist. Ein User hatte CAMT-Umsaetze mit + // extrem langen Verwendungszwecken. Wir kuerzen die hier auf 1000 Zeichen. + Logger.error("invalid usage",e); + } + setAttribute("zweck3",s); } /** @@ -756,6 +768,8 @@ copy.setWeitereVerwendungszwecke(this.getWeitereVerwendungszwecke()); copy.setGvCode(this.getGvCode()); copy.setPurposeCode(this.getPurposeCode()); + copy.setEndToEndId(this.getEndToEndId()); + copy.setMandateId(this.getMandateId()); // Das Duplizieren von Umsatzbuchungen machen wir z.Bsp. dann, wenn ein User // per Hand eine Gegenbuchung erzeugt (per Kontextmenu-Eintrag "Gegenbuchung erzeugen auf..."). @@ -819,4 +833,22 @@ { this.setAttribute("endtoendid",id); } + + /** + * @see de.willuhn.jameica.hbci.rmi.Umsatz#getMandateId() + */ + @Override + public String getMandateId() throws RemoteException + { + return (String) this.getAttribute("mandateid"); + } + + /** + * @see de.willuhn.jameica.hbci.rmi.Umsatz#setMandateId(java.lang.String) + */ + @Override + public void setMandateId(String id) throws RemoteException + { + this.setAttribute("mandateid",id); + } } diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/UmsatzTypBean.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/UmsatzTypBean.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/UmsatzTypBean.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/UmsatzTypBean.java 2019-11-02 14:14:17.000000000 +0000 @@ -120,6 +120,19 @@ { return StringUtils.repeat(" ",this.getLevel()) + this.typ.getName(); } + + /** + * Liefert den Namen der Kategorie mit dem Namen der uebergeordneten Kategorie. + * @return der Name der Kategorie mit dem Namen der uebergeordneten Kategorie. + * @throws RemoteException + */ + public String getPathName() throws RemoteException + { + if (this.parent == null) + return this.typ.getName(); + + return this.parent.getPathName() + "/" + this.typ.getName(); + } /** * @see de.willuhn.datasource.GenericObject#equals(de.willuhn.datasource.GenericObject) diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/UmsatzTypImpl.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/UmsatzTypImpl.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/UmsatzTypImpl.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/UmsatzTypImpl.java 2019-11-02 14:14:17.000000000 +0000 @@ -275,6 +275,7 @@ String art = StringUtils.trimToEmpty(umsatz.getArt()); String purp = StringUtils.trimToEmpty(umsatz.getPurposeCode()); String e2eid = StringUtils.trimToEmpty(umsatz.getEndToEndId()); + String mid = StringUtils.trimToEmpty(umsatz.getMandateId()); if (!isRegex()) { @@ -285,6 +286,7 @@ art = art.toLowerCase(); purp = purp.toLowerCase(); e2eid = e2eid.toLowerCase(); + mid = mid.toLowerCase(); if (ignorewhitespace) { @@ -304,7 +306,8 @@ kom.indexOf(test) != -1 || art.indexOf(test) != -1 || purp.indexOf(test) != -1 || - e2eid.indexOf(test) != -1) + e2eid.indexOf(test) != -1 || + mid.indexOf(test) != -1) { return true; } @@ -330,16 +333,18 @@ Matcher mArt = pattern.matcher(art); Matcher mPurp = pattern.matcher(purp); Matcher mE2eid = pattern.matcher(e2eid); - Matcher mAll = pattern.matcher(name + " " + kto + " " + zweck + " " + kom + " " + art + " " + purp + " " + e2eid); + Matcher mMid = pattern.matcher(mid); + Matcher mAll = pattern.matcher(name + " " + kto + " " + zweck + " " + kom + " " + art + " " + purp + " " + e2eid + mid); - return (mZweck.matches() || - mName.matches() || - mKto.matches() || - mKom.matches() || - mArt.matches() || - mPurp.matches() || + return (mAll.matches() || + mZweck.matches() || + mName.matches() || + mKto.matches() || + mKom.matches() || + mArt.matches() || + mPurp.matches() || mE2eid.matches() || - mAll.matches() + mMid.matches() ); } catch (Exception e) diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/UmsatzUtil.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/UmsatzUtil.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/UmsatzUtil.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/UmsatzUtil.java 2019-11-02 14:14:17.000000000 +0000 @@ -126,8 +126,10 @@ "LOWER(purposecode) LIKE ? OR " + "LOWER(kommentar) LIKE ? OR " + "LOWER(endtoendid) LIKE ? OR " + + "LOWER(mandateid) LIKE ? OR " + + "LOWER(empfaenger_name2) LIKE ? OR " + "LOWER(art) LIKE ?)", - text,text,text,text,text,text,text,text,text,text,text); + text,text,text,text,text,text,text,text,text,text,text,text,text); } return list; } diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/hbci/AbstractHBCIJob.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/hbci/AbstractHBCIJob.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/hbci/AbstractHBCIJob.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/hbci/AbstractHBCIJob.java 2019-11-02 14:14:17.000000000 +0000 @@ -13,6 +13,7 @@ import java.rmi.RemoteException; import java.util.AbstractMap; import java.util.AbstractMap.SimpleEntry; +import java.util.Arrays; import java.util.Date; import java.util.Hashtable; import java.util.Iterator; @@ -26,6 +27,7 @@ import org.kapott.hbci.structures.Value; import de.willuhn.jameica.hbci.HBCI; +import de.willuhn.jameica.hbci.MetaKey; import de.willuhn.jameica.hbci.rmi.HibiscusDBObject; import de.willuhn.jameica.hbci.rmi.Transfer; import de.willuhn.jameica.hbci.server.VerwendungszweckUtil; @@ -52,9 +54,12 @@ private final static String NL = System.getProperty("line.separator","\n"); + // Das sind Warnungen, die im Wesentlichen nur dafuer stehen, dass beim Datenabruf keine neuen Daten bei der Bank vorhanden waren + private final static List IGNORE_WARNINGS = Arrays.asList("3010","3040","3072","3076","3290","3300","3920"); + private org.kapott.hbci.GV.HBCIJob job = null; private boolean exclusive = false; - private Hashtable params = new Hashtable(); + private Hashtable params = new Hashtable(); /** * HBCI4Java verwendet intern eindeutige Job-Namen. @@ -198,7 +203,7 @@ */ protected final HBCIJobResult getJobResult() { - return job.getJobResult(); + return job != null ? job.getJobResult() : null; } /** @@ -209,8 +214,16 @@ */ public final void handleResult() throws ApplicationException, RemoteException { - HBCIJobResult result = getJobResult(); - HBCIStatus status = result.getJobStatus(); + HBCIJobResult result = getJobResult(); + if (result == null) + { + Logger.info("mark job unsupported/failed"); + final String msg = i18n.tr("Auftragsart nicht unterstützt"); + this.markFailed(msg); + throw new ApplicationException(msg); + } + + HBCIStatus status = result.getJobStatus(); // BUGZILLA 964 - nur dann als abgebrochen markieren, wenn wir fuer den Job noch keinen richtigen // Status haben. Denn wenn der vorliegt, ist es fuer den Abbruch - zumindest fuer diesen Auftrag - zu spaet. @@ -227,8 +240,10 @@ boolean executed = false; boolean isOK = status.isOK(); HBCIRetVal[] values = status.getSuccess(); - boolean haveJobStatus = values != null && values.length > 0; - if (haveJobStatus) + HBCIRetVal[] errors = status.getErrors(); + boolean successStatus = values != null && values.length > 0; + boolean errorStatus = errors != null && errors.length > 0; + if (successStatus) { for (HBCIRetVal val:values) { @@ -239,42 +254,49 @@ } } } - else + else if (!errorStatus) // Die Warnings nur auswerten, wenn wir nicht explizit Fehler gekriegt haben { // Sonderfall: Wenn keine Umsaetze vorliegen, senden manche Banken nicht "0020 - Es sind keine Umsätze vorhanden." sondern // "3010 - Für Konto liegen keine Daten vor.". Siehe https://homebanking-hilfe.de/forum/topic.php?t=22461&page=fst_unread // Oder "3010 - Umsatzabfrage: Keine Einträge vorhanden." + // 3290 senden manche Banken beim Abruf der Dauerauftraege, wenn keine vorhanden waren + // Update: 2019-04-05: Mit "3300" ist der naechste Code aufgetaucht. Ich pruefe daher jetzt nur noch, ob es eine Warnung ist (also mit 3 beginnt) + // Update: 2019-04-15: Manche Banken senden auch mehrere Warnings. Wir tolerieren das auch HBCIRetVal[] warnings = status.getWarnings(); - if (warnings != null && warnings.length == 1 && warnings[0].code != null && warnings[0].text != null) + if (warnings != null && warnings.length > 0) { - Logger.info("institute did not sent 0xxx success code - only " + warnings[0].toString()); - if (warnings[0].code.equals("3010")) + boolean b = true; + for (HBCIRetVal v:warnings) + { + b &= v.code.startsWith("3"); + } + if (b) // Bank hat nur mit einer Warnung geantwortet { + Logger.info("institute did not sent 0xxx success code but only warnings"); executed = true; - haveJobStatus = true; + successStatus = true; isOK = true; } } } - Logger.info("execution state: tan needed: " + tanNeeded + ", executed: " + executed + ", have job status: " + haveJobStatus); - + HibiscusDBObject ctx = this.getContext(); + boolean tanCancel = ctx != null && MetaKey.TAN_CANCEL.get(ctx) != null; + + Logger.info("execution state: tan needed: " + tanNeeded + ", tan-cancel: " + tanCancel + ", executed: " + executed + ", success status: " + successStatus + ", error status: " + errorStatus); BeanService service = Application.getBootLoader().getBootable(BeanService.class); SynchronizeSession session = service.get(HBCISynchronizeBackend.class).getCurrentSession(); + ProgressMonitor monitor = session.getProgressMonitor(); - //////////////////////////////////////////////////////////////////////////// - // Warnungen ausgeben, falls vorhanden - BUGZILLA 899 - HBCIRetVal[] warnings = status.getWarnings(); - if (warnings != null && warnings.length > 0) - { - // Loggen - ProgressMonitor monitor = session.getProgressMonitor(); - monitor.log(" "); - for (HBCIRetVal val:warnings) - monitor.log(" " + val.code + ": " + val.text); - monitor.log(" "); + this.logMessages(status.getWarnings(),session.getWarnings(), monitor); + // this.logMessages(status.getErrors(),session.getErrors(), monitor); Geschieht bereits in HBCICallbackSWT, weil es Fehlermeldung gibt, die keinen GV-Bezug haben + + if (tanCancel) + { + Logger.warn("hbci job cancelled within tan dialog by user, mark job as cancelled [status code: " + status.getStatusCode() + ", session status: " + session.getStatus() + "]"); + markCancelled(); + return; } - //////////////////////////////////////////////////////////////////////////// final String errorText = this.getErrorText(); @@ -310,7 +332,7 @@ // Globaler Status ist OK - Job wurde zweifelsfrei erfolgreich ausgefuehrt // Wir markieren die Ueberweisung als "ausgefuehrt" - if (result.isOK() && haveJobStatus) + if (result.isOK() && successStatus) { Logger.info("mark job executed [result: OK]"); markExecutedInternal(errorText); @@ -318,7 +340,7 @@ } // Globaler Status ist nicht OK. Mal schauen, was der Job-Status sagt - if (isOK && haveJobStatus) + if (isOK && successStatus) { // Wir haben zwar global einen Fehler. Aber zumindest der Auftrag // scheint in Ordnung zu sein. Wir markieren ihn sicherheitshalber @@ -347,6 +369,31 @@ } /** + * Loggt die Meldungen. + * @param messages die Meldungen. + * @param target das Ziel, wo die Meldungen hingeschrieben werden sollen. + * @param monitor der ProgressMonitor. + */ + private void logMessages(HBCIRetVal[] messages, List target, ProgressMonitor monitor) + { + if (messages == null || messages.length == 0) + return; + + monitor.log(" "); + for (HBCIRetVal val:messages) + { + monitor.log(" " + val.code + ": " + val.text); + + // Zur Liste der zum Schluss anzuzeigenden Meldungen fuegen wir nur Meldungen hinzu, die auch + // wirklich relevant sind. Bei den Warnungen sind z.B. jene nicht relevant, die nur mitteilen, + // das keine neuen Buchungen vorhanden sind. Die wuerden User nur unnoetig irritieren + if (!IGNORE_WARNINGS.contains(val.code)) + target.add(val.code + ": " + val.text); + } + monitor.log(" "); + } + + /** * Markiert den Auftrag als ausgefuehrt und uebernimmt das Fehlerhandling. * @param errorText der anzuzeigende Fehlertext. * @throws ApplicationException diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/hbci/HBCIUmsatzJob.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/hbci/HBCIUmsatzJob.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/server/hbci/HBCIUmsatzJob.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/server/hbci/HBCIUmsatzJob.java 2019-11-02 14:14:17.000000000 +0000 @@ -511,7 +511,7 @@ */ protected String markFailed(String error) throws RemoteException, ApplicationException { - String msg = i18n.tr("Fehler beim Abrufen der Umsätze: {0}",error); + String msg = i18n.tr("Umsatzabruf fehlgeschlagen: {0}",error); konto.addToProtokoll(msg,Protokoll.TYP_ERROR); return msg; } diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/synchronize/AbstractSynchronizeBackend.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/synchronize/AbstractSynchronizeBackend.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/synchronize/AbstractSynchronizeBackend.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/synchronize/AbstractSynchronizeBackend.java 2019-11-02 14:14:17.000000000 +0000 @@ -461,6 +461,9 @@ } finally { + this.log(session.getWarnings(),i18n.tr("Zusammengefasste Warnungen")); + this.log(session.getErrors(),i18n.tr("Zusammengefasste Fehlermeldungen")); + Logger.info("stopping synchronization"); worker = null; session = null; @@ -470,6 +473,26 @@ } /** + * Loggt die Nachrichten zum Schluss. + * @param messages die Nachrichten. + * @param title der Titel. + */ + private void log(List messages, String title) + { + if (messages == null || messages.size() == 0) + return; + + this.monitor.log(""); + this.monitor.log("*****************************************************"); + this.monitor.log(title + ":"); + for (String m:messages) + { + this.monitor.log(" " + m); + } + this.monitor.log("*****************************************************"); + } + + /** * Aktualisiert den Status des Progress-Monitors und versendet ihn via Messaging. * @param status der neue Status. * @param text der Status-Text. diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/synchronize/SynchronizeSession.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/synchronize/SynchronizeSession.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/synchronize/SynchronizeSession.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/synchronize/SynchronizeSession.java 2019-11-02 14:14:17.000000000 +0000 @@ -10,8 +10,10 @@ package de.willuhn.jameica.hbci.synchronize; +import java.util.ArrayList; +import java.util.List; + import de.willuhn.jameica.hbci.rmi.Konto; -import de.willuhn.jameica.hbci.synchronize.SynchronizeSession; import de.willuhn.jameica.hbci.synchronize.AbstractSynchronizeBackend.JobGroup; import de.willuhn.jameica.hbci.synchronize.AbstractSynchronizeBackend.Worker; import de.willuhn.util.ProgressMonitor; @@ -23,6 +25,9 @@ { private Worker worker = null; private int status = ProgressMonitor.STATUS_NONE; + private double progressWindow = 100d; + private List warnings = new ArrayList(); + private List errors = new ArrayList(); /** * ct. @@ -53,6 +58,24 @@ } /** + * Liefert die Anzahl der Prozentpunkte, innerhalb derer die aktuelle Job-Gruppe den Fortschritt erhoehen darf. + * @return die Anzahl der Prozentpunkte. + */ + public double getProgressWindow() + { + return progressWindow; + } + + /** + * Speichert die Anzahl der Prozentpunkte, innerhalb derer die aktuelle Job-Gruppe den Fortschritt erhoehen darf. + * @param progressWindow die Anzahl der Prozentpunkte. + */ + public void setProgressWindow(double progressWindow) + { + this.progressWindow = progressWindow; + } + + /** * Liefert den aktuellen Status der Synchronisierung. * @return der aktuelle Status der Synchronisierung. * @see ProgressMonitor#STATUS_NONE @@ -82,6 +105,22 @@ { this.worker.interrupt(); } + + /** + * Liefert die Liste der Warnungen. + * @return warnings die Liste der Warnungen. + */ + public List getWarnings() + { + return warnings; + } + + /** + * Liefert die Liste der Fehlermeldungen. + * @return errors die Liste der Fehlermeldungen. + */ + public List getErrors() + { + return errors; + } } - - diff -Nru hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/synchronize/hbci/HBCISynchronizeBackend.java hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/synchronize/hbci/HBCISynchronizeBackend.java --- hibiscus-2.8.10+dfsg/src/de/willuhn/jameica/hbci/synchronize/hbci/HBCISynchronizeBackend.java 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/de/willuhn/jameica/hbci/synchronize/hbci/HBCISynchronizeBackend.java 2019-11-02 14:14:17.000000000 +0000 @@ -15,7 +15,6 @@ import java.rmi.RemoteException; import java.util.ArrayList; import java.util.Date; -import java.util.Enumeration; import java.util.Iterator; import java.util.List; import java.util.Properties; @@ -42,7 +41,6 @@ import de.willuhn.jameica.hbci.synchronize.SynchronizeEngine; import de.willuhn.jameica.hbci.synchronize.SynchronizeSession; import de.willuhn.jameica.hbci.synchronize.jobs.SynchronizeJob; -import de.willuhn.jameica.messaging.QueryMessage; import de.willuhn.jameica.system.Application; import de.willuhn.jameica.system.OperationCanceledException; import de.willuhn.logging.Level; @@ -253,12 +251,13 @@ Application.getMessagingFactory().getMessagingQueue(HBCI_TRACE).sendMessage(new HBCITraceMessage(HBCITraceMessage.Type.INFO,"\n\n" + i18n.tr("{0} Synchronisiere Konto: {1}",HBCI.LONGDATEFORMAT.format(new Date()),this.getKonto().getLongName()))); // Wir ermitteln anhand der Gesamt-Anzahl von Jobs, wieviel Fortschritt - // pro Job gemacht wird, addieren das fuer unsere Gruppe, ziehen noch + // pro Jobgroup gemacht wird, addieren das fuer unsere Gruppe, ziehen noch // einen Teil fuer Passport-Initialisierung ab (3%) sowie 3% fuer die Job-Auswertung // und geben den Rest den Jobs in unserer Gruppe. Wir rechnen am Anfang erstmal mit Double, // um die Rundungsdifferenzen etwas kleiner zu halten - double chunk = 100d / ((double) HBCISynchronizeBackend.this.worker.getSynchronization().size()) * ((double)this.jobs.size()); - int step = (int) ((chunk - 6) / this.jobs.size()); + double chunk = 100d / ((double) HBCISynchronizeBackend.this.worker.getSynchronization().size()) * ((double)this.jobs.size()); + double window = chunk - 6d; + getCurrentSession().setProgressWindow(window); //////////////////////////////////////////////////////////////////// boolean ok = true; @@ -274,7 +273,6 @@ Passport passport = new TaskPassportInit().execute(); this.handle = new TaskHandleInit(passport).execute(); this.handler = new TaskHandleOpen(handle).execute(); - new TaskSepaInfo(handler).execute(); Logger.info("processing jobs"); @@ -283,13 +281,12 @@ { this.checkInterrupted(); AbstractHBCIJob[] list = ((HBCISynchronizeJob)job).createHBCIJobs(); - monitor.setStatusText(i18n.tr("Aktiviere HBCI-Job: \"{0}\"",job.getName())); + monitor.setStatusText(i18n.tr("Führe Geschäftsvorfall aus: \"{0}\"",job.getName())); for (AbstractHBCIJob hbciJob:list) { this.checkInterrupted(); hbciJobs.add(hbciJob); } - monitor.addPercentComplete(step); } ok = this.executeJobs(monitor,hbciJobs,ok); @@ -322,7 +319,7 @@ // interessieren beim Abbruch aber nicht. // Der Abbruch-Check kommt unten drunter if (!ok && !interrupted) - throw new ApplicationException(i18n.tr("Fehler beim Auswerten eines HBCI-Auftrages")); + throw new ApplicationException(i18n.tr("Es sind Fehler aufgetreten")); // // ////////////////////////////////////////////////////////////////////// @@ -349,6 +346,8 @@ { try { + monitor.setStatusText(i18n.tr("Führe Aufträge aus...")); + for (AbstractHBCIJob hbciJob:hbciJobs) { this.checkInterrupted(); @@ -369,9 +368,8 @@ //////////////////////////////////////////////////////////////////////// // Jobs ausfuehren Logger.info("executing jobs"); - monitor.setStatusText(i18n.tr("Führe HBCI-Jobs aus")); this.handler.execute(); - monitor.setStatusText(i18n.tr("HBCI-Jobs ausgeführt")); + monitor.setStatusText(i18n.tr("Aufträge ausgeführt")); // //////////////////////////////////////////////////////////////////////// } @@ -388,7 +386,6 @@ try { name = hbciJob.getName(); - monitor.setStatusText(i18n.tr("Werte Ergebnis von HBCI-Job \"{0}\" aus",name)); Logger.info("executing check for job " + hbciJob.getIdentifier()); hbciJob.handleResult(); @@ -493,7 +490,7 @@ if (passport == null) throw new ApplicationException(i18n.tr("Kein HBCI-Sicherheitsmedium für das Konto gefunden")); - monitor.setStatusText(i18n.tr("Initialisiere HBCI-Sicherheitsmedium")); + monitor.setStatusText(i18n.tr("Initialisiere Bank-Zugang")); passport.init(konto); monitor.addPercentComplete(1); @@ -534,7 +531,6 @@ ProgressMonitor monitor = HBCISynchronizeBackend.this.worker.getMonitor(); //////////////////////////////////////////////////////////////////// - monitor.setStatusText(i18n.tr("Erzeuge HBCI-Handle")); PassportHandle handle = this.passport.getHandle(); if (handle == null) @@ -575,7 +571,6 @@ try { - monitor.setStatusText(i18n.tr("Öffne HBCI-Verbindung")); HBCIHandler handler = this.handle.open(); if (handler == null) @@ -591,59 +586,6 @@ } } - /** - * Task fuer das Ermitteln der SEPA-Infos. - */ - private class TaskSepaInfo extends AbstractTaskWrapper - { - private HBCIHandler handler = null; - - /** - * ct. - * @param handler - */ - private TaskSepaInfo(HBCIHandler handler) - { - this.handler = handler; - } - - /** - * @see de.willuhn.jameica.hbci.synchronize.hbci.HBCISynchronizeBackend.HBCIJobGroup.AbstractTaskWrapper#internalExecute() - */ - public Void internalExecute() throws Throwable - { - if (this.handler.getSupportedLowlevelJobs().getProperty("SEPAInfo") == null) - { - Logger.info("Fetching of SEPA infos not supported"); - return null; - } - - checkInterrupted(); - - try - { - Properties p = this.handler.getLowlevelJobRestrictions("SEPAInfo"); - Enumeration keys = p.keys(); - Logger.debug("sepa infos:"); - while (keys.hasMoreElements()) - { - String s = (String) keys.nextElement(); - Logger.debug(" " + s + ", value: " + p.getProperty(s)); - } - p.put("konto.id",getKonto().getID()); // Damit klar ist, zu welchem Konto das gehoert - - // Wir verschicken das per Messaging - dann koennen wir das an anderer Stelle verarbeiten, falls benoetigt - Application.getMessagingFactory().getMessagingQueue("hibiscus.sepainfo").sendMessage(new QueryMessage(p)); - } - catch (Exception e) - { - // Nur Loggen, nicht weiterwerfen - Logger.error("unable to fetch SEPA info",e); - } - return null; - } - } - /** * Wrappt einen Task als Runnable, damit es je nach Laufzeit-Umgebung direkt oder im GUI-Thread ausgefuehrt werden kann. diff -Nru hibiscus-2.8.10+dfsg/src/help/de_de/de.willuhn.jameica.hbci.passports.ddv.Detail.txt hibiscus-2.8.21+dfsg/src/help/de_de/de.willuhn.jameica.hbci.passports.ddv.Detail.txt --- hibiscus-2.8.10+dfsg/src/help/de_de/de.willuhn.jameica.hbci.passports.ddv.Detail.txt 1970-01-01 00:00:00.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/help/de_de/de.willuhn.jameica.hbci.passports.ddv.Detail.txt 2019-11-02 14:14:17.000000000 +0000 @@ -0,0 +1,16 @@ +
+

+ Details der Kartenleser-Konfiguration +

+ +

+ Tipp: Wenn der Kartenleser nicht automatisch gefunden wurde, dann legen Sie die Konfiguration manuell an und + wählen Sie als Kartenleser "PC/SC-Kartenleser (Kobil, ReinerSCT und andere)". +

+ +

+ Die Angabe eines Alias-Namens hilft Ihnen, mehrere Kartenleser-Konfigurationen + besser unterscheiden zu können. Geben Sie hier z.Bsp. die Modellbezeichnung des Kartenlesers oder den Namen der Bank ein. +

+ +
\ No newline at end of file diff -Nru hibiscus-2.8.10+dfsg/src/help/de_de/de.willuhn.jameica.hbci.passports.pintan.Detail.txt hibiscus-2.8.21+dfsg/src/help/de_de/de.willuhn.jameica.hbci.passports.pintan.Detail.txt --- hibiscus-2.8.10+dfsg/src/help/de_de/de.willuhn.jameica.hbci.passports.pintan.Detail.txt 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/help/de_de/de.willuhn.jameica.hbci.passports.pintan.Detail.txt 2019-11-02 14:14:17.000000000 +0000 @@ -4,13 +4,6 @@

- Im Feld "Alias-Name" können Sie einen optionalen - Bezeichnung für diese PIN/TAN-Konfiguration eingeben. Sie - dient der eindeutigen Identifizierung, falls Sie für eine Bank - mehrere Konfigurationen angelegt haben. -

- -

Bitte verwenden Sie als URL nicht die Adresse, welche Sie sonst auch für das Internet-Banking im Browser benutzen. PIN/TAN via Internetbrowser und PIN/TAN via HBCI sind zwei @@ -19,28 +12,27 @@

- Tipp: Als Filter für die Übertragung wird fast immer Base64 verwendet. - Als HBCI-Version kommt meist "HBCI+" zum Einsatz. - Sollte die Verbindung zu Ihrer Bank nicht funktionieren, - liegt dies meist an falschen Einstellungen bei diesen beiden - Werten. + Hinweis: Als Filter für die Übertragung wird fast immer Base64 verwendet. + Als HBCI-Version kommt meist "FinTS 3.0" zum Einsatz.

- Falls Sie bei einer Bank mehrere Konten mit verschiedenen - PIN/TAN-Konfigurationen besitzen, dann können Sie die gewünschten - Konten fest zuordnen, für die diese Konfiguration gelten soll. + Tipp: Falls Sie bei einer Bank mehrere Konten mit verschiedenen + Bank-Zugängen besitzen, dann können Sie die gewünschten Konten fest zuordnen, + für die dieser Bankzugang gelten soll. Auf diese Weise müssen Sie beim Ausführen von Geschäftsvorfällen - nicht manuell die zu verwendende PIN/TAN-Konfiguraiton - wählen. + den zu verwendenden Bankzugang nicht manuell wählen. +

+ +

+ Die Angabe eines Alias-Namens hilft Ihnen, mehrere Bank-Zugänge + besser unterscheiden zu können. Geben Sie hier z.Bsp. den Namen der Bank ein.

Über den Button TAN-Verfahren zurücksetzen können Sie eine gespeicherte Vorauswahl des zu verwendenden TAN-Verfahrens - rückgängig machen. Dies kann sinnvoll sein, wenn Sie zum Beispiel für ein - Konto die Variante Einschritt-Verfahren ausgewählt und gespeichert haben, - diese Auswahl nun aber wieder anzeigen wollen. + rückgängig machen. Dies kann sinnvoll sein, wenn die Bank Ihr TAN-Verfahren umgestellt hat.

\ No newline at end of file diff -Nru hibiscus-2.8.10+dfsg/src/help/de_de/de.willuhn.jameica.hbci.passports.rdh.Detail.txt hibiscus-2.8.21+dfsg/src/help/de_de/de.willuhn.jameica.hbci.passports.rdh.Detail.txt --- hibiscus-2.8.10+dfsg/src/help/de_de/de.willuhn.jameica.hbci.passports.rdh.Detail.txt 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/help/de_de/de.willuhn.jameica.hbci.passports.rdh.Detail.txt 2019-11-02 14:14:17.000000000 +0000 @@ -14,15 +14,11 @@

- Falls Sie bei einer Bank mehrere Konten mit verschiedenen - Schlüsseldateien besitzen oder Ihre Bank für den HBCI-Zugang eine - abweichende BLZ verwendet, dann können Sie in der Tabelle - "Fest zugeordnete Konten" manuell einzelne Konten auswählen, - für die diese Schlüsseldatei gelten soll. Auf diese Weise müssen Sie - beim Ausführen von Geschäftsvorfällen nicht manuell die zu verwendende Datei - wählen. Andernfalls können Sie die Auswahl freilassen. Sie werden dann - bei der Ausführung eines HBCI-Auftrages zur Auswahl der zu verwendenden - Schlüsseldatei aufgefordert, falls mehrere existieren. + Tipp: Falls Sie bei einer Bank mehrere Konten mit verschiedenen + Bank-Zugängen besitzen, dann können Sie die gewünschten Konten fest zuordnen, + für die dieser Bankzugang gelten soll. + Auf diese Weise müssen Sie beim Ausführen von Geschäftsvorfällen + den zu verwendenden Bankzugang nicht manuell wählen.

\ No newline at end of file diff -Nru hibiscus-2.8.10+dfsg/src/lang/hibiscus_messages_en.properties hibiscus-2.8.21+dfsg/src/lang/hibiscus_messages_en.properties --- hibiscus-2.8.10+dfsg/src/lang/hibiscus_messages_en.properties 2019-01-30 07:57:49.000000000 +0000 +++ hibiscus-2.8.21+dfsg/src/lang/hibiscus_messages_en.properties 2019-11-02 14:14:17.000000000 +0000 @@ -1018,3 +1018,5 @@ Kein\ Konto\ angegeben=No\ account\ specified Bitte\ w\u00E4hlen\ Sie\ ein\ Konto\ aus=Please\ select\ an\ account N\u00E4chster\ Abruf=Next\ call +Auch\ nur\ teilweise\ im\ Zeitraum\ liegende\ Kontoausz\u00E4ge\ anzeigen=Also\ show\ bank\ statements\ that\ only\ partly\ match\ date\ range + diff -Nru hibiscus-2.8.10+dfsg/updates/update0066.java hibiscus-2.8.21+dfsg/updates/update0066.java --- hibiscus-2.8.10+dfsg/updates/update0066.java 1970-01-01 00:00:00.000000000 +0000 +++ hibiscus-2.8.21+dfsg/updates/update0066.java 2019-11-02 14:14:17.000000000 +0000 @@ -0,0 +1,51 @@ +/********************************************************************** + * + * Copyright (c) by Olaf Willuhn + * All rights reserved + * + **********************************************************************/ + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import de.willuhn.jameica.hbci.rmi.DBSupport; +import de.willuhn.jameica.hbci.server.AbstractUpdate; +import de.willuhn.jameica.hbci.server.DBSupportH2Impl; +import de.willuhn.jameica.hbci.server.DBSupportMySqlImpl; +import de.willuhn.jameica.hbci.server.DBSupportPostgreSQLImpl; + + +/** + * Fuegt die Spalten "mandateid" und "empfaenger_name2" zur Umsatz-Tabelle hinzu + */ +public class update0066 extends AbstractUpdate +{ + private Map,List> statements = new HashMap() + {{ + // Update fuer H2 + put(DBSupportH2Impl.class,Arrays.asList( + "ALTER TABLE umsatz ADD (mandateid varchar(100), empfaenger_name2 varchar(255));" + )); + + // Update fuer MySQL + put(DBSupportMySqlImpl.class,Arrays.asList( + "ALTER TABLE umsatz ADD mandateid varchar(100), ADD empfaenger_name2 varchar(255);" + )); + + // Update fuer Postgres + put(DBSupportPostgreSQLImpl.class,Arrays.asList( + "ALTER TABLE umsatz ADD mandateid varchar(100), ADD empfaenger_name2 varchar(255);" + )); + }}; + + /** + * @see de.willuhn.jameica.hbci.server.AbstractUpdate#getStatements(java.lang.Class) + */ + @Override + protected List getStatements(Class driverClass) + { + return statements.get(driverClass); + } +}