dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #01308
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 378: Added system setting for omitting indicators with zero numerator value to data mart.
------------------------------------------------------------
revno: 378
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Tue 2009-06-16 18:54:45 +0200
message:
Added system setting for omitting indicators with zero numerator value to data mart.
modified:
dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java
dhis-2/dhis-support/dhis-support-webwork/src/main/java/org/hisp/dhis/webwork/interceptor/WebWorkSystemSettingInterceptor.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSystemSettingsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm
=== modified file 'dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java'
--- dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java 2009-06-16 16:54:45 +0000
@@ -37,13 +37,14 @@
*/
public interface SystemSettingManager
{
- String ID = SystemSettingManager.class.getName();
+ final String ID = SystemSettingManager.class.getName();
- String KEY_ZERO_VALUE_SAVE_MODE = "zeroValueSaveMode";
- String KEY_APPLICATION_TITLE = "applicationTitle";
- String KEY_FLAG = "flag";
- String KEY_START_MODULE = "startModule";
- String KEY_FORUM_INTEGRATION = "forumIntegration";
+ final String KEY_ZERO_VALUE_SAVE_MODE = "zeroValueSaveMode";
+ final String KEY_APPLICATION_TITLE = "applicationTitle";
+ final String KEY_FLAG = "flag";
+ final String KEY_START_MODULE = "startModule";
+ final String KEY_FORUM_INTEGRATION = "forumIntegration";
+ final String KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART = "omitIndicatorsZeroNumeratorDataMart";
void saveSystemSetting( String name, Serializable value );
=== modified file 'dhis-2/dhis-support/dhis-support-webwork/src/main/java/org/hisp/dhis/webwork/interceptor/WebWorkSystemSettingInterceptor.java'
--- dhis-2/dhis-support/dhis-support-webwork/src/main/java/org/hisp/dhis/webwork/interceptor/WebWorkSystemSettingInterceptor.java 2009-05-26 11:17:27 +0000
+++ dhis-2/dhis-support/dhis-support-webwork/src/main/java/org/hisp/dhis/webwork/interceptor/WebWorkSystemSettingInterceptor.java 2009-06-16 16:54:45 +0000
@@ -30,7 +30,9 @@
import static org.hisp.dhis.options.SystemSettingManager.KEY_APPLICATION_TITLE;
import static org.hisp.dhis.options.SystemSettingManager.KEY_FLAG;
import static org.hisp.dhis.options.SystemSettingManager.KEY_FORUM_INTEGRATION;
+import static org.hisp.dhis.options.SystemSettingManager.KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART;
import static org.hisp.dhis.options.SystemSettingManager.KEY_START_MODULE;
+import static org.hisp.dhis.options.SystemSettingManager.KEY_ZERO_VALUE_SAVE_MODE;
import java.util.HashMap;
import java.util.Map;
@@ -63,15 +65,11 @@
// -------------------------------------------------------------------------
public void destroy()
- {
- // TODO Auto-generated method stub
-
+ {
}
public void init()
{
- // TODO Auto-generated method stub
-
}
public String intercept( ActionInvocation invocation )
@@ -79,15 +77,12 @@
{
Map<String, Object> map = new HashMap<String, Object>( 2 );
- String applicationTitle = (String) systemSettingManager.getSystemSetting( KEY_APPLICATION_TITLE );
- String flag = (String) systemSettingManager.getSystemSetting( KEY_FLAG );
- Boolean forumIntegration = (Boolean) systemSettingManager.getSystemSetting( KEY_FORUM_INTEGRATION );
- String startModule = (String) systemSettingManager.getSystemSetting( KEY_START_MODULE );
-
- map.put( KEY_APPLICATION_TITLE, applicationTitle );
- map.put( KEY_FLAG, flag );
- map.put( KEY_FORUM_INTEGRATION, forumIntegration );
- map.put( KEY_START_MODULE, startModule );
+ map.put( KEY_APPLICATION_TITLE, systemSettingManager.getSystemSetting( KEY_APPLICATION_TITLE ) );
+ map.put( KEY_FLAG, systemSettingManager.getSystemSetting( KEY_FLAG ) );
+ map.put( KEY_START_MODULE, systemSettingManager.getSystemSetting( KEY_START_MODULE ) );
+ map.put( KEY_ZERO_VALUE_SAVE_MODE, systemSettingManager.getSystemSetting( KEY_ZERO_VALUE_SAVE_MODE ) );
+ map.put( KEY_FORUM_INTEGRATION, systemSettingManager.getSystemSetting( KEY_FORUM_INTEGRATION ) );
+ map.put( KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART, systemSettingManager.getSystemSetting( KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART ) );
invocation.getStack().push( map );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSystemSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSystemSettingsAction.java 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSystemSettingsAction.java 2009-06-16 16:54:45 +0000
@@ -36,8 +36,6 @@
import com.opensymphony.xwork.Action;
-import static org.hisp.dhis.options.SystemSettingManager.*;
-
/**
* @author Lars Helge Overland
* @version $Id$
@@ -80,21 +78,7 @@
{
return modules;
}
-
- private String currentStartModule;
-
- public String getCurrentStartModule()
- {
- return currentStartModule;
- }
-
- private Boolean zeroValueSaveMode;
-
- public Boolean getZeroValueSaveMode()
- {
- return zeroValueSaveMode;
- }
-
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -105,10 +89,6 @@
modules = moduleManager.getMenuModules();
- currentStartModule = (String) systemSettingManager.getSystemSetting( KEY_START_MODULE );
-
- zeroValueSaveMode = (Boolean) systemSettingManager.getSystemSetting( KEY_ZERO_VALUE_SAVE_MODE, false );
-
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java 2009-03-14 09:02:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java 2009-06-16 16:54:45 +0000
@@ -27,12 +27,17 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import static org.hisp.dhis.options.SystemSettingManager.KEY_APPLICATION_TITLE;
+import static org.hisp.dhis.options.SystemSettingManager.KEY_FLAG;
+import static org.hisp.dhis.options.SystemSettingManager.KEY_FORUM_INTEGRATION;
+import static org.hisp.dhis.options.SystemSettingManager.KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART;
+import static org.hisp.dhis.options.SystemSettingManager.KEY_START_MODULE;
+import static org.hisp.dhis.options.SystemSettingManager.KEY_ZERO_VALUE_SAVE_MODE;
+
import org.hisp.dhis.options.SystemSettingManager;
import com.opensymphony.xwork.Action;
-import static org.hisp.dhis.options.SystemSettingManager.*;
-
/**
* @author Lars Helge Overland
* @version $Id$
@@ -90,6 +95,13 @@
this.forumIntegration = forumIntegration;
}
+ private Boolean omitIndicatorsZeroNumeratorDataMart;
+
+ public void setOmitIndicatorsZeroNumeratorDataMart( Boolean omitIndicatorsZeroNumeratorDataMart )
+ {
+ this.omitIndicatorsZeroNumeratorDataMart = omitIndicatorsZeroNumeratorDataMart;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -116,7 +128,8 @@
systemSettingManager.saveSystemSetting( KEY_START_MODULE, startModule );
systemSettingManager.saveSystemSetting( KEY_ZERO_VALUE_SAVE_MODE, zeroValueSaveMode );
systemSettingManager.saveSystemSetting( KEY_FORUM_INTEGRATION, forumIntegration );
+ systemSettingManager.saveSystemSetting( KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART, omitIndicatorsZeroNumeratorDataMart );
return SUCCESS;
- }
+ }
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2009-03-14 09:02:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2009-06-16 16:54:45 +0000
@@ -1,4 +1,5 @@
save_zero_values = Save zero values for sum aggregated dataelements
+omit_indicators_zero_numerator_data_mart = Omit indicator values with zero numerator value in data mart
alternativename = Alternative name
db_language = Database Language
display_property = Display Property
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm 2009-03-14 09:02:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm 2009-06-16 16:54:45 +0000
@@ -41,6 +41,12 @@
<input type="checkbox" id="forumIntegration" name="forumIntegration" value="true" #if( $forumIntegration )checked="checked"#end>
</p>
+<h4>$i18n.getString( "omit_indicators_zero_numerator_data_mart" )</h4>
+
+<p>
+<input type="checkbox" id="omitIndicatorsZeroNumeratorDataMart" name="omitIndicatorsZeroNumeratorDataMart" value="true" #if( $omitIndicatorsZeroNumeratorDataMart )checked="checked"#end>
+</p>
+
<p><input type="submit" value="$i18n.getString( "save" )" style="width:10em"></p>
</form>
--
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.