← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20732: Unused code

 

------------------------------------------------------------
revno: 20732
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-10-15 18:58:04 +0200
message:
  Unused code
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java


--
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-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java	2015-10-15 16:53:09 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java	2015-10-15 16:58:04 +0000
@@ -30,15 +30,10 @@
 
 import java.io.Serializable;
 import java.util.Collection;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import org.hisp.dhis.period.MonthlyPeriodType;
-import org.hisp.dhis.period.QuarterlyPeriodType;
-import org.hisp.dhis.period.YearlyPeriodType;
-
 /**
  * @author Stian Strandli
  */
@@ -46,17 +41,6 @@
 {
     String ID = SystemSettingManager.class.getName();
 
-    String SYSPROP_PORTAL = "runningAsPortal";
-
-    HashSet<String> DEFAULT_SCHEDULED_PERIOD_TYPES = new HashSet<String>()
-    {
-        {
-            add( MonthlyPeriodType.NAME );
-            add( QuarterlyPeriodType.NAME );
-            add( YearlyPeriodType.NAME );
-        }
-    };
-
     void saveSystemSetting( String name, Serializable value );
     
     void saveSystemSetting( Setting setting, Serializable value );

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java	2015-10-15 16:53:09 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java	2015-10-15 16:58:04 +0000
@@ -29,7 +29,6 @@
  */
 
 import static org.apache.commons.lang3.StringUtils.defaultIfEmpty;
-import static org.hisp.dhis.setting.SystemSettingManager.SYSPROP_PORTAL;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -52,6 +51,7 @@
     implements Interceptor
 {
     private static final String DATE_FORMAT = "dateFormat";
+    private static final String SYSPROP_PORTAL = "runningAsPortal";
 
     private static final Set<Setting> SETTINGS = Sets.newHashSet( Setting.APPLICATION_TITLE, Setting.APPLICATION_INTRO,
         Setting.APPLICATION_NOTIFICATION, Setting.APPLICATION_FOOTER, Setting.APPLICATION_RIGHT_FOOTER,
@@ -105,10 +105,9 @@
         map.put( DATE_FORMAT, calendarService.getSystemDateFormat() );
         map.put( Setting.CONFIGURATION.getName(), configurationService.getConfiguration() );
         map.put( Setting.FLAG_IMAGE.getName(), systemSettingManager.getFlagImage() );
-        map.put( SYSPROP_PORTAL, defaultIfEmpty( System.getProperty( SYSPROP_PORTAL ), String.valueOf( false ) ) );
-        
         map.put( Setting.CREDENTIALS_EXPIRES.getName(), systemSettingManager.credentialsExpires() );
         map.put( Setting.SELF_REGISTRATION_NO_RECAPTCHA.getName(), systemSettingManager.selfRegistrationNoRecaptcha() );
+        map.put( SYSPROP_PORTAL, defaultIfEmpty( System.getProperty( SYSPROP_PORTAL ), String.valueOf( false ) ) );
         
         map.putAll( systemSettingManager.getSystemSettings( SETTINGS ) );