svn commit: r14261 - trunk: . .settings acceptanceTests acceptanceTests/src/test/java/org/mifos/test/acceptance/collectionSheetEntry mifos/lib mifo...

0 views
Skip to first unread message

adam...@dev.java.net

unread,
Dec 24, 2008, 3:19:43 PM12/24/08
to com...@mifos.dev.java.net
Author: adamfeuer
Date: 2008-12-24 20:19:41+0000
New Revision: 14261

Added:
trunk/.settings/org.eclipse.jdt.ui.prefs
trunk/mifos/lib/cheetah-common-0.0.3-SNAPSHOT.jar (contents, props changed)
Removed:
trunk/mifos/src/main/java/org/mifos/framework/util/ClasspathResource.java
trunk/mifos/src/main/java/org/mifos/framework/util/helpers/ResourceLoader.java
trunk/mifos/src/test/java/org/mifos/framework/persistence/SqlResourceForTest.java
Modified:
trunk/.classpath
trunk/.settings/org.eclipse.jdt.core.prefs
trunk/acceptanceTests/pom.xml
trunk/acceptanceTests/src/test/java/org/mifos/test/acceptance/collectionSheetEntry/DbUnitResource.java
trunk/mifos/src/main/java/org/mifos/application/ppi/helpers/XmlPPISurveyParser.java
trunk/mifos/src/main/java/org/mifos/config/ChartOfAccountsConfig.java
trunk/mifos/src/main/java/org/mifos/framework/ApplicationInitializer.java
trunk/mifos/src/main/java/org/mifos/framework/components/audit/util/helpers/XMLParser.java
trunk/mifos/src/main/java/org/mifos/framework/components/batchjobs/MifosScheduler.java
trunk/mifos/src/main/java/org/mifos/framework/components/customTableTag/TableTag.java
trunk/mifos/src/main/java/org/mifos/framework/components/customTableTag/TableTagParser.java
trunk/mifos/src/main/java/org/mifos/framework/components/logger/MifosLogManager.java
trunk/mifos/src/main/java/org/mifos/framework/components/mifosmenu/MenuParser.java
trunk/mifos/src/main/java/org/mifos/framework/components/stateMachineFactory/StateXMLParser.java
trunk/mifos/src/main/java/org/mifos/framework/components/tabletag/TableTagParser.java
trunk/mifos/src/main/java/org/mifos/framework/components/tabletag/TypeParser.java
trunk/mifos/src/main/java/org/mifos/framework/hibernate/configuration/ConfigureSession.java
trunk/mifos/src/main/java/org/mifos/framework/persistence/DatabaseVersionPersistence.java
trunk/mifos/src/main/java/org/mifos/framework/persistence/SqlResource.java
trunk/mifos/src/main/java/org/mifos/framework/spring/SpringUtil.java
trunk/mifos/src/test/java/org/mifos/application/accounts/loan/business/LoanCalculationTest.java
trunk/mifos/src/test/java/org/mifos/application/productdefinition/struts/action/TestPrdCategoryAction.java
trunk/mifos/src/test/java/org/mifos/framework/components/customTableTag/TableTagParserTest.java
trunk/mifos/src/test/java/org/mifos/framework/persistence/DatabaseVersionPersistenceTest.java
trunk/mifos/src/test/java/org/mifos/framework/util/helpers/DatabaseSetup.java

Log:
changes to make project layout match Maven's suggested layout:

* moved application source code to src/main/java.
* moved test source code to src/test/java.
* updated some hard coded paths.
* removed some File objects in favor of classpath resource loaders.
* removed ResourceLoader as its name conflicted with a class in Dozer; moved its methods to ClasspathResource; updated references to reflect the new name.
* added cheetah-common.jar to lib/ as ClasspathResource now exists there.

also changed Eclipse project to use code formatting templates that are part of the project; updated the templates to give better formatting

Modified: trunk/.classpath
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/.classpath?view=diff&rev=14261&p1=trunk/.classpath&p2=trunk/.classpath&r1=14260&r2=14261
==============================================================================
--- trunk/.classpath (original)
+++ trunk/.classpath 2008-12-24 20:19:41+0000
@@ -90,5 +90,6 @@
<classpathentry kind="lib" path="mifos/lib/wstx-asl-2.9.3.jar"/>
<classpathentry kind="lib" path="mifos/lib/XmlSchema-1.0.2.jar"/>
<classpathentry kind="lib" path="mifos/lib/xmlunit-1.1.jar"/>
+ <classpathentry kind="lib" path="mifos/lib/cheetah-common-0.0.3-SNAPSHOT.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

Modified: trunk/.settings/org.eclipse.jdt.core.prefs
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/.settings/org.eclipse.jdt.core.prefs?view=diff&rev=14261&p1=trunk/.settings/org.eclipse.jdt.core.prefs&p2=trunk/.settings/org.eclipse.jdt.core.prefs&r1=14260&r2=14261
==============================================================================
--- trunk/.settings/org.eclipse.jdt.core.prefs (original)
+++ trunk/.settings/org.eclipse.jdt.core.prefs 2008-12-24 20:19:41+0000
@@ -1,5 +1,269 @@
-#Thu Nov 20 16:48:37 PST 2008
+#Tue Dec 23 20:37:39 PST 2008
eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.source=1.6
+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_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_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_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.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.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.format_guardian_clause_on_one_line=false
+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_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=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_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_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_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_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_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_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.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=120
+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=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true

Added: trunk/.settings/org.eclipse.jdt.ui.prefs
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/.settings/org.eclipse.jdt.ui.prefs?view=auto&rev=14261
==============================================================================
--- (empty file)
+++ trunk/.settings/org.eclipse.jdt.ui.prefs 2008-12-24 20:19:41+0000
@@ -0,0 +1,65 @@
+#Tue Dec 23 20:37:40 PST 2008
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=false
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=false
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_Mifos Gazelle
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Mifos
+formatter_settings_version=11
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.keywordthis=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>

Modified: trunk/acceptanceTests/pom.xml
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/acceptanceTests/pom.xml?view=diff&rev=14261&p1=trunk/acceptanceTests/pom.xml&p2=trunk/acceptanceTests/pom.xml&r1=14260&r2=14261
==============================================================================
--- trunk/acceptanceTests/pom.xml (original)
+++ trunk/acceptanceTests/pom.xml 2008-12-24 20:19:41+0000
@@ -216,10 +216,15 @@
<!-- for this module -->
<dependency>
<groupId>org.mifos</groupId>
- <artifactId>gazelle-webapp</artifactId>
+ <artifactId>cheetah-common</artifactId>
<version>0.0.3-SNAPSHOT</version>
- <type>war</type>
</dependency>
+ <dependency>
+ <groupId>org.mifos</groupId>
+ <artifactId>gazelle-webapp</artifactId>
+ <version>0.0.3-SNAPSHOT</version>
+ <type>war</type>
+ </dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>

Modified: trunk/acceptanceTests/src/test/java/org/mifos/test/acceptance/collectionSheetEntry/DbUnitResource.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/acceptanceTests/src/test/java/org/mifos/test/acceptance/collectionSheetEntry/DbUnitResource.java?view=diff&rev=14261&p1=trunk/acceptanceTests/src/test/java/org/mifos/test/acceptance/collectionSheetEntry/DbUnitResource.java&p2=trunk/acceptanceTests/src/test/java/org/mifos/test/acceptance/collectionSheetEntry/DbUnitResource.java&r1=14260&r2=14261
==============================================================================
--- trunk/acceptanceTests/src/test/java/org/mifos/test/acceptance/collectionSheetEntry/DbUnitResource.java (original)
+++ trunk/acceptanceTests/src/test/java/org/mifos/test/acceptance/collectionSheetEntry/DbUnitResource.java 2008-12-24 20:19:41+0000
@@ -1,27 +1,12 @@
package org.mifos.test.acceptance.collectionSheetEntry;

-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
+import org.mifos.core.ClasspathResource;

public class DbUnitResource {

- public static DbUnitResource getInstance() {
- return new DbUnitResource();
+ public static ClasspathResource getInstance() {
+ return ClasspathResource.getInstance("/org/mifos/test/acceptance/collectionSheetEntry/dbUnit");
}

- protected String path;

- public DbUnitResource() {
- this.path = "";
- }
-
- public URL getUrl(String name) {
- String resourcePath = this.path + name;
- return this.getClass().getResource(resourcePath);
- }
-
- public InputStream getAsStream(String name) throws IOException {
- return getUrl(name).openStream();
- }
}
\ No newline at end of file

Added: trunk/mifos/lib/cheetah-common-0.0.3-SNAPSHOT.jar
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/lib/cheetah-common-0.0.3-SNAPSHOT.jar?view=auto&rev=14261
==============================================================================
Binary file. No diff available.

Modified: trunk/mifos/src/main/java/org/mifos/application/ppi/helpers/XmlPPISurveyParser.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/main/java/org/mifos/application/ppi/helpers/XmlPPISurveyParser.java?view=diff&rev=14261&p1=trunk/mifos/src/main/java/org/mifos/application/ppi/helpers/XmlPPISurveyParser.java&p2=trunk/mifos/src/main/java/org/mifos/application/ppi/helpers/XmlPPISurveyParser.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/main/java/org/mifos/application/ppi/helpers/XmlPPISurveyParser.java (original)
+++ trunk/mifos/src/main/java/org/mifos/application/ppi/helpers/XmlPPISurveyParser.java 2008-12-24 20:19:41+0000
@@ -34,14 +34,13 @@
import org.mifos.application.ppi.business.PPIChoice;
import org.mifos.application.ppi.business.PPILikelihood;
import org.mifos.application.ppi.business.PPISurvey;
-import org.mifos.application.surveys.SurveysConstants;
import org.mifos.application.surveys.business.Question;
import org.mifos.application.surveys.business.QuestionChoice;
import org.mifos.application.surveys.business.SurveyQuestion;
import org.mifos.application.surveys.helpers.AnswerType;
import org.mifos.config.GeneralConfig;
+import org.mifos.core.ClasspathResource;
import org.mifos.framework.exceptions.ValidationException;
-import org.mifos.framework.util.helpers.ResourceLoader;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -53,7 +52,7 @@
/** TODO: Should be private */
public PPISurvey parseInto(String uri, PPISurvey survey)
throws URISyntaxException, IOException, ParserConfigurationException, SAXException {
- InputStream xml = ResourceLoader.getURI(uri).toURL().openStream();
+ InputStream xml = ClasspathResource.getURI(uri).toURL().openStream();
return parseInto(xml, survey);
}

Modified: trunk/mifos/src/main/java/org/mifos/config/ChartOfAccountsConfig.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/main/java/org/mifos/config/ChartOfAccountsConfig.java?view=diff&rev=14261&p1=trunk/mifos/src/main/java/org/mifos/config/ChartOfAccountsConfig.java&p2=trunk/mifos/src/main/java/org/mifos/config/ChartOfAccountsConfig.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/main/java/org/mifos/config/ChartOfAccountsConfig.java (original)
+++ trunk/mifos/src/main/java/org/mifos/config/ChartOfAccountsConfig.java 2008-12-24 20:19:41+0000
@@ -44,7 +44,7 @@
import org.mifos.application.accounts.financial.business.GLCategoryType;
import org.mifos.application.configuration.exceptions.ConfigurationException;
import org.mifos.framework.util.helpers.FilePaths;
-import org.mifos.framework.util.helpers.ResourceLoader;
+import org.mifos.core.ClasspathResource;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -87,16 +87,14 @@
try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder parser = dbf.newDocumentBuilder();
- document = parser.parse(new File(ResourceLoader
- .getURI(chartOfAccountsXml)));
+ document = parser.parse(new File(ClasspathResource.getURI(chartOfAccountsXml)));

// create a SchemaFactory capable of understanding XML schemas
SchemaFactory factory = SchemaFactory
.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);

// load an XML schema
- Source schemaFile = new StreamSource(new File(ResourceLoader
- .getURI(FilePaths.CHART_OF_ACCOUNTS_SCHEMA)));
+ Source schemaFile = new StreamSource(new File(ClasspathResource.getURI(FilePaths.CHART_OF_ACCOUNTS_SCHEMA)));
Schema schema = factory.newSchema(schemaFile);

// create a Validator instance and validate document
@@ -135,8 +133,7 @@
* location.
*/
public static String getCoaUri(Session session) {
- final boolean customCoaExists = (null != ResourceLoader
- .findResource(FilePaths.CHART_OF_ACCOUNTS_CUSTOM));
+ final boolean customCoaExists = (null != ClasspathResource.findResource(FilePaths.CHART_OF_ACCOUNTS_CUSTOM));

if (customCoaExists)
return FilePaths.CHART_OF_ACCOUNTS_CUSTOM;

Modified: trunk/mifos/src/main/java/org/mifos/framework/ApplicationInitializer.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/main/java/org/mifos/framework/ApplicationInitializer.java?view=diff&rev=14261&p1=trunk/mifos/src/main/java/org/mifos/framework/ApplicationInitializer.java&p2=trunk/mifos/src/main/java/org/mifos/framework/ApplicationInitializer.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/main/java/org/mifos/framework/ApplicationInitializer.java (original)
+++ trunk/mifos/src/main/java/org/mifos/framework/ApplicationInitializer.java 2008-12-24 20:19:41+0000
@@ -64,7 +64,7 @@
import org.mifos.framework.struts.tags.XmlBuilder;
import org.mifos.framework.util.helpers.FilePaths;
import org.mifos.framework.util.helpers.Money;
-import org.mifos.framework.util.helpers.ResourceLoader;
+import org.mifos.core.ClasspathResource;

/**
* This class should prepare all the sub-systems that are required by the app.
@@ -113,7 +113,7 @@
}
Properties hibernateCfg = new Properties();
try {
- URI uri = ResourceLoader.getURI(getHibernateProperties());
+ URI uri = ClasspathResource.getURI(getHibernateProperties());
if (null != uri)
hibernateCfg.load(new FileInputStream(new File(uri)));
}
@@ -330,7 +330,7 @@

public static boolean isHibernateConfigOverride() {
try {
- if (ResourceLoader.getURI(FilePaths.CONFIGURABLEMIFOSDBPROPERTIESFILE) != null) {
+ if (ClasspathResource.getURI(FilePaths.CONFIGURABLEMIFOSDBPROPERTIESFILE) != null) {
System.out.println("**** deploymifoDB.properties path: " + FilePaths.CONFIGURABLEMIFOSDBPROPERTIESFILE + " File not found!");
return true;
}

Modified: trunk/mifos/src/main/java/org/mifos/framework/components/audit/util/helpers/XMLParser.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/main/java/org/mifos/framework/components/audit/util/helpers/XMLParser.java?view=diff&rev=14261&p1=trunk/mifos/src/main/java/org/mifos/framework/components/audit/util/helpers/XMLParser.java&p2=trunk/mifos/src/main/java/org/mifos/framework/components/audit/util/helpers/XMLParser.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/main/java/org/mifos/framework/components/audit/util/helpers/XMLParser.java (original)
+++ trunk/mifos/src/main/java/org/mifos/framework/components/audit/util/helpers/XMLParser.java 2008-12-24 20:19:41+0000
@@ -11,7 +11,7 @@
import javax.xml.parsers.ParserConfigurationException;

import org.mifos.framework.exceptions.SystemException;
-import org.mifos.framework.util.helpers.ResourceLoader;
+import org.mifos.core.ClasspathResource;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
@@ -34,12 +34,7 @@
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
- document = builder
- .parse(ResourceLoader
- .getURI(
- "org/mifos/framework/util/resources/audit/ColumnMapping.xml")
- .toString());
-
+ document = builder.parse(ClasspathResource.getURI("org/mifos/framework/util/resources/audit/ColumnMapping.xml").toString());
getColumnPropertyMapping(document);
} catch (URISyntaxException e) {
throw new SystemException(e);

Modified: trunk/mifos/src/main/java/org/mifos/framework/components/batchjobs/MifosScheduler.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/main/java/org/mifos/framework/components/batchjobs/MifosScheduler.java?view=diff&rev=14261&p1=trunk/mifos/src/main/java/org/mifos/framework/components/batchjobs/MifosScheduler.java&p2=trunk/mifos/src/main/java/org/mifos/framework/components/batchjobs/MifosScheduler.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/main/java/org/mifos/framework/components/batchjobs/MifosScheduler.java (original)
+++ trunk/mifos/src/main/java/org/mifos/framework/components/batchjobs/MifosScheduler.java 2008-12-24 20:19:41+0000
@@ -47,7 +47,7 @@
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

-import org.mifos.framework.util.helpers.ResourceLoader;
+import org.mifos.core.ClasspathResource;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
@@ -80,7 +80,7 @@
MifosTask mifosTask;
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
- Document document = builder.parse(ResourceLoader.getURI(
+ Document document = builder.parse(ClasspathResource.getURI(
SchedulerConstants.PATH).toString());
NodeList rootSchedulerTasks = document
.getElementsByTagName(SchedulerConstants.SCHEDULER_TASKS);

Modified: trunk/mifos/src/main/java/org/mifos/framework/components/customTableTag/TableTag.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/main/java/org/mifos/framework/components/customTableTag/TableTag.java?view=diff&rev=14261&p1=trunk/mifos/src/main/java/org/mifos/framework/components/customTableTag/TableTag.java&p2=trunk/mifos/src/main/java/org/mifos/framework/components/customTableTag/TableTag.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/main/java/org/mifos/framework/components/customTableTag/TableTag.java (original)
+++ trunk/mifos/src/main/java/org/mifos/framework/components/customTableTag/TableTag.java 2008-12-24 20:19:41+0000
@@ -9,11 +9,11 @@
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;

+import org.mifos.core.ClasspathResource;
import org.mifos.framework.exceptions.PageExpiredException;
import org.mifos.framework.exceptions.TableTagParseException;
import org.mifos.framework.security.util.UserContext;
import org.mifos.framework.util.helpers.Constants;
-import org.mifos.framework.util.helpers.ResourceLoader;
import org.mifos.framework.util.helpers.SessionUtils;

public class TableTag extends BodyTagSupport {
@@ -94,13 +94,13 @@

if (rootName == null)
table = TableTagParser.getInstance().parser(
- ResourceLoader.getURI(
+ ClasspathResource.getURI(
"org/mifos/application/" + moduleName
+ "/util/resources/" + xmlFileName)
.toString());
else
table = TableTagParser.getInstance().parser(
- ResourceLoader.getURI(
+ ClasspathResource.getURI(
"org/mifos/" + rootName + "/" + moduleName
+ "/util/resources/" + xmlFileName)
.toString());

Modified: trunk/mifos/src/main/java/org/mifos/framework/components/customTableTag/TableTagParser.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/main/java/org/mifos/framework/components/customTableTag/TableTagParser.java?view=diff&rev=14261&p1=trunk/mifos/src/main/java/org/mifos/framework/components/customTableTag/TableTagParser.java&p2=trunk/mifos/src/main/java/org/mifos/framework/components/customTableTag/TableTagParser.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/main/java/org/mifos/framework/components/customTableTag/TableTagParser.java (original)
+++ trunk/mifos/src/main/java/org/mifos/framework/components/customTableTag/TableTagParser.java 2008-12-24 20:19:41+0000
@@ -12,9 +12,9 @@
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;

+import org.mifos.core.ClasspathResource;
import org.mifos.framework.exceptions.TableTagParseException;
import org.mifos.framework.util.helpers.FilePaths;
-import org.mifos.framework.util.helpers.ResourceLoader;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
@@ -39,7 +39,7 @@

SchemaFactory schfactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
schfactory.setErrorHandler(null);
- Schema schema = schfactory.newSchema(new StreamSource(new File(ResourceLoader.getURI(FilePaths.CUSTOMTABLETAGXSD))));
+ Schema schema = schfactory.newSchema(new StreamSource(new File(ClasspathResource.getURI(FilePaths.CUSTOMTABLETAGXSD))));
factory.setNamespaceAware(false);
factory.setValidating(false);
factory.setSchema(schema);

Modified: trunk/mifos/src/main/java/org/mifos/framework/components/logger/MifosLogManager.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/main/java/org/mifos/framework/components/logger/MifosLogManager.java?view=diff&rev=14261&p1=trunk/mifos/src/main/java/org/mifos/framework/components/logger/MifosLogManager.java&p2=trunk/mifos/src/main/java/org/mifos/framework/components/logger/MifosLogManager.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/main/java/org/mifos/framework/components/logger/MifosLogManager.java (original)
+++ trunk/mifos/src/main/java/org/mifos/framework/components/logger/MifosLogManager.java 2008-12-24 20:19:41+0000
@@ -33,9 +33,9 @@
import org.apache.log4j.Logger;
import org.apache.log4j.varia.NullAppender;
import org.mifos.config.Localization;
+import org.mifos.core.ClasspathResource;
import org.mifos.framework.exceptions.LoggerConfigurationException;
import org.mifos.framework.exceptions.ResourceBundleNotFoundException;
-import org.mifos.framework.util.helpers.ResourceLoader;

/**
* A class with static methods to obtain instances of the logger. It also keeps a HashMap of the actual logger instances per module
@@ -175,7 +175,7 @@
*/
public static void readConfiguration(String fileName)
throws MalformedURLException, URISyntaxException {
- File configFile = new File(ResourceLoader.getURI(fileName));
+ File configFile = new File(ClasspathResource.getURI(fileName));

MifosDOMConfigurator.configureAndWatch(
configFile.getAbsolutePath() , LoggerConstants.DELAY);

Modified: trunk/mifos/src/main/java/org/mifos/framework/components/mifosmenu/MenuParser.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/main/java/org/mifos/framework/components/mifosmenu/MenuParser.java?view=diff&rev=14261&p1=trunk/mifos/src/main/java/org/mifos/framework/components/mifosmenu/MenuParser.java&p2=trunk/mifos/src/main/java/org/mifos/framework/components/mifosmenu/MenuParser.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/main/java/org/mifos/framework/components/mifosmenu/MenuParser.java (original)
+++ trunk/mifos/src/main/java/org/mifos/framework/components/mifosmenu/MenuParser.java 2008-12-24 20:19:41+0000
@@ -52,10 +52,10 @@

import org.apache.commons.lang.StringUtils;
import org.mifos.config.ConfigurationManager;
+import org.mifos.core.ClasspathResource;
import org.mifos.framework.exceptions.MenuParseException;
import org.mifos.framework.exceptions.SystemException;
import org.mifos.framework.util.helpers.FilePaths;
-import org.mifos.framework.util.helpers.ResourceLoader;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -77,12 +77,12 @@
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
SchemaFactory schfactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
schfactory.setErrorHandler(null);
- Schema schema = schfactory.newSchema(new StreamSource(new File(ResourceLoader.getURI(FilePaths.MENUSCHEMA))));
+ Schema schema = schfactory.newSchema(new StreamSource(new File(ClasspathResource.getURI(FilePaths.MENUSCHEMA))));
factory.setNamespaceAware(false);
factory.setValidating(false);
factory.setSchema(schema);
DocumentBuilder builder = factory.newDocumentBuilder();
- Document document = builder.parse( new File(ResourceLoader.getURI(FilePaths.MENUPATH)) );
+ Document document = builder.parse( new File(ClasspathResource.getURI(FilePaths.MENUPATH)) );
NodeList tabNodeList=document.getElementsByTagName(MenuConstants.TOPMENUTAB);
Menu leftMenus[]=new Menu[tabNodeList.getLength()];
for(int i=0;i<tabNodeList.getLength();i++){

Modified: trunk/mifos/src/main/java/org/mifos/framework/components/stateMachineFactory/StateXMLParser.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/main/java/org/mifos/framework/components/stateMachineFactory/StateXMLParser.java?view=diff&rev=14261&p1=trunk/mifos/src/main/java/org/mifos/framework/components/stateMachineFactory/StateXMLParser.java&p2=trunk/mifos/src/main/java/org/mifos/framework/components/stateMachineFactory/StateXMLParser.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/main/java/org/mifos/framework/components/stateMachineFactory/StateXMLParser.java (original)
+++ trunk/mifos/src/main/java/org/mifos/framework/components/stateMachineFactory/StateXMLParser.java 2008-12-24 20:19:41+0000
@@ -51,7 +51,7 @@

import org.mifos.application.accounts.util.helpers.AccountState;
import org.mifos.application.master.business.StateEntity;
-import org.mifos.framework.util.helpers.ResourceLoader;
+import org.mifos.core.ClasspathResource;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -101,8 +101,7 @@

DocumentBuilder builder = factory.newDocumentBuilder();
builder.setErrorHandler(null);
- Document document = builder.parse(new File(ResourceLoader
- .getURI(filename)));
+ Document document = builder.parse(new File(ClasspathResource.getURI(filename)));
Node mapToprocess = null;
/*
* String configurationName = ""; if

Modified: trunk/mifos/src/main/java/org/mifos/framework/components/tabletag/TableTagParser.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/main/java/org/mifos/framework/components/tabletag/TableTagParser.java?view=diff&rev=14261&p1=trunk/mifos/src/main/java/org/mifos/framework/components/tabletag/TableTagParser.java&p2=trunk/mifos/src/main/java/org/mifos/framework/components/tabletag/TableTagParser.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/main/java/org/mifos/framework/components/tabletag/TableTagParser.java (original)
+++ trunk/mifos/src/main/java/org/mifos/framework/components/tabletag/TableTagParser.java 2008-12-24 20:19:41+0000
@@ -46,8 +46,8 @@
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;

+import org.mifos.core.ClasspathResource;
import org.mifos.framework.exceptions.TableTagParseException;
-import org.mifos.framework.util.helpers.ResourceLoader;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
@@ -88,8 +88,7 @@

DocumentBuilder builder = factory.newDocumentBuilder();
builder.setErrorHandler(null);
- Document document = builder.parse(new File(ResourceLoader
- .getURI(filename)));
+ Document document = builder.parse(new File(ClasspathResource.getURI(filename)));
/*
* NodeList tableNodeList =
* document.getElementsByTagName(TableTagConstants.TABLE); table =

Modified: trunk/mifos/src/main/java/org/mifos/framework/components/tabletag/TypeParser.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/main/java/org/mifos/framework/components/tabletag/TypeParser.java?view=diff&rev=14261&p1=trunk/mifos/src/main/java/org/mifos/framework/components/tabletag/TypeParser.java&p2=trunk/mifos/src/main/java/org/mifos/framework/components/tabletag/TypeParser.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/main/java/org/mifos/framework/components/tabletag/TypeParser.java (original)
+++ trunk/mifos/src/main/java/org/mifos/framework/components/tabletag/TypeParser.java 2008-12-24 20:19:41+0000
@@ -9,7 +9,7 @@
import javax.xml.parsers.ParserConfigurationException;

import org.mifos.framework.exceptions.TableTagTypeParserException;
-import org.mifos.framework.util.helpers.ResourceLoader;
+import org.mifos.core.ClasspathResource;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -49,8 +49,7 @@

DocumentBuilder builder = factory.newDocumentBuilder();
builder.setErrorHandler(null);
- Document document = builder.parse(new File(ResourceLoader
- .getURI(filename)));
+ Document document = builder.parse(new File(ClasspathResource.getURI(filename)));
Node fileNode = document.getFirstChild();
file=new Files();
file.setFileName(createFileName(fileNode));

Modified: trunk/mifos/src/main/java/org/mifos/framework/hibernate/configuration/ConfigureSession.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/main/java/org/mifos/framework/hibernate/configuration/ConfigureSession.java?view=diff&rev=14261&p1=trunk/mifos/src/main/java/org/mifos/framework/hibernate/configuration/ConfigureSession.java&p2=trunk/mifos/src/main/java/org/mifos/framework/hibernate/configuration/ConfigureSession.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/main/java/org/mifos/framework/hibernate/configuration/ConfigureSession.java (original)
+++ trunk/mifos/src/main/java/org/mifos/framework/hibernate/configuration/ConfigureSession.java 2008-12-24 20:19:41+0000
@@ -29,7 +29,7 @@
import org.mifos.framework.exceptions.HibernateStartUpException;
import org.mifos.framework.hibernate.helper.HibernateConstants;
import org.mifos.framework.util.helpers.FilePaths;
-import org.mifos.framework.util.helpers.ResourceLoader;
+import org.mifos.core.ClasspathResource;

/**
Create the hibernate configuration object from the
@@ -61,9 +61,7 @@
throws HibernateStartUpException {
config = new Configuration();
try {
- config.configure(
- ResourceLoader.getURI(FilePaths.HIBERNATECFGFILE).toURL()
- );
+ config.configure(ClasspathResource.getURI(FilePaths.HIBERNATECFGFILE).toURL());
} catch (Exception e) {
throw new HibernateStartUpException(
HibernateConstants.CFGFILENOTFOUND, e);
@@ -73,7 +71,7 @@
// TODO: factor this out instead of repeating it in ApplicationInitializer
Properties hibernateProperties = new Properties();

- URI uri = ResourceLoader.getURI(hibernatePropertiesPath);
+ URI uri = ClasspathResource.getURI(hibernatePropertiesPath);
File propertiesFile;
if (uri == null) {
// Look for it in the current directory.

Modified: trunk/mifos/src/main/java/org/mifos/framework/persistence/DatabaseVersionPersistence.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/main/java/org/mifos/framework/persistence/DatabaseVersionPersistence.java?view=diff&rev=14261&p1=trunk/mifos/src/main/java/org/mifos/framework/persistence/DatabaseVersionPersistence.java&p2=trunk/mifos/src/main/java/org/mifos/framework/persistence/DatabaseVersionPersistence.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/main/java/org/mifos/framework/persistence/DatabaseVersionPersistence.java (original)
+++ trunk/mifos/src/main/java/org/mifos/framework/persistence/DatabaseVersionPersistence.java 2008-12-24 20:19:41+0000
@@ -63,7 +63,6 @@
public static final int LATEST_CHECKPOINT_VERSION = 174;
private final Connection connection;
private final Map<Integer, Upgrade> registeredUpgrades;
- private SqlResource sqlResource;

public static void register(Map<Integer, Upgrade> register, Upgrade upgrade) {
int higherVersion = upgrade.higherVersion();
@@ -384,13 +383,8 @@

public DatabaseVersionPersistence() {
this(HibernateUtil.getOrCreateSessionHolder().getSession().connection());
- this.sqlResource = new SqlResource();
}

- public void setSqlResource(SqlResource sqlResource) {
- this.sqlResource = sqlResource;
- }
-
public DatabaseVersionPersistence(Connection connection) {
this(connection, masterRegister());
}
@@ -512,7 +506,7 @@
}

URL getSqlResourceLocation(String name) {
- return this.sqlResource.getInstance().getUrl(name);
+ return SqlResource.getInstance().getUrl(name);
}

public SqlUpgrade findUpgradeScript(int higherVersion, String scriptName) {

Modified: trunk/mifos/src/main/java/org/mifos/framework/persistence/SqlResource.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/main/java/org/mifos/framework/persistence/SqlResource.java?view=diff&rev=14261&p1=trunk/mifos/src/main/java/org/mifos/framework/persistence/SqlResource.java&p2=trunk/mifos/src/main/java/org/mifos/framework/persistence/SqlResource.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/main/java/org/mifos/framework/persistence/SqlResource.java (original)
+++ trunk/mifos/src/main/java/org/mifos/framework/persistence/SqlResource.java 2008-12-24 20:19:41+0000
@@ -1,15 +1,11 @@
package org.mifos.framework.persistence;

-import org.mifos.framework.util.ClasspathResource;
+import org.mifos.core.ClasspathResource;

-public class SqlResource extends ClasspathResource {
+public class SqlResource {

- public static SqlResource getInstance() {
- return new SqlResource();
+ public static ClasspathResource getInstance() {
+ return ClasspathResource.getInstance("/org/mifos/framework/persistence/sql/");
}

- public SqlResource() {
- this.path = "sql/";
- }
-
}

Modified: trunk/mifos/src/main/java/org/mifos/framework/spring/SpringUtil.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/main/java/org/mifos/framework/spring/SpringUtil.java?view=diff&rev=14261&p1=trunk/mifos/src/main/java/org/mifos/framework/spring/SpringUtil.java&p2=trunk/mifos/src/main/java/org/mifos/framework/spring/SpringUtil.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/main/java/org/mifos/framework/spring/SpringUtil.java (original)
+++ trunk/mifos/src/main/java/org/mifos/framework/spring/SpringUtil.java 2008-12-24 20:19:41+0000
@@ -25,7 +25,7 @@
import org.mifos.framework.components.logger.MifosLogManager;
import org.mifos.framework.components.logger.MifosLogger;
import org.mifos.framework.util.helpers.FilePaths;
-import org.mifos.framework.util.helpers.ResourceLoader;
+import org.mifos.core.ClasspathResource;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

@@ -65,8 +65,7 @@
// required config file. exception thrown if not found.
configFiles.add(FilePaths.SPRING_CONFIG_CORE);

- if (null != ResourceLoader
- .findResource(FilePaths.SPRING_CONFIG_CUSTOM_BEANS)) {
+ if (null != ClasspathResource.findResource(FilePaths.SPRING_CONFIG_CUSTOM_BEANS)) {
logger.info("using " + FilePaths.SPRING_CONFIG_CUSTOM_BEANS
+ " for custom bean configuration");
configFiles.add(FilePaths.SPRING_CONFIG_CUSTOM_BEANS);

Removed: trunk/mifos/src/main/java/org/mifos/framework/util/ClasspathResource.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/main/java/org/mifos/framework/util/ClasspathResource.java?view=auto&rev=14260

Removed: trunk/mifos/src/main/java/org/mifos/framework/util/helpers/ResourceLoader.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/main/java/org/mifos/framework/util/helpers/ResourceLoader.java?view=auto&rev=14260

Modified: trunk/mifos/src/test/java/org/mifos/application/accounts/loan/business/LoanCalculationTest.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/test/java/org/mifos/application/accounts/loan/business/LoanCalculationTest.java?view=diff&rev=14261&p1=trunk/mifos/src/test/java/org/mifos/application/accounts/loan/business/LoanCalculationTest.java&p2=trunk/mifos/src/test/java/org/mifos/application/accounts/loan/business/LoanCalculationTest.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/test/java/org/mifos/application/accounts/loan/business/LoanCalculationTest.java (original)
+++ trunk/mifos/src/test/java/org/mifos/application/accounts/loan/business/LoanCalculationTest.java 2008-12-24 20:19:41+0000
@@ -70,6 +70,7 @@
import org.mifos.application.productdefinition.util.helpers.PrdStatus;
import org.mifos.config.AccountingRules;
import org.mifos.config.ConfigurationManager;
+import org.mifos.core.ClasspathResource;
import org.mifos.framework.TestUtils;
import org.mifos.framework.exceptions.ApplicationException;
import org.mifos.framework.exceptions.PersistenceException;
@@ -79,7 +80,6 @@
import org.mifos.framework.persistence.TestObjectPersistence;
import org.mifos.framework.security.util.UserContext;
import org.mifos.framework.util.helpers.Money;
-import org.mifos.framework.util.helpers.ResourceLoader;
import org.mifos.framework.util.helpers.StringUtils;
import org.mifos.framework.util.helpers.TestCaseInitializer;
import org.mifos.framework.util.helpers.TestObjectFactory;
@@ -2185,7 +2185,7 @@

private LoanTestCaseData loadSpreadSheetData(String fileName) throws URISyntaxException
{
- File file = new File(ResourceLoader.getURI(fileName));
+ File file = new File(ClasspathResource.getURI(fileName));
FileInputStream fileInputStream = null;
InputStreamReader inputStreamReader = null;
BufferedReader bufferedReader = null;
@@ -2301,7 +2301,7 @@


private String[] getCSVFiles(String directoryPath) throws URISyntaxException {
- File dir = new File(ResourceLoader.getURI(directoryPath));
+ File dir = new File(ClasspathResource.getURI(directoryPath));

FilenameFilter filter = new FilenameFilter() {
public boolean accept(File dir, String name) {

Modified: trunk/mifos/src/test/java/org/mifos/application/productdefinition/struts/action/TestPrdCategoryAction.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/test/java/org/mifos/application/productdefinition/struts/action/TestPrdCategoryAction.java?view=diff&rev=14261&p1=trunk/mifos/src/test/java/org/mifos/application/productdefinition/struts/action/TestPrdCategoryAction.java&p2=trunk/mifos/src/test/java/org/mifos/application/productdefinition/struts/action/TestPrdCategoryAction.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/test/java/org/mifos/application/productdefinition/struts/action/TestPrdCategoryAction.java (original)
+++ trunk/mifos/src/test/java/org/mifos/application/productdefinition/struts/action/TestPrdCategoryAction.java 2008-12-24 20:19:41+0000
@@ -19,7 +19,6 @@
import org.mifos.framework.security.util.ActivityContext;
import org.mifos.framework.security.util.UserContext;
import org.mifos.framework.util.helpers.Constants;
-import org.mifos.framework.util.helpers.ResourceLoader;
import org.mifos.framework.util.helpers.SessionUtils;
import org.mifos.framework.util.helpers.TestObjectFactory;

Modified: trunk/mifos/src/test/java/org/mifos/framework/components/customTableTag/TableTagParserTest.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/test/java/org/mifos/framework/components/customTableTag/TableTagParserTest.java?view=diff&rev=14261&p1=trunk/mifos/src/test/java/org/mifos/framework/components/customTableTag/TableTagParserTest.java&p2=trunk/mifos/src/test/java/org/mifos/framework/components/customTableTag/TableTagParserTest.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/test/java/org/mifos/framework/components/customTableTag/TableTagParserTest.java (original)
+++ trunk/mifos/src/test/java/org/mifos/framework/components/customTableTag/TableTagParserTest.java 2008-12-24 20:19:41+0000
@@ -9,7 +9,7 @@
import static junitx.framework.StringAssert.assertContains;
import org.mifos.application.office.business.OfficeView;
import org.mifos.framework.exceptions.TableTagParseException;
-import org.mifos.framework.util.helpers.ResourceLoader;
+import org.mifos.core.ClasspathResource;

public class TableTagParserTest extends TestCase {

@@ -26,10 +26,7 @@
}
public void testParser() throws Exception {
Table table = TableTagParser.getInstance()
- .parser(ResourceLoader
- .getURI(
- "org/mifos/framework/util/resources/customTableTag/example.xml")
- .toString());
+ .parser(ClasspathResource.getURI("org/mifos/framework/util/resources/customTableTag/example.xml").toString());
assertNotNull(table);
HeaderDetails details = table.getHeaderDetails();
assertEquals("drawtablerowbold", details.getHeaderStyle());

Modified: trunk/mifos/src/test/java/org/mifos/framework/persistence/DatabaseVersionPersistenceTest.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/test/java/org/mifos/framework/persistence/DatabaseVersionPersistenceTest.java?view=diff&rev=14261&p1=trunk/mifos/src/test/java/org/mifos/framework/persistence/DatabaseVersionPersistenceTest.java&p2=trunk/mifos/src/test/java/org/mifos/framework/persistence/DatabaseVersionPersistenceTest.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/test/java/org/mifos/framework/persistence/DatabaseVersionPersistenceTest.java (original)
+++ trunk/mifos/src/test/java/org/mifos/framework/persistence/DatabaseVersionPersistenceTest.java 2008-12-24 20:19:41+0000
@@ -245,7 +245,6 @@
connection.setAutoCommit(false);
DatabaseVersionPersistence persistence =
new DatabaseVersionPersistence(connection);
- persistence.setSqlResource(new SqlResourceForTest());
persistence.upgradeDatabase(connection, 80);
connection.commit();

Removed: trunk/mifos/src/test/java/org/mifos/framework/persistence/SqlResourceForTest.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/test/java/org/mifos/framework/persistence/SqlResourceForTest.java?view=auto&rev=14260

Modified: trunk/mifos/src/test/java/org/mifos/framework/util/helpers/DatabaseSetup.java
Url: https://mifos.dev.java.net/source/browse/mifos/trunk/mifos/src/test/java/org/mifos/framework/util/helpers/DatabaseSetup.java?view=diff&rev=14261&p1=trunk/mifos/src/test/java/org/mifos/framework/util/helpers/DatabaseSetup.java&p2=trunk/mifos/src/test/java/org/mifos/framework/util/helpers/DatabaseSetup.java&r1=14260&r2=14261
==============================================================================
--- trunk/mifos/src/test/java/org/mifos/framework/util/helpers/DatabaseSetup.java (original)
+++ trunk/mifos/src/test/java/org/mifos/framework/util/helpers/DatabaseSetup.java 2008-12-24 20:19:41+0000
@@ -21,6 +21,7 @@

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
+import org.mifos.core.ClasspathResource;
import org.mifos.framework.components.logger.MifosLogManager;
import org.mifos.framework.exceptions.HibernateStartUpException;
import org.mifos.framework.hibernate.HibernateStartUp;
@@ -61,7 +62,7 @@
private static boolean resourceExists(String resourcePath) {
URI uri;
try {
- uri = ResourceLoader.getURI(resourcePath);
+ uri = ClasspathResource.getURI(resourcePath);
} catch (URISyntaxException e) {
return false;
}
@@ -91,13 +92,8 @@
configureLogging();

Configuration configuration = new Configuration();
- // This step is slow (about 1-2 s for me) because it
- // it reading and parsing a whole bunch of xml files.
- // That's why we try to share it between different tests.
try {
- configuration.configure(
- ResourceLoader.getURI(FilePaths.HIBERNATECFGFILE).toURL()
- );
+ configuration.configure(ClasspathResource.getURI(FilePaths.HIBERNATECFGFILE).toURL());
} catch (Exception e) {
throw new HibernateStartUpException(
HibernateConstants.CFGFILENOTFOUND, e);

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-u...@mifos.dev.java.net
For additional commands, e-mail: commit...@mifos.dev.java.net

Reply all
Reply to author
Forward
0 new messages