dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #04734
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1585: Simplified internal process feedback
------------------------------------------------------------
revno: 1585
committer: Lars Helge Oeverland <larshelge@xxxxxxxxx>
branch nick: trunk
timestamp: Mon 2010-03-08 17:53:05 +0100
message:
Simplified internal process feedback
modified:
dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/DataMartInternalProcess.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportInternalProcess.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportPreviewInternalProcess.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessInternalProcess.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableInternalProcess.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/process/AbstractStatementInternalProcess.java
dhis-2/dhis-web/dhis-web-datamart/src/main/resources/org/hisp/dhis/datamart/i18n_module.properties
dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties
dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.
=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/DataMartInternalProcess.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/DataMartInternalProcess.java 2010-03-08 14:50:40 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/DataMartInternalProcess.java 2010-03-08 16:53:05 +0000
@@ -122,22 +122,4 @@
{
dataMartEngine.export( dataElementIds, indicatorIds, periodIds, organisationUnitIds, getState() );
}
-
- @Override
- protected String getStartMessage()
- {
- return "export_process_started";
- }
-
- @Override
- protected String getSuccessMessage()
- {
- return "export_process_done";
- }
-
- @Override
- protected String getErrorMessage()
- {
- return "export_process_failed";
- }
}
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportInternalProcess.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportInternalProcess.java 2010-03-08 14:50:40 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportInternalProcess.java 2010-03-08 16:53:05 +0000
@@ -88,22 +88,4 @@
{
importService.importData( params, inputStream, getState() );
}
-
- @Override
- protected String getStartMessage()
- {
- return "import_process_started";
- }
-
- @Override
- protected String getSuccessMessage()
- {
- return "import_process_done";
- }
-
- @Override
- protected String getErrorMessage()
- {
- return "import_process_failed";
- }
}
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportPreviewInternalProcess.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportPreviewInternalProcess.java 2010-03-08 14:50:40 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportPreviewInternalProcess.java 2010-03-08 16:53:05 +0000
@@ -68,22 +68,4 @@
{
importObjectService.importAll();
}
-
- @Override
- protected String getStartMessage()
- {
- return "preview_process_started";
- }
-
- @Override
- protected String getSuccessMessage()
- {
- return "preview_process_done";
- }
-
- @Override
- public String getErrorMessage()
- {
- return "import_process_failed";
- }
}
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessInternalProcess.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessInternalProcess.java 2010-03-08 14:50:40 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessInternalProcess.java 2010-03-08 16:53:05 +0000
@@ -104,22 +104,4 @@
{
completenessService.exportDataSetCompleteness( dataSetIds, periodIds, organisationUnitIds, reportTableId );
}
-
- @Override
- protected String getStartMessage()
- {
- return "data_completeness_process_started";
- }
-
- @Override
- protected String getSuccessMessage()
- {
- return "data_completeness_process_done";
- }
-
- @Override
- public String getErrorMessage()
- {
- return "data_completeness_process_failed";
- }
}
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableInternalProcess.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableInternalProcess.java 2010-03-08 14:50:40 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableInternalProcess.java 2010-03-08 16:53:05 +0000
@@ -118,22 +118,4 @@
{
reportTableService.createReportTables( id, mode, reportingPeriod, parentOrganisationUnitId, organisationUnitId, format );
}
-
- @Override
- protected String getStartMessage()
- {
- return "report_table_process_started";
- }
-
- @Override
- protected String getSuccessMessage()
- {
- return "report_table_process_done";
- }
-
- @Override
- public String getErrorMessage()
- {
- return "report_table_process_failed";
- }
}
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/process/AbstractStatementInternalProcess.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/process/AbstractStatementInternalProcess.java 2010-03-08 14:50:40 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/process/AbstractStatementInternalProcess.java 2010-03-08 16:53:05 +0000
@@ -40,6 +40,10 @@
public abstract class AbstractStatementInternalProcess
implements Process<OutputHolderState>
{
+ public static final String PROCESS_STARTED = "process_started";
+ public static final String PROCESS_COMPLETED = "process_completed";
+ public static final String PROCESS_FAILED = "process_failed";
+
private static final Log log = LogFactory.getLog( AbstractStatementInternalProcess.class );
private OutputHolderState state;
@@ -79,7 +83,7 @@
statementManager.initialise();
- getState().setMessage( getStartMessage() );
+ getState().setMessage( PROCESS_STARTED );
log.info( "Internal process started" );
@@ -87,13 +91,13 @@
{
executeStatements();
- getState().setMessage( getSuccessMessage() );
+ getState().setMessage( PROCESS_COMPLETED );
log.info( "Internal process completed successfully" );
}
catch ( Exception ex )
{
- getState().setMessage( getErrorMessage() );
+ getState().setMessage( PROCESS_FAILED );
log.error( "Internal process failed", ex );
log.error( DebugUtils.getStackTrace( ex ) );
@@ -111,10 +115,4 @@
*/
protected abstract void executeStatements()
throws Exception;
-
- protected abstract String getStartMessage();
-
- protected abstract String getSuccessMessage();
-
- protected abstract String getErrorMessage();
}
=== modified file 'dhis-2/dhis-web/dhis-web-datamart/src/main/resources/org/hisp/dhis/datamart/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-datamart/src/main/resources/org/hisp/dhis/datamart/i18n_module.properties 2010-03-04 11:55:58 +0000
+++ dhis-2/dhis-web/dhis-web-datamart/src/main/resources/org/hisp/dhis/datamart/i18n_module.properties 2010-03-08 16:53:05 +0000
@@ -41,9 +41,9 @@
export_process_done= Export process done
completed= completed
cancel= Cancel
-export_process_started= Export process started
-export_process_cancelled= Export process cancelled
-export_process_finished= Export process finished
+process_completed= Export process completed
+process_started = Export process started
+process_failed = Export process failed - See log for details
no_export_process_running= No export process running
export_process_not_initialized= Export process not initalized
datamart_intro= Please select an item from the menu.
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties 2010-03-08 14:50:40 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties 2010-03-08 16:53:05 +0000
@@ -435,8 +435,9 @@
indicator_group_set = Indicator group set
routine_data_contains_values_out_of_range = Routine data values out of range (2^31) exist
semi_permanent_data_contains_values_out_of_range = Semi-permanent data value out of range (2^31) exist
-preview_process_started = Preview process started
-preview_process_done = Preview process done
+process_completed= Process completed
+process_started = Process started
+process_failed = Process failed - See log for details
configuration = Configuration
intro_DHIS14_xml_import = Do an import from an XML based format. DHIS 1.4 is the predecessor of DHIS 2.
intro_DHIS14_file_import = Do an import from an Access data file. DHIS 1.4 is the predecessor of DHIS 2.
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2010-03-08 14:50:40 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2010-03-08 16:53:05 +0000
@@ -174,6 +174,8 @@
generate= Generate
print= Print
process_completed= Process completed
+process_started = Process started
+process_failed = Process failed - See log for details
please_wait= Please wait
view= View
chart= Chart