Commit edf86cf5 by Tuukka Kivilahti

littlebit barcode refactoring, more to come

1 parent 0708a0e5
...@@ -10,3 +10,283 @@ org.eclipse.jdt.core.compiler.problem.assertIdentifier=error ...@@ -10,3 +10,283 @@ org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7 org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
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
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
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_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
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_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
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_resources_in_try=80
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=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
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
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_package=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
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
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_type_declarations=1
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
org.eclipse.jdt.core.formatter.comment.format_header=false
org.eclipse.jdt.core.formatter.comment.format_html=true
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
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.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=80
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
org.eclipse.jdt.core.formatter.compact_else_if=true
org.eclipse.jdt.core.formatter.continuation_indentation=2
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_empty_lines=false
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
org.eclipse.jdt.core.formatter.indentation.size=4
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
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_and_in_type_parameter=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_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
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
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_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_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
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
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_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_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=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_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
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
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_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_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
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
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_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_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
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
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=false
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_imple_if_on_one_line=false
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
org.eclipse.jdt.core.formatter.lineSplit=9999
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_at_beginning_of_method_body=0
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.jdt.core.formatter.tabulation.char=tab
org.eclipse.jdt.core.formatter.tabulation.size=4
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_binary_operator=true
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
...@@ -40,6 +40,9 @@ public class BootstrapBean implements BootstrapBeanLocal { ...@@ -40,6 +40,9 @@ public class BootstrapBean implements BootstrapBeanLocal {
dbUpdates.add(new String[] { "ALTER TABLE reader_events ADD COLUMN event_users_id integer REFERENCES event_users(id) DEFAULT null;"}); dbUpdates.add(new String[] { "ALTER TABLE reader_events ADD COLUMN event_users_id integer REFERENCES event_users(id) DEFAULT null;"});
dbUpdates.add(new String[] { "ALTER TABLE reader_events ADD COLUMN places_id integer REFERENCES places(id) DEFAULT null;"}); dbUpdates.add(new String[] { "ALTER TABLE reader_events ADD COLUMN places_id integer REFERENCES places(id) DEFAULT null;"});
dbUpdates.add(new String[] { "ALTER TABLE reader_events ADD COLUMN products_id integer REFERENCES products(id) DEFAULT null;"}); dbUpdates.add(new String[] { "ALTER TABLE reader_events ADD COLUMN products_id integer REFERENCES products(id) DEFAULT null;"});
dbUpdates.add(new String[] { "ALTER TABLE reader_events ADD COLUMN type text NOT NULL;"});
dbUpdates.add(new String[] { "ALTER TABLE reader_events DROP COLUMN gamepoint;"});
} }
@EJB @EJB
......
...@@ -19,9 +19,12 @@ import fi.codecrew.moya.facade.ReaderFacade; ...@@ -19,9 +19,12 @@ import fi.codecrew.moya.facade.ReaderFacade;
import fi.codecrew.moya.model.AccountEvent; import fi.codecrew.moya.model.AccountEvent;
import fi.codecrew.moya.model.CardTemplate; import fi.codecrew.moya.model.CardTemplate;
import fi.codecrew.moya.model.EventUser; import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.Place;
import fi.codecrew.moya.model.PrintedCard; import fi.codecrew.moya.model.PrintedCard;
import fi.codecrew.moya.model.Product;
import fi.codecrew.moya.model.Reader; import fi.codecrew.moya.model.Reader;
import fi.codecrew.moya.model.ReaderEvent; import fi.codecrew.moya.model.ReaderEvent;
import fi.codecrew.moya.model.ReaderEventType;
import fi.codecrew.moya.model.ReaderType; import fi.codecrew.moya.model.ReaderType;
import fi.codecrew.moya.model.User; import fi.codecrew.moya.model.User;
...@@ -47,143 +50,104 @@ public class ReaderBean implements ReaderBeanLocal { ...@@ -47,143 +50,104 @@ public class ReaderBean implements ReaderBeanLocal {
private CardTemplateBean cardTemplateBean; private CardTemplateBean cardTemplateBean;
@EJB @EJB
private ProductPBean productPBean; private ProductPBean productPBean;
@EJB
private BarcodeBeanLocal barcodeBean;
private static final Logger logger = LoggerFactory.getLogger(ReaderBean.class); private static final Logger logger = LoggerFactory.getLogger(ReaderBean.class);
@Override @Override
public ReaderEvent checkTag(String readerIdent, String tag) { public ReaderEvent checkCode(String readerIdent, String code) {
Reader reader = readerfacade.findOrCreateByIdent(readerIdent); Reader reader = readerfacade.findOrCreateByIdent(readerIdent);
tag = tag.replace("\"\b", ""); code = code.replace("\"\b", "");
if (reader.getType() == ReaderType.RFID) { if (reader.getType() == ReaderType.RFID) {
if (Pattern.matches("^.*000000$", tag)) if (Pattern.matches("^.*000000$", code))
{ {
tag = tag.replace("000000", ""); code = code.replace("000000", "");
} }
StringBuilder sb = new StringBuilder(tag); StringBuilder sb = new StringBuilder(code);
while (sb.length() < 16) while (sb.length() < 16)
{ {
sb.insert(0, "0"); sb.insert(0, "0");
} }
tag = sb.toString(); code = sb.toString();
} }
PrintedCard card = cardfacade.findByRfid(tag);
ReaderEvent event = new ReaderEvent(new Date(), reader, code);
logger.info("reader {}, card {}", reader, card);
// RfidEvent revent = reventcontainer.foundTag(reader, tag); // first, check if dublicate, there is 30s timeout for dublicates, afther that it's ok to create dublicate
// that's bcause accident dublicates are bad, but otherwise it's probably bcause user want's to read it again
List<ReaderEvent> lastevents = readerEventFacade.findLastEvents(reader, 1); List<ReaderEvent> lastevents = readerEventFacade.findLastEvents(reader, 1);
ReaderEvent ret = null;
if (!lastevents.isEmpty() && !reader.isAutoproduct()) if (!lastevents.isEmpty() && !reader.isAutoproduct())
{ {
ReaderEvent lastevent = lastevents.get(0); ReaderEvent lastevent = lastevents.get(0);
if (card == null)
{ if(lastevent.getValue() == event.getValue() && (lastevent.getUpdatetime().getTime() + 60000l) > event.getTime().getTime()) {
if (lastevent.getPrintedCard() == null && tag.equals(lastevent.getValue())) return lastevent; // todo: update lastevent bfore return
{
ret = lastevent;
}
} else if (card.equals(lastevent.getPrintedCard())) {
ret = lastevent;
} }
} }
if (ret == null)
{
ret = createReaderEvent(reader, card); // find stuff with barcode and set type
logger.debug("Got reader autoproduct {} with count {}", reader.getAutomaticProduct(), reader.getAutomaticProductCount()); // IF we find 2 stuff with same barcode, it's just bad luck and things may be little random.
logger.debug("ret {}, card, {} autoproduct {}", new Object[] { ret, card, reader.isAutoproduct() }); EventUser user = barcodeBean.getUser(code);
if (ret != null && card != null && reader.isAutoproduct()) {
EventUser eu = userbean.getEventUser(card.getUser().getUser()); if(user != null) {
AccountEvent createAc = productPBean.createAccountEvent(reader.getAutomaticProduct(), reader.getAutomaticProductCount(), eu, Calendar.getInstance()); event.setType(ReaderEventType.USER);
readerfacade.flush(); event.setUser(user);
logger.info("Creating new accountevent from autoproduct {}", createAc); }
ret.setNotes("Created automatic account event from reader. " + createAc);
PrintedCard card = barcodeBean.getPrintedCard(code);
if(card != null) {
event.setType(ReaderEventType.CARD);
event.setPrintedCard(card);
if(card.getUser() != null) {
event.setUser(card.getUser());
} }
} else {
ret.setUpdatetime(new Date());
} }
if (card == null)
{ Product product = barcodeBean.getProduct(code);
ret.setValue(tag);
if(product != null) {
event.setType(ReaderEventType.PRODUCT);
event.setProduct(product);
} }
return ret;
Place place = barcodeBean.getPlaceFromBarcode(code);
}
if(place != null) {
// event.setType(ReaderEventType.PLACE);
// @Override event.setPlace(place);
// public ReaderEvent assocTagToPlacecode(String tag, String readerIdent,
// String placecode) throws BortalCatchableException,
// PermissionDeniedException {
//
// GroupMembership gm = gmfacade.findByToken(placecode);
// if (gm == null) {
// throw new BortalCatchableException("Token" + placecode + " not found!",
// "readerbean.tokenNotFound");
// }
// if (gm.getUser() == null) {
// throw new BortalCatchableException("Token " + placecode +
// "found but not assoc to user!",
// "readerbean.userNotAssociateToMembership");
// }
//
// PrintedCard card = cardtemplatebean.setRfidUid(tag, gm.getUser());
//
// Reader reader = readerfacade.findOrCreateByIdent(readerIdent);
//
// return createReaderEvent(reader, card);
//
// }
private ReaderEvent createReaderEvent(Reader reader, PrintedCard card) {
ReaderEvent ret = new ReaderEvent(Calendar.getInstance(), card, reader);
Integer gamepoints = reader.getGamepoints();
if (gamepoints > 0 && card != null) {
int awardedCount = 0;
for (ReaderEvent oldRe : reader.getEvents()) {
if (oldRe.getGamePoint() > 0)
{
++awardedCount;
// User has been already awarded points from this reader.
// Not awarding again...
if (oldRe.getPrintedCard().equals(card)) {
gamepoints = 0;
break;
}
}
}
// if points can be awarded only limited times...
if (reader.getMaxEvents() > 0 && reader.getMaxEvents() > awardedCount) {
gamepoints = 0;
}
} }
event.setUpdatetime(new Date());
// reader is in autoproduct-mode, create dat product
if (reader.isAutoproduct()) {
EventUser eu = userbean.getEventUser(card.getUser().getUser());
AccountEvent createAc = productPBean.createAccountEvent(reader.getAutomaticProduct(), reader.getAutomaticProductCount(), eu, Calendar.getInstance());
readerfacade.flush();
logger.info("Creating new accountevent from autoproduct {}", createAc);
event.setNotes("Created automatic account event from reader. " + createAc);
ret.setGamePoint(gamepoints);
reader.getEvents().add(ret);
if (card != null)
{
card.getReaderEvents().add(ret);
} }
return ret; return event;
} }
@Override @Override
public ReaderEvent assocTagToCard(String tag, String readerIdent, PrintedCard card) { public ReaderEvent assocTagToCard(String tag, String readerIdent, PrintedCard card) {
......
...@@ -39,6 +39,6 @@ public interface ReaderBeanLocal { ...@@ -39,6 +39,6 @@ public interface ReaderBeanLocal {
List<ReaderEvent> getLastReaderEvents(); List<ReaderEvent> getLastReaderEvents();
ReaderEvent checkTag(String readerIdent, String tag); ReaderEvent checkCode(String readerIdent, String code);
} }
...@@ -23,14 +23,6 @@ import org.eclipse.persistence.annotations.OptimisticLockingType; ...@@ -23,14 +23,6 @@ import org.eclipse.persistence.annotations.OptimisticLockingType;
@OptimisticLocking(type = OptimisticLockingType.CHANGED_COLUMNS) @OptimisticLocking(type = OptimisticLockingType.CHANGED_COLUMNS)
public class ReaderEvent extends GenericEntity { public class ReaderEvent extends GenericEntity {
public enum Type {
USER,
PLACE,
CARD,
PRODUCT,
UNKNOWN
}
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Column(name = "event_time", nullable = false) @Column(name = "event_time", nullable = false)
...@@ -48,9 +40,6 @@ public class ReaderEvent extends GenericEntity { ...@@ -48,9 +40,6 @@ public class ReaderEvent extends GenericEntity {
@Column(name = "notes") @Column(name = "notes")
private String notes; private String notes;
@Column(nullable = false)
private Integer gamePoint = 0;
@JoinColumn(name = "printed_cards_id", referencedColumnName = "id", nullable = true, updatable = false) @JoinColumn(name = "printed_cards_id", referencedColumnName = "id", nullable = true, updatable = false)
@ManyToOne(optional = false) @ManyToOne(optional = false)
private PrintedCard printedCard; private PrintedCard printedCard;
...@@ -71,7 +60,41 @@ public class ReaderEvent extends GenericEntity { ...@@ -71,7 +60,41 @@ public class ReaderEvent extends GenericEntity {
@ManyToOne(optional = false) @ManyToOne(optional = false)
private Product product; private Product product;
private Type type; private ReaderEventType type;
public ReaderEvent(Date eventTime, Reader reader, String value) {
this(eventTime, reader, value, null, null, null, null, ReaderEventType.UNKNOWN);
}
public ReaderEvent(Date eventTime, Reader reader, String value, ReaderEventType type) {
this(eventTime, reader, value, null, null, null, null, type);
}
public ReaderEvent(Date eventTime, Reader reader, String value, PrintedCard card, EventUser user, Place place, Product product, ReaderEventType type) {
this.time = eventTime;
this.reader = reader;
this.value = value;
this.user = user;
this.printedCard = card;
this.user = user;
this.place = place;
this.product = product;
if (type == null)
type = ReaderEventType.UNKNOWN;
this.type = type;
}
public ReaderEvent() {
super();
}
public EventUser getUser() { public EventUser getUser() {
return user; return user;
...@@ -97,48 +120,14 @@ public class ReaderEvent extends GenericEntity { ...@@ -97,48 +120,14 @@ public class ReaderEvent extends GenericEntity {
this.product = product; this.product = product;
} }
public Type getType() { public ReaderEventType getType() {
return type; return type;
} }
public void setType(Type type) { public void setType(ReaderEventType type) {
this.type = type; this.type = type;
} }
public ReaderEvent(Calendar eventTime, Reader reader, String value) {
this(eventTime, reader, value, null, null, null, null, Type.UNKNOWN);
}
public ReaderEvent(Calendar eventTime, Reader reader, String value, Type type) {
this(eventTime, reader, value, null, null, null, null, type);
}
public ReaderEvent(Calendar eventTime, Reader reader, String value, PrintedCard card, EventUser user, Place place, Product product, Type type) {
this.time = eventTime.getTime();
this.reader = reader;
this.value = value;
this.user = user;
this.printedCard = card;
this.user = user;
this.place = place;
this.product = product;
if (type == null)
type = Type.UNKNOWN;
this.type = type;
}
public ReaderEvent() {
super();
}
public String getNotes() { public String getNotes() {
return notes; return notes;
} }
...@@ -179,14 +168,6 @@ public class ReaderEvent extends GenericEntity { ...@@ -179,14 +168,6 @@ public class ReaderEvent extends GenericEntity {
this.reader = readersId; this.reader = readersId;
} }
public void setGamePoint(Integer gamePoint) {
this.gamePoint = gamePoint;
}
public Integer getGamePoint() {
return gamePoint;
}
public Date getUpdatetime() { public Date getUpdatetime() {
if (updatetime == null) if (updatetime == null)
return time; return time;
......
package fi.codecrew.moya.model;
public enum ReaderEventType {
USER,
PLACE,
CARD,
PRODUCT,
UNKNOWN
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!