← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21376: Renamed Setting to SettingKey

 

------------------------------------------------------------
revno: 21376
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-12-08 20:33:06 +0100
message:
  Renamed Setting to SettingKey
renamed:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/Setting.java => dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SettingKey.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserSettingService.java
  dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/scheduling/ResourceTableTask.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventQueryPlanner.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/security/DefaultAnalyticsSecurityManager.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/scheduling/AnalyticsTableTask.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/calendar/DefaultCalendarService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DataApprovalPermissionsEvaluator.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/email/DefaultEmailService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/EmailMessageSender.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/DefaultSecurityService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultStyleManager.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultTranslateSystemSettingManager.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/config/DefaultSmsConfigurationManager.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/system/DefaultSystemService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/scheduling/MonitoringTask.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataapproval/DataApprovalServiceCategoryOptionGroupTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/setting/SystemSettingManagerTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/user/UserServiceTest.java
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/synch/DefaultSynchronizationManager.java
  dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/scheduling/CaseAggregateConditionTask.java
  dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/scheduling/DefaultCaseAggregateConditionSchedulingManager.java
  dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/scheduling/DefaultProgramSchedulingManager.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/scheduling/DefaultSchedulingManager.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AppController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SynchronizationController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/ContextUtils.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/RedirectAction.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/utils/FormUtilsImpl.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/GenerateMinMaxValuesAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/scheduling/ScheduleTasksAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/schedule/GetScheduleAggQueryBuilderParamsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/schedule/GetScheduleParamsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/schedule/ScheduleCaseAggregateConditionAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/schedule/ScheduleSendMessageTasksAction.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SettingKey.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
=== renamed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/Setting.java' => 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SettingKey.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/Setting.java	2015-12-02 19:43:42 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SettingKey.java	2015-12-08 19:33:06 +0000
@@ -40,7 +40,7 @@
 /**
  * @author Lars Helge Overland
  */
-public enum Setting
+public enum SettingKey
 {
     APPLICATION_TITLE( "applicationTitle", "DHIS 2", String.class ), 
     APPLICATION_INTRO( "keyApplicationIntro" ),
@@ -122,21 +122,21 @@
     // Constructors
     // -------------------------------------------------------------------------
 
-    private Setting( String name )
+    private SettingKey( String name )
     {
         this.name = name;
         this.defaultValue = null;
         this.clazz = String.class;
     }
     
-    private Setting( String name, Class<?> clazz )
+    private SettingKey( String name, Class<?> clazz )
     {
         this.name = name;
         this.defaultValue = null;
         this.clazz = clazz;
     }
     
-    private Setting( String name, Serializable defaultValue, Class<?> clazz )
+    private SettingKey( String name, Serializable defaultValue, Class<?> clazz )
     {
         this.name = name;
         this.defaultValue = defaultValue;
@@ -147,9 +147,9 @@
     // Logic
     // -------------------------------------------------------------------------
 
-    public static Optional<Setting> getByName( String name )
+    public static Optional<SettingKey> getByName( String name )
     {
-        for ( Setting setting : Setting.values() )
+        for ( SettingKey setting : SettingKey.values() )
         {
             if ( setting.getName().equals( name ) )
             {
@@ -162,7 +162,7 @@
 
     public static Serializable getAsRealClass( String name, String value )
     {
-        Optional<Setting> setting = getByName( name );
+        Optional<SettingKey> setting = getByName( name );
                 
         if ( setting.isPresent() )
         {            

=== 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-11-07 17:11:20 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java	2015-12-08 19:33:06 +0000
@@ -41,17 +41,17 @@
 {
     void saveSystemSetting( String name, Serializable value );
     
-    void saveSystemSetting( Setting setting, Serializable value );
+    void saveSystemSetting( SettingKey setting, Serializable value );
 
     void deleteSystemSetting( String name );
     
-    void deleteSystemSetting( Setting setting );
+    void deleteSystemSetting( SettingKey setting );
 
     Serializable getSystemSetting( String name );
 
-    Serializable getSystemSetting( Setting setting );
+    Serializable getSystemSetting( SettingKey setting );
     
-    Serializable getSystemSetting( Setting setting, Serializable defaultValue );
+    Serializable getSystemSetting( SettingKey setting, Serializable defaultValue );
     
     List<SystemSetting> getAllSystemSettings();
 
@@ -59,7 +59,7 @@
     
     Map<String, Serializable> getSystemSettingsAsMap( Set<String> names );
     
-    Map<String, Serializable> getSystemSettings( Collection<Setting> settings );
+    Map<String, Serializable> getSystemSettings( Collection<SettingKey> settings );
     
     void invalidateCache();
     

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserSettingService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserSettingService.java	2015-10-14 09:35:22 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserSettingService.java	2015-12-08 19:33:06 +0000
@@ -41,8 +41,6 @@
 {
     String ID = UserSettingService.class.getName();
 
-    String AUTO_SAVE_DATA_ENTRY_FORM = "autoSaveDataEntryForm";
-    String KEY_CURRENT_DOMAIN_TYPE = "currentDomainType";
     String KEY_STYLE = "stylesheet";
     String KEY_STYLE_DIRECTORY = "stylesheetDirectory";
     String KEY_MESSAGE_EMAIL_NOTIFICATION = "keyMessageEmailNotification";
@@ -50,8 +48,10 @@
     String KEY_UI_LOCALE = "keyUiLocale";
     String KEY_DB_LOCALE = "keyDbLocale";
     String KEY_ANALYSIS_DISPLAY_PROPERTY = "keyAnalysisDisplayProperty";
+    String KEY_CURRENT_DOMAIN_TYPE = "currentDomainType";
     String AUTO_SAVE_CASE_ENTRY_FORM = "autoSaveCaseEntryForm";
     String AUTO_SAVE_TRACKED_ENTITY_REGISTRATION_ENTRY_FORM = "autoSavetTrackedEntityForm";
+    String AUTO_SAVE_DATA_ENTRY_FORM = "autoSaveDataEntryForm";
     
     String DEFAULT_ANALYSIS_DISPLAY_PROPERTY = "name";
     

=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/scheduling/ResourceTableTask.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/scheduling/ResourceTableTask.java	2015-11-11 17:40:22 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/scheduling/ResourceTableTask.java	2015-12-08 19:33:06 +0000
@@ -36,7 +36,7 @@
 import org.hisp.dhis.message.MessageService;
 import org.hisp.dhis.resourcetable.ResourceTableService;
 import org.hisp.dhis.scheduling.TaskId;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.notification.NotificationLevel;
 import org.hisp.dhis.system.notification.Notifier;
@@ -106,7 +106,7 @@
             throw ex;
         }
 
-        systemSettingManager.saveSystemSetting( Setting.LAST_SUCCESSFUL_RESOURCE_TABLES_UPDATE, startTime );
+        systemSettingManager.saveSystemSetting( SettingKey.LAST_SUCCESSFUL_RESOURCE_TABLES_UPDATE, startTime );
     }    
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java	2015-12-06 23:17:32 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java	2015-12-08 19:33:06 +0000
@@ -106,7 +106,7 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.reporttable.ReportTable;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.grid.ListGrid;
 import org.hisp.dhis.system.util.MathUtils;
@@ -1029,7 +1029,7 @@
      */
     private int getProcessNo()
     {
-        Integer cores = (Integer) systemSettingManager.getSystemSetting( Setting.DATABASE_SERVER_CPUS );
+        Integer cores = (Integer) systemSettingManager.getSystemSetting( SettingKey.DATABASE_SERVER_CPUS );
 
         return ( cores == null || cores == 0 ) ? SystemUtils.getCpuCores() : cores;
     }
@@ -1075,6 +1075,6 @@
      */
     private int getMaxLimit()
     {
-        return (Integer) systemSettingManager.getSystemSetting( Setting.ANALYTICS_MAX_LIMIT );
+        return (Integer) systemSettingManager.getSystemSetting( SettingKey.ANALYTICS_MAX_LIMIT );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java	2015-11-20 15:20:20 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java	2015-12-08 19:33:06 +0000
@@ -54,7 +54,7 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.program.ProgramDataElement;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.filter.AggregatableDataElementFilter;
 import org.hisp.dhis.system.util.MathUtils;
@@ -210,7 +210,7 @@
     public void validateMaintenanceMode()
         throws MaintenanceModeException
     {
-        boolean maintenance = (Boolean) systemSettingManager.getSystemSetting( Setting.ANALYTICS_MAINTENANCE_MODE );
+        boolean maintenance = (Boolean) systemSettingManager.getSystemSetting( SettingKey.ANALYTICS_MAINTENANCE_MODE );
 
         if ( maintenance )
         {

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventQueryPlanner.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventQueryPlanner.java	2015-11-20 15:20:20 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventQueryPlanner.java	2015-12-08 19:33:06 +0000
@@ -47,7 +47,7 @@
 import org.hisp.dhis.common.QueryItem;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.program.ProgramIndicator;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.springframework.beans.factory.annotation.Autowired;
 
@@ -199,7 +199,7 @@
     @Override
     public int getMaxLimit()
     {
-        return (Integer) systemSettingManager.getSystemSetting( Setting.ANALYTICS_MAX_LIMIT );
+        return (Integer) systemSettingManager.getSystemSetting( SettingKey.ANALYTICS_MAX_LIMIT );
     }
     
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/security/DefaultAnalyticsSecurityManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/security/DefaultAnalyticsSecurityManager.java	2015-11-20 15:20:20 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/security/DefaultAnalyticsSecurityManager.java	2015-12-08 19:33:06 +0000
@@ -47,7 +47,7 @@
 import org.hisp.dhis.dataapproval.DataApprovalLevel;
 import org.hisp.dhis.dataapproval.DataApprovalLevelService;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
@@ -111,7 +111,7 @@
     {
         User user = currentUserService.getCurrentUser();
 
-        boolean hideUnapprovedData = (Boolean) systemSettingManager.getSystemSetting( Setting.HIDE_UNAPPROVED_DATA_IN_ANALYTICS );
+        boolean hideUnapprovedData = (Boolean) systemSettingManager.getSystemSetting( SettingKey.HIDE_UNAPPROVED_DATA_IN_ANALYTICS );
         
         boolean canViewUnapprovedData = user != null ? user.getUserCredentials().isAuthorized( DataApproval.AUTH_VIEW_UNAPPROVED_DATA ) : true;
         

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java	2015-11-12 18:37:11 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java	2015-12-08 19:33:06 +0000
@@ -49,7 +49,7 @@
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.resourcetable.ResourceTableService;
 import org.hisp.dhis.scheduling.TaskId;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.notification.Notifier;
 import org.hisp.dhis.system.util.SystemUtils;
@@ -318,7 +318,7 @@
      */
     private int getProcessNo()
     {
-        Integer cores = (Integer) systemSettingManager.getSystemSetting( Setting.DATABASE_SERVER_CPUS );
+        Integer cores = (Integer) systemSettingManager.getSystemSetting( SettingKey.DATABASE_SERVER_CPUS );
         
         cores = ( cores == null || cores == 0 ) ? SystemUtils.getCpuCores() : cores;
                         

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/scheduling/AnalyticsTableTask.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/scheduling/AnalyticsTableTask.java	2015-11-11 17:40:22 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/scheduling/AnalyticsTableTask.java	2015-12-08 19:33:06 +0000
@@ -44,7 +44,7 @@
 import org.hisp.dhis.message.MessageService;
 import org.hisp.dhis.scheduling.TaskId;
 import org.hisp.dhis.security.NoSecurityContextRunnable;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.notification.Notifier;
 import org.hisp.dhis.system.util.Clock;
@@ -182,7 +182,7 @@
             throw ex;
         }
 
-        systemSettingManager.saveSystemSetting( Setting.LAST_SUCCESSFUL_ANALYTICS_TABLES_UPDATE, startTime );
-        systemSettingManager.saveSystemSetting( Setting.LAST_SUCCESSFUL_ANALYTICS_TABLES_RUNTIME, DateUtils.getPrettyInterval( clock.getSplitTime() ) );
+        systemSettingManager.saveSystemSetting( SettingKey.LAST_SUCCESSFUL_ANALYTICS_TABLES_UPDATE, startTime );
+        systemSettingManager.saveSystemSetting( SettingKey.LAST_SUCCESSFUL_ANALYTICS_TABLES_RUNTIME, DateUtils.getPrettyInterval( clock.getSplitTime() ) );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java	2015-10-12 09:07:57 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java	2015-12-08 19:33:06 +0000
@@ -50,7 +50,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.datavalue.DefaultDataValueService;
 import org.hisp.dhis.keyjsonvalue.KeyJsonValueService;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
@@ -282,7 +282,7 @@
     @Override
     public String getAppFolderPath()
     {
-        return StringUtils.trimToNull( (String) appSettingManager.getSystemSetting( Setting.APP_FOLDER_PATH ) );
+        return StringUtils.trimToNull( (String) appSettingManager.getSystemSetting( SettingKey.APP_FOLDER_PATH ) );
     }
 
     @Override
@@ -304,31 +304,31 @@
             }
         }
 
-        appSettingManager.saveSystemSetting( Setting.APP_FOLDER_PATH, appFolderPath );
+        appSettingManager.saveSystemSetting( SettingKey.APP_FOLDER_PATH, appFolderPath );
     }
 
     @Override
     public String getAppBaseUrl()
     {
-        return StringUtils.trimToNull( (String) appSettingManager.getSystemSetting( Setting.APP_BASE_URL ) );
+        return StringUtils.trimToNull( (String) appSettingManager.getSystemSetting( SettingKey.APP_BASE_URL ) );
     }
 
     @Override
     public void setAppBaseUrl( String appBaseUrl )
     {
-        appSettingManager.saveSystemSetting( Setting.APP_BASE_URL, appBaseUrl );
+        appSettingManager.saveSystemSetting( SettingKey.APP_BASE_URL, appBaseUrl );
     }
 
     @Override
     public String getAppStoreUrl()
     {
-        return StringUtils.trimToNull( (String) appSettingManager.getSystemSetting( Setting.APP_STORE_URL ) );
+        return StringUtils.trimToNull( (String) appSettingManager.getSystemSetting( SettingKey.APP_STORE_URL ) );
     }
 
     @Override
     public void setAppStoreUrl( String appStoreUrl )
     {
-        appSettingManager.saveSystemSetting( Setting.APP_STORE_URL, appStoreUrl );
+        appSettingManager.saveSystemSetting( SettingKey.APP_STORE_URL, appStoreUrl );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/calendar/DefaultCalendarService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/calendar/DefaultCalendarService.java	2015-10-22 22:26:41 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/calendar/DefaultCalendarService.java	2015-12-08 19:33:06 +0000
@@ -38,7 +38,7 @@
 import org.hisp.dhis.calendar.impl.Iso8601Calendar;
 import org.hisp.dhis.period.Cal;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.springframework.beans.factory.annotation.Autowired;
 
@@ -99,8 +99,8 @@
     @Override
     public Calendar getSystemCalendar()
     {
-        String calendarKey = (String) settingManager.getSystemSetting( Setting.CALENDAR );
-        String dateFormat = (String) settingManager.getSystemSetting( Setting.DATE_FORMAT );
+        String calendarKey = (String) settingManager.getSystemSetting( SettingKey.CALENDAR );
+        String dateFormat = (String) settingManager.getSystemSetting( SettingKey.DATE_FORMAT );
 
         Calendar calendar = null;
 
@@ -121,7 +121,7 @@
     @Override
     public DateFormat getSystemDateFormat()
     {
-        String dateFormatKey = (String) settingManager.getSystemSetting( Setting.DATE_FORMAT );
+        String dateFormatKey = (String) settingManager.getSystemSetting( SettingKey.DATE_FORMAT );
 
         for ( DateFormat dateFormat : dateFormats )
         {

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DataApprovalPermissionsEvaluator.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DataApprovalPermissionsEvaluator.java	2015-12-02 17:45:46 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DataApprovalPermissionsEvaluator.java	2015-12-08 19:33:06 +0000
@@ -35,7 +35,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
@@ -102,8 +102,8 @@
 
         ev.user = currentUserService.getCurrentUser();
 
-        ev.acceptanceRequiredForApproval = (Boolean) systemSettingManager.getSystemSetting( Setting.ACCEPTANCE_REQUIRED_FOR_APPROVAL );
-        boolean hideUnapprovedData = (Boolean) systemSettingManager.getSystemSetting( Setting.HIDE_UNAPPROVED_DATA_IN_ANALYTICS );
+        ev.acceptanceRequiredForApproval = (Boolean) systemSettingManager.getSystemSetting( SettingKey.ACCEPTANCE_REQUIRED_FOR_APPROVAL );
+        boolean hideUnapprovedData = (Boolean) systemSettingManager.getSystemSetting( SettingKey.HIDE_UNAPPROVED_DATA_IN_ANALYTICS );
 
         ev.authorizedToApprove = ev.user.getUserCredentials().isAuthorized( DataApproval.AUTH_APPROVE );
         ev.authorizedToApproveAtLowerLevels = ev.user.getUserCredentials().isAuthorized( DataApproval.AUTH_APPROVE_LOWER_LEVELS );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java	2015-12-05 11:02:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java	2015-12-08 19:33:06 +0000
@@ -64,7 +64,7 @@
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.util.DateUtils;
 import org.hisp.dhis.user.CurrentUserService;
@@ -303,7 +303,7 @@
                     }
                 }
 
-                boolean acceptanceRequiredForApproval = (Boolean) systemSettingManager.getSystemSetting( Setting.ACCEPTANCE_REQUIRED_FOR_APPROVAL );
+                boolean acceptanceRequiredForApproval = (Boolean) systemSettingManager.getSystemSetting( SettingKey.ACCEPTANCE_REQUIRED_FOR_APPROVAL );
 
                 readyBelowSubquery = "not exists (select 1 from _orgunitstructure ous " +
                     "where not exists (select 1 from dataapproval da " +

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/email/DefaultEmailService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/email/DefaultEmailService.java	2015-10-06 18:24:42 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/email/DefaultEmailService.java	2015-12-08 19:33:06 +0000
@@ -30,7 +30,7 @@
 
 import org.apache.commons.lang3.StringUtils;
 import org.hisp.dhis.message.MessageSender;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.util.ValidationUtils;
 import org.hisp.dhis.user.CurrentUserService;
@@ -94,7 +94,7 @@
     @Override
     public void sendTestEmail()
     {
-        String instanceName = (String) systemSettingManager.getSystemSetting( Setting.APPLICATION_TITLE );
+        String instanceName = (String) systemSettingManager.getSystemSetting( SettingKey.APPLICATION_TITLE );
         
         Email email = new Email( TEST_EMAIL_SUBJECT, TEST_EMAIL_TEXT + instanceName, null, Sets.newHashSet( currentUserService.getCurrentUser() ) );
         
@@ -104,8 +104,8 @@
     @Override
     public boolean sendSystemEmail( Email email )
     {
-        String recipient = (String) systemSettingManager.getSystemSetting( Setting.SYSTEM_NOTIFICATIONS_EMAIL );
-        String appTitle = (String) systemSettingManager.getSystemSetting( Setting.APPLICATION_TITLE );
+        String recipient = (String) systemSettingManager.getSystemSetting( SettingKey.SYSTEM_NOTIFICATIONS_EMAIL );
+        String appTitle = (String) systemSettingManager.getSystemSetting( SettingKey.APPLICATION_TITLE );
 
         if ( recipient == null || !ValidationUtils.emailIsValid( recipient ) )
         {

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/EmailMessageSender.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/EmailMessageSender.java	2015-10-14 09:35:22 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/EmailMessageSender.java	2015-12-08 19:33:06 +0000
@@ -42,7 +42,7 @@
 import org.apache.commons.mail.HtmlEmail;
 import org.hisp.dhis.commons.util.DebugUtils;
 import org.hisp.dhis.configuration.ConfigurationService;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.velocity.VelocityManager;
 import org.hisp.dhis.user.User;
@@ -232,7 +232,7 @@
 
     private String customizeTitle( String title )
     {
-        String appTitle = (String) systemSettingManager.getSystemSetting( Setting.APPLICATION_TITLE );
+        String appTitle = (String) systemSettingManager.getSystemSetting( SettingKey.APPLICATION_TITLE );
 
         if ( appTitle != null && !appTitle.isEmpty() )
         {

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/DefaultSecurityService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/DefaultSecurityService.java	2015-12-03 17:01:58 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/DefaultSecurityService.java	2015-12-08 19:33:06 +0000
@@ -38,7 +38,7 @@
 import org.hisp.dhis.i18n.locale.LocaleManager;
 import org.hisp.dhis.message.MessageSender;
 import org.hisp.dhis.period.Cal;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.util.ValidationUtils;
 import org.hisp.dhis.system.velocity.VelocityManager;
@@ -210,7 +210,7 @@
 
         RestoreType restoreType = restoreOptions.getRestoreType();
 
-        String applicationTitle = (String) systemSettingManager.getSystemSetting( Setting.APPLICATION_TITLE );
+        String applicationTitle = (String) systemSettingManager.getSystemSetting( SettingKey.APPLICATION_TITLE );
 
         if ( applicationTitle == null || applicationTitle.isEmpty() )
         {
@@ -493,7 +493,7 @@
     @Override
     public boolean canView( String type )
     {
-        boolean requireAddToView = (Boolean) systemSettingManager.getSystemSetting( Setting.REQUIRE_ADD_TO_VIEW );
+        boolean requireAddToView = (Boolean) systemSettingManager.getSystemSetting( SettingKey.REQUIRE_ADD_TO_VIEW );
 
         return !requireAddToView || (canCreatePrivate( type ) || canCreatePublic( type ));
     }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultStyleManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultStyleManager.java	2015-10-16 20:17:09 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultStyleManager.java	2015-12-08 19:33:06 +0000
@@ -88,19 +88,19 @@
     @Override
     public void setSystemStyle( String style )
     {
-        systemSettingManager.saveSystemSetting( Setting.STYLE.getName(), style );
+        systemSettingManager.saveSystemSetting( SettingKey.STYLE.getName(), style );
     }
     
     @Override
     public void setUserStyle( String style )
     {
-        userSettingService.saveUserSetting( Setting.STYLE.getName(), style );
+        userSettingService.saveUserSetting( SettingKey.STYLE.getName(), style );
     }
 
     @Override
     public String getCurrentStyle()
     {
-        String style = (String) userSettingService.getUserSetting( Setting.STYLE.getName() );
+        String style = (String) userSettingService.getUserSetting( SettingKey.STYLE.getName() );
         
         if ( style != null )
         {
@@ -113,7 +113,7 @@
     @Override
     public String getSystemStyle()
     {
-        return (String) systemSettingManager.getSystemSetting( Setting.STYLE );
+        return (String) systemSettingManager.getSystemSetting( SettingKey.STYLE );
     }
 
     @Override

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java	2015-11-07 17:11:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultSystemSettingManager.java	2015-12-08 19:33:06 +0000
@@ -117,7 +117,7 @@
     }
 
     @Override
-    public void saveSystemSetting( Setting setting, Serializable value )
+    public void saveSystemSetting( SettingKey setting, Serializable value )
     {        
         saveSystemSetting( setting.getName(), value );
     }
@@ -136,7 +136,7 @@
     }
 
     @Override
-    public void deleteSystemSetting( Setting setting )
+    public void deleteSystemSetting( SettingKey setting )
     {
         deleteSystemSetting( setting.getName() );
     }
@@ -150,7 +150,7 @@
     }
 
     @Override
-    public Serializable getSystemSetting( Setting setting )
+    public Serializable getSystemSetting( SettingKey setting )
     {
         try
         {
@@ -165,7 +165,7 @@
     }
 
     @Override
-    public Serializable getSystemSetting( Setting setting, Serializable defaultValue )
+    public Serializable getSystemSetting( SettingKey setting, Serializable defaultValue )
     {
         return getSystemSettingOptional( setting.getName(), defaultValue ).orElse( null );
     }
@@ -196,7 +196,7 @@
             
             if ( settingValue == null )
             {
-                Optional<Setting> setting = Setting.getByName( systemSetting.getName() );
+                Optional<SettingKey> setting = SettingKey.getByName( systemSetting.getName() );
                 
                 if ( setting.isPresent() )
                 {
@@ -221,7 +221,7 @@
 
             if ( settingValue == null )
             {
-                Optional<Setting> setting = Setting.getByName( name );
+                Optional<SettingKey> setting = SettingKey.getByName( name );
                 
                 if ( setting.isPresent() )
                 {
@@ -239,11 +239,11 @@
     }
 
     @Override
-    public Map<String, Serializable> getSystemSettings( Collection<Setting> settings )
+    public Map<String, Serializable> getSystemSettings( Collection<SettingKey> settings )
     {
         Map<String, Serializable> map = new HashMap<>();
         
-        for ( Setting setting : settings )
+        for ( SettingKey setting : settings )
         {
             Serializable value = getSystemSetting( setting );
             
@@ -296,7 +296,7 @@
     @Override
     public String getFlagImage()
     {
-        String flag = (String) getSystemSetting( Setting.FLAG );
+        String flag = (String) getSystemSetting( SettingKey.FLAG );
 
         return flag != null ? flag + ".png" : null;
     }
@@ -304,49 +304,49 @@
     @Override
     public String getEmailHostName()
     {
-        return StringUtils.trimToNull( (String) getSystemSetting( Setting.EMAIL_HOST_NAME ) );
+        return StringUtils.trimToNull( (String) getSystemSetting( SettingKey.EMAIL_HOST_NAME ) );
     }
 
     @Override
     public int getEmailPort()
     {
-        return (Integer) getSystemSetting( Setting.EMAIL_PORT );
+        return (Integer) getSystemSetting( SettingKey.EMAIL_PORT );
     }
 
     @Override
     public String getEmailUsername()
     {
-        return StringUtils.trimToNull( (String) getSystemSetting( Setting.EMAIL_USERNAME ) );
+        return StringUtils.trimToNull( (String) getSystemSetting( SettingKey.EMAIL_USERNAME ) );
     }
 
     @Override
     public boolean getEmailTls()
     {
-        return (Boolean) getSystemSetting( Setting.EMAIL_TLS );
+        return (Boolean) getSystemSetting( SettingKey.EMAIL_TLS );
     }
 
     @Override
     public String getEmailSender()
     {
-        return StringUtils.trimToNull( (String) getSystemSetting( Setting.EMAIL_SENDER ) );
+        return StringUtils.trimToNull( (String) getSystemSetting( SettingKey.EMAIL_SENDER ) );
     }
 
     @Override
     public String getInstanceBaseUrl()
     {
-        return StringUtils.trimToNull( (String) getSystemSetting( Setting.INSTANCE_BASE_URL ) );
+        return StringUtils.trimToNull( (String) getSystemSetting( SettingKey.INSTANCE_BASE_URL ) );
     }
 
     @Override
     public boolean accountRecoveryEnabled()
     {
-        return (Boolean) getSystemSetting( Setting.ACCOUNT_RECOVERY );
+        return (Boolean) getSystemSetting( SettingKey.ACCOUNT_RECOVERY );
     }
 
     @Override
     public boolean selfRegistrationNoRecaptcha()
     {
-        return (Boolean) getSystemSetting( Setting.SELF_REGISTRATION_NO_RECAPTCHA );
+        return (Boolean) getSystemSetting( SettingKey.SELF_REGISTRATION_NO_RECAPTCHA );
     }
 
     @Override
@@ -358,7 +358,7 @@
     @Override
     public boolean systemNotificationEmailValid()
     {
-        String address = (String) getSystemSetting( Setting.SYSTEM_NOTIFICATIONS_EMAIL );
+        String address = (String) getSystemSetting( SettingKey.SYSTEM_NOTIFICATIONS_EMAIL );
 
         return address != null && ValidationUtils.emailIsValid( address );
     }
@@ -366,24 +366,24 @@
     @Override
     public boolean hideUnapprovedDataInAnalytics()
     {
-        return (Boolean) getSystemSetting( Setting.HIDE_UNAPPROVED_DATA_IN_ANALYTICS );
+        return (Boolean) getSystemSetting( SettingKey.HIDE_UNAPPROVED_DATA_IN_ANALYTICS );
     }
 
     @Override
     public boolean isOpenIdConfigured()
     {
-        return getSystemSetting( Setting.OPENID_PROVIDER ) != null && getSystemSetting( Setting.OPENID_PROVIDER_LABEL ) != null;
+        return getSystemSetting( SettingKey.OPENID_PROVIDER ) != null && getSystemSetting( SettingKey.OPENID_PROVIDER_LABEL ) != null;
     }
 
     @Override
     public String googleAnalyticsUA()
     {
-        return StringUtils.trimToNull( (String) getSystemSetting( Setting.GOOGLE_ANALYTICS_UA ) );
+        return StringUtils.trimToNull( (String) getSystemSetting( SettingKey.GOOGLE_ANALYTICS_UA ) );
     }
 
     @Override
     public Integer credentialsExpires()
     {
-        return (Integer) getSystemSetting( Setting.CREDENTIALS_EXPIRES );
+        return (Integer) getSystemSetting( SettingKey.CREDENTIALS_EXPIRES );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultTranslateSystemSettingManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultTranslateSystemSettingManager.java	2015-10-14 11:29:47 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultTranslateSystemSettingManager.java	2015-12-08 19:33:06 +0000
@@ -59,10 +59,10 @@
     {
         Map<String, String> translations = new Hashtable<>();
 
-        translations.put( Setting.APPLICATION_TITLE.getDefaultValue().toString(), getSystemSettingWithFallbacks( Setting.APPLICATION_TITLE.getDefaultValue().toString(), localeStr, Setting.APPLICATION_TITLE.getDefaultValue().toString() ) );        
-        translations.put( Setting.APPLICATION_INTRO.getDefaultValue().toString(), getSystemSettingWithFallbacks( Setting.APPLICATION_INTRO.getDefaultValue().toString(), localeStr, "" ) );
-        translations.put( Setting.APPLICATION_NOTIFICATION.getDefaultValue().toString(), getSystemSettingWithFallbacks( Setting.APPLICATION_NOTIFICATION.getDefaultValue().toString(), localeStr, "" ) );
-        translations.put( Setting.APPLICATION_FOOTER.getDefaultValue().toString(), getSystemSettingWithFallbacks( Setting.APPLICATION_FOOTER.getDefaultValue().toString(), localeStr, "" ) );
+        translations.put( SettingKey.APPLICATION_TITLE.getDefaultValue().toString(), getSystemSettingWithFallbacks( SettingKey.APPLICATION_TITLE.getDefaultValue().toString(), localeStr, SettingKey.APPLICATION_TITLE.getDefaultValue().toString() ) );        
+        translations.put( SettingKey.APPLICATION_INTRO.getDefaultValue().toString(), getSystemSettingWithFallbacks( SettingKey.APPLICATION_INTRO.getDefaultValue().toString(), localeStr, "" ) );
+        translations.put( SettingKey.APPLICATION_NOTIFICATION.getDefaultValue().toString(), getSystemSettingWithFallbacks( SettingKey.APPLICATION_NOTIFICATION.getDefaultValue().toString(), localeStr, "" ) );
+        translations.put( SettingKey.APPLICATION_FOOTER.getDefaultValue().toString(), getSystemSettingWithFallbacks( SettingKey.APPLICATION_FOOTER.getDefaultValue().toString(), localeStr, "" ) );
                 
         return translations;
     }
@@ -72,14 +72,14 @@
     {
         Map<String, String> translations = new Hashtable<>();
 
-        translations.put( Setting.APPLICATION_TITLE.getDefaultValue().toString(), ObjectUtils.firstNonNull( 
-            systemSettingManager.getSystemSetting( Setting.APPLICATION_TITLE.getDefaultValue().toString() + localeStr ), Setting.APPLICATION_TITLE.getDefaultValue().toString() ).toString() );        
-        translations.put( Setting.APPLICATION_INTRO.getDefaultValue().toString(), ObjectUtils.firstNonNull( 
-            systemSettingManager.getSystemSetting( Setting.APPLICATION_INTRO.getDefaultValue().toString() + localeStr ), "" ).toString() );
-        translations.put( Setting.APPLICATION_NOTIFICATION.getDefaultValue().toString(), ObjectUtils.firstNonNull( 
-            systemSettingManager.getSystemSetting( Setting.APPLICATION_NOTIFICATION.getDefaultValue().toString() + localeStr ), "" ).toString() );
-        translations.put( Setting.APPLICATION_FOOTER.getDefaultValue().toString(), ObjectUtils.firstNonNull( 
-            systemSettingManager.getSystemSetting( Setting.APPLICATION_FOOTER.getDefaultValue().toString() + localeStr ), "" ).toString() );
+        translations.put( SettingKey.APPLICATION_TITLE.getDefaultValue().toString(), ObjectUtils.firstNonNull( 
+            systemSettingManager.getSystemSetting( SettingKey.APPLICATION_TITLE.getDefaultValue().toString() + localeStr ), SettingKey.APPLICATION_TITLE.getDefaultValue().toString() ).toString() );        
+        translations.put( SettingKey.APPLICATION_INTRO.getDefaultValue().toString(), ObjectUtils.firstNonNull( 
+            systemSettingManager.getSystemSetting( SettingKey.APPLICATION_INTRO.getDefaultValue().toString() + localeStr ), "" ).toString() );
+        translations.put( SettingKey.APPLICATION_NOTIFICATION.getDefaultValue().toString(), ObjectUtils.firstNonNull( 
+            systemSettingManager.getSystemSetting( SettingKey.APPLICATION_NOTIFICATION.getDefaultValue().toString() + localeStr ), "" ).toString() );
+        translations.put( SettingKey.APPLICATION_FOOTER.getDefaultValue().toString(), ObjectUtils.firstNonNull( 
+            systemSettingManager.getSystemSetting( SettingKey.APPLICATION_FOOTER.getDefaultValue().toString() + localeStr ), "" ).toString() );
                 
         return translations;
     }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/config/DefaultSmsConfigurationManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/config/DefaultSmsConfigurationManager.java	2015-11-24 13:14:24 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/config/DefaultSmsConfigurationManager.java	2015-12-08 19:33:06 +0000
@@ -35,7 +35,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 
 import org.springframework.beans.factory.annotation.Autowired;
@@ -102,13 +102,13 @@
     @Override
     public SmsConfiguration getSmsConfiguration()
     {
-        return (SmsConfiguration) systemSettingManager.getSystemSetting( Setting.SMS_CONFIG );
+        return (SmsConfiguration) systemSettingManager.getSystemSetting( SettingKey.SMS_CONFIG );
     }
 
     @Override
     public void updateSmsConfiguration( SmsConfiguration config )
     {
-        systemSettingManager.saveSystemSetting( Setting.SMS_CONFIG, config );
+        systemSettingManager.saveSystemSetting( SettingKey.SMS_CONFIG, config );
 
         initializeSmsConfigurables();
     }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/system/DefaultSystemService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/system/DefaultSystemService.java	2015-10-06 18:24:42 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/system/DefaultSystemService.java	2015-12-08 19:33:06 +0000
@@ -43,7 +43,7 @@
 import org.hisp.dhis.configuration.ConfigurationService;
 import org.hisp.dhis.external.location.LocationManager;
 import org.hisp.dhis.external.location.LocationManagerException;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.database.DatabaseInfoProvider;
 import org.hisp.dhis.system.util.DateUtils;
@@ -93,8 +93,8 @@
         // Set volatile properties
         // ---------------------------------------------------------------------
 
-        Date lastAnalyticsTableSuccess = (Date) systemSettingManager.getSystemSetting( Setting.LAST_SUCCESSFUL_ANALYTICS_TABLES_UPDATE );
-        String lastAnalyticsTableRuntime = (String) systemSettingManager.getSystemSetting( Setting.LAST_SUCCESSFUL_ANALYTICS_TABLES_RUNTIME );
+        Date lastAnalyticsTableSuccess = (Date) systemSettingManager.getSystemSetting( SettingKey.LAST_SUCCESSFUL_ANALYTICS_TABLES_UPDATE );
+        String lastAnalyticsTableRuntime = (String) systemSettingManager.getSystemSetting( SettingKey.LAST_SUCCESSFUL_ANALYTICS_TABLES_RUNTIME );
         
         Date now = new Date();
         

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java	2015-11-18 16:46:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java	2015-12-08 19:33:06 +0000
@@ -48,7 +48,7 @@
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.security.PasswordManager;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.filter.UserAuthorityGroupCanIssueFilter;
 import org.hisp.dhis.system.util.DateUtils;
@@ -242,7 +242,7 @@
 
     private void handleUserQueryParams( UserQueryParams params )
     {
-        boolean canGrantOwnRoles = (Boolean) systemSettingManager.getSystemSetting( Setting.CAN_GRANT_OWN_USER_AUTHORITY_GROUPS );
+        boolean canGrantOwnRoles = (Boolean) systemSettingManager.getSystemSetting( SettingKey.CAN_GRANT_OWN_USER_AUTHORITY_GROUPS );
         params.setDisjointRoles( !canGrantOwnRoles );
 
         if ( params.getUser() == null )
@@ -500,7 +500,7 @@
     {
         User user = currentUserService.getCurrentUser();
 
-        boolean canGrantOwnUserAuthorityGroups = (Boolean) systemSettingManager.getSystemSetting( Setting.CAN_GRANT_OWN_USER_AUTHORITY_GROUPS );
+        boolean canGrantOwnUserAuthorityGroups = (Boolean) systemSettingManager.getSystemSetting( SettingKey.CAN_GRANT_OWN_USER_AUTHORITY_GROUPS );
 
         FilterUtils.filter( userRoles, new UserAuthorityGroupCanIssueFilter( user, canGrantOwnUserAuthorityGroups ) );
     }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java	2015-10-12 10:12:49 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java	2015-12-08 19:33:06 +0000
@@ -51,7 +51,7 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
@@ -257,7 +257,7 @@
 
         Set<Period> periods = getAlertPeriodsFromRules( rules );
 
-        Date lastScheduledRun = (Date) systemSettingManager.getSystemSetting( Setting.LAST_MONITORING_RUN );
+        Date lastScheduledRun = (Date) systemSettingManager.getSystemSetting( SettingKey.LAST_MONITORING_RUN );
 
         // Any database changes after this moment will contribute to the next run.
 
@@ -278,7 +278,7 @@
 
         log.info( "Posted alerts, monitoring task done" );
 
-        systemSettingManager.saveSystemSetting( Setting.LAST_MONITORING_RUN, thisRun );
+        systemSettingManager.saveSystemSetting( SettingKey.LAST_MONITORING_RUN, thisRun );
     }
 
     @Override

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/scheduling/MonitoringTask.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/scheduling/MonitoringTask.java	2015-11-11 17:40:22 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/scheduling/MonitoringTask.java	2015-12-08 19:33:06 +0000
@@ -38,7 +38,7 @@
 import org.hisp.dhis.external.conf.DhisConfigurationProvider;
 import org.hisp.dhis.message.MessageService;
 import org.hisp.dhis.scheduling.TaskId;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.notification.Notifier;
 import org.hisp.dhis.validation.ValidationRuleService;
@@ -107,6 +107,6 @@
             throw ex;
         }
         
-        systemSettingManager.saveSystemSetting( Setting.LAST_SUCCESSFUL_MONITORING, startTime );
+        systemSettingManager.saveSystemSetting( SettingKey.LAST_SUCCESSFUL_MONITORING, startTime );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataapproval/DataApprovalServiceCategoryOptionGroupTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataapproval/DataApprovalServiceCategoryOptionGroupTest.java	2015-12-06 23:17:32 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataapproval/DataApprovalServiceCategoryOptionGroupTest.java	2015-12-08 19:33:06 +0000
@@ -61,7 +61,7 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
@@ -518,8 +518,8 @@
 
         systemSettingManager.invalidateCache();
         
-        systemSettingManager.saveSystemSetting( Setting.HIDE_UNAPPROVED_DATA_IN_ANALYTICS, true );
-        systemSettingManager.saveSystemSetting( Setting.ACCEPTANCE_REQUIRED_FOR_APPROVAL, true );
+        systemSettingManager.saveSystemSetting( SettingKey.HIDE_UNAPPROVED_DATA_IN_ANALYTICS, true );
+        systemSettingManager.saveSystemSetting( SettingKey.ACCEPTANCE_REQUIRED_FOR_APPROVAL, true );
     }
 
     @Override
@@ -537,8 +537,8 @@
         setDependency( organisationUnitService, "currentUserService", currentUserService, CurrentUserService.class );
         setDependency( hibernateCategoryOptionGroupStore, "currentUserService", currentUserService, CurrentUserService.class );
 
-        systemSettingManager.saveSystemSetting( Setting.HIDE_UNAPPROVED_DATA_IN_ANALYTICS, false );
-        systemSettingManager.saveSystemSetting( Setting.ACCEPTANCE_REQUIRED_FOR_APPROVAL, false );
+        systemSettingManager.saveSystemSetting( SettingKey.HIDE_UNAPPROVED_DATA_IN_ANALYTICS, false );
+        systemSettingManager.saveSystemSetting( SettingKey.ACCEPTANCE_REQUIRED_FOR_APPROVAL, false );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/setting/SystemSettingManagerTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/setting/SystemSettingManagerTest.java	2015-10-14 09:35:22 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/setting/SystemSettingManagerTest.java	2015-12-08 19:33:06 +0000
@@ -41,6 +41,8 @@
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 
+import static org.hisp.dhis.setting.SettingKey.*;
+
 /**
  * @author Stian Strandli
  * @author Lars Helge Overland
@@ -70,41 +72,41 @@
     @Test
     public void testSaveGetSetting()
     {
-        systemSettingManager.saveSystemSetting( Setting.APPLICATION_INTRO, "valueA" );
-        systemSettingManager.saveSystemSetting( Setting.APPLICATION_NOTIFICATION, "valueB" );
+        systemSettingManager.saveSystemSetting( APPLICATION_INTRO, "valueA" );
+        systemSettingManager.saveSystemSetting( APPLICATION_NOTIFICATION, "valueB" );
 
-        assertEquals( "valueA", systemSettingManager.getSystemSetting( Setting.APPLICATION_INTRO ) );
-        assertEquals( "valueB", systemSettingManager.getSystemSetting( Setting.APPLICATION_NOTIFICATION ) );
+        assertEquals( "valueA", systemSettingManager.getSystemSetting( APPLICATION_INTRO ) );
+        assertEquals( "valueB", systemSettingManager.getSystemSetting( APPLICATION_NOTIFICATION ) );
     }
 
     @Test
     public void testSaveGetSettingWithDefault()
     {
-        assertEquals( Setting.APP_STORE_URL.getDefaultValue(), systemSettingManager.getSystemSetting( Setting.APP_STORE_URL ) );
-        assertEquals( Setting.EMAIL_PORT.getDefaultValue(), systemSettingManager.getSystemSetting( Setting.EMAIL_PORT ) );
+        assertEquals( APP_STORE_URL.getDefaultValue(), systemSettingManager.getSystemSetting( APP_STORE_URL ) );
+        assertEquals( EMAIL_PORT.getDefaultValue(), systemSettingManager.getSystemSetting( EMAIL_PORT ) );
     }
 
     @Test
     public void testSaveGetDeleteSetting()
     {
-        assertNull( systemSettingManager.getSystemSetting( Setting.APPLICATION_INTRO ) );
-        assertEquals( Setting.HELP_PAGE_LINK.getDefaultValue(), systemSettingManager.getSystemSetting( Setting.HELP_PAGE_LINK ) );
-        
-        systemSettingManager.saveSystemSetting( Setting.APPLICATION_INTRO, "valueA" );
-        systemSettingManager.saveSystemSetting( Setting.HELP_PAGE_LINK, "valueB" );
-
-        assertEquals( "valueA", systemSettingManager.getSystemSetting( Setting.APPLICATION_INTRO ) );
-        assertEquals( "valueB", systemSettingManager.getSystemSetting( Setting.HELP_PAGE_LINK ) );
-        
-        systemSettingManager.deleteSystemSetting( Setting.APPLICATION_INTRO );
-
-        assertNull( systemSettingManager.getSystemSetting( Setting.APPLICATION_INTRO ) );
-        assertEquals( "valueB", systemSettingManager.getSystemSetting( Setting.HELP_PAGE_LINK ) );
-
-        systemSettingManager.deleteSystemSetting( Setting.HELP_PAGE_LINK );
-        
-        assertNull( systemSettingManager.getSystemSetting( Setting.APPLICATION_INTRO ) );
-        assertEquals( Setting.HELP_PAGE_LINK.getDefaultValue(), systemSettingManager.getSystemSetting( Setting.HELP_PAGE_LINK ) );        
+        assertNull( systemSettingManager.getSystemSetting( APPLICATION_INTRO ) );
+        assertEquals( HELP_PAGE_LINK.getDefaultValue(), systemSettingManager.getSystemSetting( HELP_PAGE_LINK ) );
+        
+        systemSettingManager.saveSystemSetting( APPLICATION_INTRO, "valueA" );
+        systemSettingManager.saveSystemSetting( HELP_PAGE_LINK, "valueB" );
+
+        assertEquals( "valueA", systemSettingManager.getSystemSetting( APPLICATION_INTRO ) );
+        assertEquals( "valueB", systemSettingManager.getSystemSetting( HELP_PAGE_LINK ) );
+        
+        systemSettingManager.deleteSystemSetting( APPLICATION_INTRO );
+
+        assertNull( systemSettingManager.getSystemSetting( APPLICATION_INTRO ) );
+        assertEquals( "valueB", systemSettingManager.getSystemSetting( HELP_PAGE_LINK ) );
+
+        systemSettingManager.deleteSystemSetting( HELP_PAGE_LINK );
+        
+        assertNull( systemSettingManager.getSystemSetting( APPLICATION_INTRO ) );
+        assertEquals( HELP_PAGE_LINK.getDefaultValue(), systemSettingManager.getSystemSetting( HELP_PAGE_LINK ) );        
     }
 
     @Test

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/user/UserServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/user/UserServiceTest.java	2015-10-06 18:24:42 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/user/UserServiceTest.java	2015-12-08 19:33:06 +0000
@@ -41,13 +41,14 @@
 import org.hisp.dhis.DhisSpringTest;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.setting.Setting;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 
 import com.google.common.collect.Sets;
 
+import static org.hisp.dhis.setting.SettingKey.*;
+
 /**
  * @author Lars Helge Overland
  */
@@ -166,7 +167,7 @@
     @Test
     public void testManagedGroups()
     {
-        systemSettingManager.saveSystemSetting( Setting.CAN_GRANT_OWN_USER_AUTHORITY_GROUPS, true );
+        systemSettingManager.saveSystemSetting( CAN_GRANT_OWN_USER_AUTHORITY_GROUPS, true );
         
         // TODO find way to override in parameters
         
@@ -226,7 +227,7 @@
     @Test
     public void testGetByPhoneNumber()
     {
-        systemSettingManager.saveSystemSetting( Setting.CAN_GRANT_OWN_USER_AUTHORITY_GROUPS, true );
+        systemSettingManager.saveSystemSetting( CAN_GRANT_OWN_USER_AUTHORITY_GROUPS, true );
         
         User userA = createUser( 'A' );
         User userB = createUser( 'B' );
@@ -257,7 +258,7 @@
     @Test
     public void testGetManagedGroups()
     {
-        systemSettingManager.saveSystemSetting( Setting.CAN_GRANT_OWN_USER_AUTHORITY_GROUPS, true );
+        systemSettingManager.saveSystemSetting( CAN_GRANT_OWN_USER_AUTHORITY_GROUPS, true );
         
         User userA = createUser( 'A' );
         User userB = createUser( 'B' );
@@ -347,7 +348,7 @@
     @Test
     public void testGetManagedGroupsLessAuthorities()
     {
-        systemSettingManager.saveSystemSetting( Setting.CAN_GRANT_OWN_USER_AUTHORITY_GROUPS, true );
+        systemSettingManager.saveSystemSetting( CAN_GRANT_OWN_USER_AUTHORITY_GROUPS, true );
         
         User userA = createUser( 'A' );
         User userB = createUser( 'B' );
@@ -430,7 +431,7 @@
     @Test
     public void testGetManagedGroupsLessAuthoritiesDisjointRoles()
     {
-        systemSettingManager.saveSystemSetting( Setting.CAN_GRANT_OWN_USER_AUTHORITY_GROUPS, false );
+        systemSettingManager.saveSystemSetting( CAN_GRANT_OWN_USER_AUTHORITY_GROUPS, false );
         
         User userA = createUser( 'A' );
         User userB = createUser( 'B' );
@@ -518,7 +519,7 @@
     @Test
     public void testGetManagedGroupsSearch()
     {
-        systemSettingManager.saveSystemSetting( Setting.CAN_GRANT_OWN_USER_AUTHORITY_GROUPS, true );
+        systemSettingManager.saveSystemSetting( CAN_GRANT_OWN_USER_AUTHORITY_GROUPS, true );
         
         User userA = createUser( 'A' );
         User userB = createUser( 'B' );
@@ -562,7 +563,7 @@
     @Test
     public void testGetManagedGroupsSelfRegistered()
     {
-        systemSettingManager.saveSystemSetting( Setting.CAN_GRANT_OWN_USER_AUTHORITY_GROUPS, true );
+        systemSettingManager.saveSystemSetting( CAN_GRANT_OWN_USER_AUTHORITY_GROUPS, true );
         
         User userA = createUser( 'A' );
         User userB = createUser( 'B' );
@@ -602,7 +603,7 @@
     @Test
     public void testGetManagedGroupsOrganisationUnit()
     {
-        systemSettingManager.saveSystemSetting( Setting.CAN_GRANT_OWN_USER_AUTHORITY_GROUPS, true );
+        systemSettingManager.saveSystemSetting( CAN_GRANT_OWN_USER_AUTHORITY_GROUPS, true );
         
         User userA = createUser( 'A' );
         User userB = createUser( 'B' );
@@ -645,7 +646,7 @@
     @Test
     public void testGetInvitations()
     {
-        systemSettingManager.saveSystemSetting( Setting.CAN_GRANT_OWN_USER_AUTHORITY_GROUPS, true );
+        systemSettingManager.saveSystemSetting( CAN_GRANT_OWN_USER_AUTHORITY_GROUPS, true );
         
         User userA = createUser( 'A' );
         User userB = createUser( 'B' );

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java	2015-12-04 16:01:39 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java	2015-12-08 19:33:06 +0000
@@ -71,7 +71,7 @@
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.scheduling.TaskId;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.callable.CategoryOptionComboAclCallable;
 import org.hisp.dhis.system.callable.IdentifiableObjectCallable;
@@ -563,12 +563,12 @@
 
         boolean dryRun = dataValueSet.getDryRun() != null ? dataValueSet.getDryRun() : importOptions.isDryRun();
         boolean skipExistingCheck = importOptions.isSkipExistingCheck();
-        boolean strictPeriods = importOptions.isStrictPeriods() || (Boolean) systemSettingManager.getSystemSetting( Setting.DATA_IMPORT_STRICT_PERIODS );
-        boolean strictCategoryOptionCombos = importOptions.isStrictCategoryOptionCombos() || (Boolean) systemSettingManager.getSystemSetting( Setting.DATA_IMPORT_STRICT_CATEGORY_OPTION_COMBOS );
-        boolean strictAttrOptionCombos = importOptions.isStrictAttributeOptionCombos() || (Boolean) systemSettingManager.getSystemSetting( Setting.DATA_IMPORT_STRICT_ATTRIBUTE_OPTION_COMBOS );
-        boolean strictOrgUnits = importOptions.isStrictOrganisationUnits() || (Boolean) systemSettingManager.getSystemSetting( Setting.DATA_IMPORT_STRICT_ORGANISATION_UNITS );
-        boolean requireCategoryOptionCombo = importOptions.isRequireCategoryOptionCombo() || (Boolean) systemSettingManager.getSystemSetting( Setting.DATA_IMPORT_REQUIRE_CATEGORY_OPTION_COMBO );
-        boolean requireAttrOptionCombo = importOptions.isRequireAttributeOptionCombo() || (Boolean) systemSettingManager.getSystemSetting( Setting.DATA_IMPORT_REQUIRE_ATTRIBUTE_OPTION_COMBO );
+        boolean strictPeriods = importOptions.isStrictPeriods() || (Boolean) systemSettingManager.getSystemSetting( SettingKey.DATA_IMPORT_STRICT_PERIODS );
+        boolean strictCategoryOptionCombos = importOptions.isStrictCategoryOptionCombos() || (Boolean) systemSettingManager.getSystemSetting( SettingKey.DATA_IMPORT_STRICT_CATEGORY_OPTION_COMBOS );
+        boolean strictAttrOptionCombos = importOptions.isStrictAttributeOptionCombos() || (Boolean) systemSettingManager.getSystemSetting( SettingKey.DATA_IMPORT_STRICT_ATTRIBUTE_OPTION_COMBOS );
+        boolean strictOrgUnits = importOptions.isStrictOrganisationUnits() || (Boolean) systemSettingManager.getSystemSetting( SettingKey.DATA_IMPORT_STRICT_ORGANISATION_UNITS );
+        boolean requireCategoryOptionCombo = importOptions.isRequireCategoryOptionCombo() || (Boolean) systemSettingManager.getSystemSetting( SettingKey.DATA_IMPORT_REQUIRE_CATEGORY_OPTION_COMBO );
+        boolean requireAttrOptionCombo = importOptions.isRequireAttributeOptionCombo() || (Boolean) systemSettingManager.getSystemSetting( SettingKey.DATA_IMPORT_REQUIRE_ATTRIBUTE_OPTION_COMBO );
 
         //----------------------------------------------------------------------
         // Create meta-data maps

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/synch/DefaultSynchronizationManager.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/synch/DefaultSynchronizationManager.java	2015-12-04 05:41:43 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/synch/DefaultSynchronizationManager.java	2015-12-08 19:33:06 +0000
@@ -46,7 +46,7 @@
 import org.hisp.dhis.dxf2.importsummary.ImportSummary;
 import org.hisp.dhis.dxf2.metadata.ImportService;
 import org.hisp.dhis.dxf2.metadata.MetaData;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.util.CodecUtils;
 import org.hisp.dhis.user.CurrentUserService;
@@ -236,7 +236,7 @@
     @Override
     public Date getLastSynchSuccess()
     {
-        return (Date) systemSettingManager.getSystemSetting( Setting.LAST_SUCCESSFUL_DATA_SYNC );
+        return (Date) systemSettingManager.getSystemSetting( SettingKey.LAST_SUCCESSFUL_DATA_SYNC );
     }
 
     @Override
@@ -278,7 +278,7 @@
     {
         Date fallback = new DateTime().minusDays( 3 ).toDate();
 
-        return (Date) systemSettingManager.getSystemSetting( Setting.LAST_SUCCESSFUL_DATA_SYNC, fallback );
+        return (Date) systemSettingManager.getSystemSetting( SettingKey.LAST_SUCCESSFUL_DATA_SYNC, fallback );
     }
 
     /**
@@ -286,7 +286,7 @@
      */
     private void setLastSynchSuccess( Date time )
     {
-        systemSettingManager.saveSystemSetting( Setting.LAST_SUCCESSFUL_DATA_SYNC, time );
+        systemSettingManager.saveSystemSetting( SettingKey.LAST_SUCCESSFUL_DATA_SYNC, time );
     }
 
     /**

=== modified file 'dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/scheduling/CaseAggregateConditionTask.java'
--- dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/scheduling/CaseAggregateConditionTask.java	2015-10-06 17:44:37 +0000
+++ dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/scheduling/CaseAggregateConditionTask.java	2015-12-08 19:33:06 +0000
@@ -35,7 +35,7 @@
 
 import org.hisp.dhis.caseaggregation.CaseAggregateSchedule;
 import org.hisp.dhis.caseaggregation.CaseAggregationConditionService;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.notification.Notifier;
 import org.hisp.dhis.system.util.Clock;
@@ -101,7 +101,7 @@
             "Aggregate process started, number of CPU cores: " + cpuCores + ", " + SystemUtils.getMemoryString() );
         notifier.clear( taskId ).notify( taskId, "Aggregate process started" );
 
-        String taskStrategy = (String) systemSettingManager.getSystemSetting( Setting.SCHEDULE_AGGREGATE_QUERY_BUILDER_TASK_STRATEGY );
+        String taskStrategy = (String) systemSettingManager.getSystemSetting( SettingKey.SCHEDULE_AGGREGATE_QUERY_BUILDER_TASK_STRATEGY );
 
         String sql = "select cagg.caseaggregationconditionid as caseaggregationconditionid, cagg.name as caseaggregationconditionname, pt.name as periodtypename ";
         sql += "from caseaggregationcondition cagg inner join datasetmembers dm  ";

=== modified file 'dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/scheduling/DefaultCaseAggregateConditionSchedulingManager.java'
--- dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/scheduling/DefaultCaseAggregateConditionSchedulingManager.java	2015-11-27 15:15:24 +0000
+++ dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/scheduling/DefaultCaseAggregateConditionSchedulingManager.java	2015-12-08 19:33:06 +0000
@@ -31,7 +31,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.scheduling.ScheduledTaskStatus;
 import org.hisp.dhis.system.scheduling.Scheduler;
@@ -94,7 +94,7 @@
     @Override
     public void scheduleTasks( Map<String, String> keyCronMap )
     {
-        systemSettingManager.saveSystemSetting( Setting.SCHEDULE_AGGREGATE_QUERY_BUILDER_TASKS,
+        systemSettingManager.saveSystemSetting( SettingKey.SCHEDULE_AGGREGATE_QUERY_BUILDER_TASKS,
             new HashMap<>( keyCronMap ) );
 
         scheduleTasks();
@@ -103,7 +103,7 @@
     @Override
     public void stopTasks()
     {
-        systemSettingManager.saveSystemSetting( Setting.SCHEDULE_AGGREGATE_QUERY_BUILDER_TASKS , null );
+        systemSettingManager.saveSystemSetting( SettingKey.SCHEDULE_AGGREGATE_QUERY_BUILDER_TASKS , null );
 
         scheduler.stopAllTasks();
     }
@@ -128,7 +128,7 @@
     @SuppressWarnings( "unchecked" )
     public Map<String, String> getScheduledTasks()
     {
-        return (Map<String, String>) systemSettingManager.getSystemSetting( Setting.SCHEDULE_AGGREGATE_QUERY_BUILDER_TASKS,
+        return (Map<String, String>) systemSettingManager.getSystemSetting( SettingKey.SCHEDULE_AGGREGATE_QUERY_BUILDER_TASKS,
             new HashMap<String, String>() );
     }
 

=== modified file 'dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/scheduling/DefaultProgramSchedulingManager.java'
--- dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/scheduling/DefaultProgramSchedulingManager.java	2015-11-27 15:15:24 +0000
+++ dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/scheduling/DefaultProgramSchedulingManager.java	2015-12-08 19:33:06 +0000
@@ -31,7 +31,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.scheduling.ScheduledTaskStatus;
 import org.hisp.dhis.system.scheduling.Scheduler;
@@ -92,7 +92,7 @@
     @Override
     public void scheduleTasks( Map<String, String> keyCronMap )
     {
-        systemSettingManager.saveSystemSetting( Setting.SEND_MESSAGE_SCHEDULED_TASKS, new HashMap<>( keyCronMap ) );
+        systemSettingManager.saveSystemSetting( SettingKey.SEND_MESSAGE_SCHEDULED_TASKS, new HashMap<>( keyCronMap ) );
         
         scheduleTasks();
     }
@@ -100,7 +100,7 @@
     @Override
     public void stopTasks()
     {
-        systemSettingManager.saveSystemSetting( Setting.SEND_MESSAGE_SCHEDULED_TASKS, null );
+        systemSettingManager.saveSystemSetting( SettingKey.SEND_MESSAGE_SCHEDULED_TASKS, null );
         
         scheduler.stopAllTasks();
     }
@@ -125,7 +125,7 @@
     @SuppressWarnings("unchecked")
     public Map<String, String> getScheduledTasks()
     {
-        return (Map<String, String>) systemSettingManager.getSystemSetting( Setting.SEND_MESSAGE_SCHEDULED_TASKS, new HashMap<String, String>() );
+        return (Map<String, String>) systemSettingManager.getSystemSetting( SettingKey.SEND_MESSAGE_SCHEDULED_TASKS, new HashMap<String, String>() );
     }
     
     @Override

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/scheduling/DefaultSchedulingManager.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/scheduling/DefaultSchedulingManager.java	2015-11-27 15:15:24 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/scheduling/DefaultSchedulingManager.java	2015-12-08 19:33:06 +0000
@@ -34,7 +34,7 @@
 import java.util.Set;
 
 import org.hisp.dhis.common.ListMap;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.scheduling.ScheduledTaskStatus;
 import org.hisp.dhis.system.scheduling.Scheduler;
@@ -98,7 +98,7 @@
     @Override
     public void scheduleTasks( ListMap<String, String> cronKeyMap )
     {
-        systemSettingManager.saveSystemSetting( Setting.SCHEDULED_TASKS, new ListMap<>( cronKeyMap ) );
+        systemSettingManager.saveSystemSetting( SettingKey.SCHEDULED_TASKS, new ListMap<>( cronKeyMap ) );
         
         scheduleTasks();
     }
@@ -106,7 +106,7 @@
     @Override
     public void stopTasks()
     {
-        systemSettingManager.saveSystemSetting( Setting.SCHEDULED_TASKS, null );
+        systemSettingManager.saveSystemSetting( SettingKey.SCHEDULED_TASKS, null );
         
         scheduler.stopAllTasks();
     }
@@ -115,7 +115,7 @@
     @SuppressWarnings("unchecked")
     public ListMap<String, String> getCronKeyMap()
     {
-        return (ListMap<String, String>) systemSettingManager.getSystemSetting( Setting.SCHEDULED_TASKS, new ListMap<String, String>() );
+        return (ListMap<String, String>) systemSettingManager.getSystemSetting( SettingKey.SCHEDULED_TASKS, new ListMap<String, String>() );
     }
     
     @Override

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AppController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AppController.java	2015-12-02 19:43:42 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AppController.java	2015-12-08 19:33:06 +0000
@@ -38,7 +38,7 @@
 import org.hisp.dhis.dxf2.webmessage.WebMessageException;
 import org.hisp.dhis.external.location.LocationManager;
 import org.hisp.dhis.hibernate.exception.ReadAccessDeniedException;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.system.util.DateUtils;
 import org.hisp.dhis.webapi.utils.ContextUtils;
 import org.hisp.dhis.webapi.utils.WebMessageUtils;
@@ -249,9 +249,9 @@
             throw new WebMessageException( WebMessageUtils.conflict( "No config specified" ) );
         }
 
-        String appBaseUrl = StringUtils.trimToNull( config.get( Setting.APP_BASE_URL.getName() ) );
-        String appFolderPath = StringUtils.trimToNull( config.get( Setting.APP_FOLDER_PATH.getName() ) );
-        String appStoreUrl = StringUtils.trimToNull( config.get( Setting.APP_STORE_URL.getName() ) );
+        String appBaseUrl = StringUtils.trimToNull( config.get( SettingKey.APP_BASE_URL.getName() ) );
+        String appFolderPath = StringUtils.trimToNull( config.get( SettingKey.APP_FOLDER_PATH.getName() ) );
+        String appStoreUrl = StringUtils.trimToNull( config.get( SettingKey.APP_STORE_URL.getName() ) );
 
         if ( appBaseUrl != null )
         {
@@ -285,7 +285,7 @@
     @RequestMapping( value = "/appStore", method = RequestMethod.GET, produces = "application/json" )
     public @ResponseBody String getAppStoreUrl()
     {
-        return restTemplate.getForObject( Setting.APP_STORE_INDEX_URL.getDefaultValue().toString(), String.class );
+        return restTemplate.getForObject( SettingKey.APP_STORE_INDEX_URL.getDefaultValue().toString(), String.class );
     }
     
     //--------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueController.java	2015-11-18 17:38:41 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueController.java	2015-12-08 19:33:06 +0000
@@ -60,7 +60,7 @@
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.util.ValidationUtils;
 import org.hisp.dhis.user.CurrentUserService;
@@ -137,10 +137,10 @@
         @RequestParam( required = false ) boolean followUp, HttpServletResponse response )
         throws WebMessageException
     {
-        boolean strictPeriods = (Boolean) systemSettingManager.getSystemSetting( Setting.DATA_IMPORT_STRICT_PERIODS );
-        boolean strictCategoryOptionCombos = (Boolean) systemSettingManager.getSystemSetting( Setting.DATA_IMPORT_STRICT_CATEGORY_OPTION_COMBOS );
-        boolean strictOrgUnits = (Boolean) systemSettingManager.getSystemSetting( Setting.DATA_IMPORT_STRICT_ORGANISATION_UNITS );
-        boolean requireCategoryOptionCombo = (Boolean) systemSettingManager.getSystemSetting( Setting.DATA_IMPORT_REQUIRE_CATEGORY_OPTION_COMBO );
+        boolean strictPeriods = (Boolean) systemSettingManager.getSystemSetting( SettingKey.DATA_IMPORT_STRICT_PERIODS );
+        boolean strictCategoryOptionCombos = (Boolean) systemSettingManager.getSystemSetting( SettingKey.DATA_IMPORT_STRICT_CATEGORY_OPTION_COMBOS );
+        boolean strictOrgUnits = (Boolean) systemSettingManager.getSystemSetting( SettingKey.DATA_IMPORT_STRICT_ORGANISATION_UNITS );
+        boolean requireCategoryOptionCombo = (Boolean) systemSettingManager.getSystemSetting( SettingKey.DATA_IMPORT_REQUIRE_CATEGORY_OPTION_COMBO );
         
         // ---------------------------------------------------------------------
         // Input validation

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileController.java	2015-10-06 21:55:05 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileController.java	2015-12-08 19:33:06 +0000
@@ -29,7 +29,7 @@
  */
 
 import org.apache.commons.lang3.StringUtils;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.webapi.service.WebMessageService;
 import org.hisp.dhis.webapi.utils.ContextUtils;
@@ -76,7 +76,7 @@
     {
         contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_JAVASCRIPT, CacheStrategy.CACHE_TWO_WEEKS );
 
-        String content = (String) systemSettingManager.getSystemSetting( Setting.CUSTOM_JS, StringUtils.EMPTY );
+        String content = (String) systemSettingManager.getSystemSetting( SettingKey.CUSTOM_JS, StringUtils.EMPTY );
 
         writer.write( content );
     }
@@ -87,7 +87,7 @@
     {
         if ( content != null )
         {
-            systemSettingManager.saveSystemSetting( Setting.CUSTOM_JS, content );
+            systemSettingManager.saveSystemSetting( SettingKey.CUSTOM_JS, content );
             webMessageService.send( WebMessageUtils.ok( "Custom script created" ), response, request );
         }
     }
@@ -96,7 +96,7 @@
     @PreAuthorize( "hasRole('ALL') or hasRole('F_INSERT_CUSTOM_JS_CSS')" )
     public void removeCustomScript( HttpServletResponse response )
     {
-        systemSettingManager.deleteSystemSetting( Setting.CUSTOM_JS );
+        systemSettingManager.deleteSystemSetting( SettingKey.CUSTOM_JS );
     }
 
     // -------------------------------------------------------------------------
@@ -112,7 +112,7 @@
     {
         contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_CSS, CacheStrategy.CACHE_TWO_WEEKS );
 
-        String content = (String) systemSettingManager.getSystemSetting( Setting.CUSTOM_CSS, StringUtils.EMPTY );
+        String content = (String) systemSettingManager.getSystemSetting( SettingKey.CUSTOM_CSS, StringUtils.EMPTY );
 
         writer.write( content );
     }
@@ -123,7 +123,7 @@
     {
         if ( content != null )
         {
-            systemSettingManager.saveSystemSetting( Setting.CUSTOM_CSS, content );
+            systemSettingManager.saveSystemSetting( SettingKey.CUSTOM_CSS, content );
             webMessageService.send( WebMessageUtils.ok( "Custom style created" ), response, request );
         }
     }
@@ -132,6 +132,6 @@
     @PreAuthorize( "hasRole('ALL') or hasRole('F_INSERT_CUSTOM_JS_CSS')" )
     public void removeCustomStyle( HttpServletResponse response )
     {
-        systemSettingManager.deleteSystemSetting( Setting.CUSTOM_CSS );
+        systemSettingManager.deleteSystemSetting( SettingKey.CUSTOM_CSS );
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java	2015-10-12 17:55:30 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java	2015-12-08 19:33:06 +0000
@@ -42,7 +42,7 @@
 import org.hisp.dhis.dxf2.webmessage.WebMessageStatus;
 import org.hisp.dhis.external.location.LocationManager;
 import org.hisp.dhis.external.location.LocationManagerException;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.StyleManager;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.webapi.utils.WebMessageUtils;
@@ -79,9 +79,9 @@
     private static final String LOGO_BANNER = "logo_banner";
     private static final String LOGO_FRONT = "logo_front";
 
-    private static final Map<String, Setting> KEY_WHITELIST_MAP = ImmutableMap.<String, Setting>builder().
-        put( LOGO_BANNER, Setting.USE_CUSTOM_LOGO_BANNER ).
-        put( LOGO_FRONT, Setting.USE_CUSTOM_LOGO_FRONT ).build();
+    private static final Map<String, SettingKey> KEY_WHITELIST_MAP = ImmutableMap.<String, SettingKey>builder().
+        put( LOGO_BANNER, SettingKey.USE_CUSTOM_LOGO_BANNER ).
+        put( LOGO_FRONT, SettingKey.USE_CUSTOM_LOGO_FRONT ).build();
 
     /**
      * Serves the PNG associated with the key. If custom logo is not used the

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SynchronizationController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SynchronizationController.java	2015-11-05 22:31:39 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SynchronizationController.java	2015-12-08 19:33:06 +0000
@@ -32,7 +32,7 @@
 import org.hisp.dhis.dxf2.render.RenderService;
 import org.hisp.dhis.dxf2.synch.AvailabilityStatus;
 import org.hisp.dhis.dxf2.synch.SynchronizationManager;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Controller;
@@ -96,6 +96,6 @@
     @RequestMapping( value = "/metadataRepo", method = RequestMethod.GET, produces = "application/json" )
     public @ResponseBody String getMetadataRepoIndex()
     {
-        return restTemplate.getForObject( Setting.METADATA_REPO_URL.getDefaultValue().toString(), String.class );
+        return restTemplate.getForObject( SettingKey.METADATA_REPO_URL.getDefaultValue().toString(), String.class );
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.java	2015-10-06 17:44:37 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.java	2015-12-08 19:33:06 +0000
@@ -38,7 +38,7 @@
 
 import org.hisp.dhis.dxf2.render.RenderService;
 import org.hisp.dhis.dxf2.webmessage.WebMessageException;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.util.ObjectUtils;
 import org.hisp.dhis.webapi.service.WebMessageService;
@@ -96,7 +96,7 @@
 
         value = ObjectUtils.firstNonNull( value, valuePayload );
         
-        Serializable valueObject = Setting.getAsRealClass( key, value );
+        Serializable valueObject = SettingKey.getAsRealClass( key, value );
         
         systemSettingManager.saveSystemSetting( key, valueObject );
 

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/ContextUtils.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/ContextUtils.java	2015-10-06 17:44:37 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/ContextUtils.java	2015-12-08 19:33:06 +0000
@@ -46,7 +46,7 @@
 import org.hisp.dhis.common.IdentifiableObject;
 import org.hisp.dhis.common.IdentifiableObjectUtils;
 import org.hisp.dhis.common.cache.CacheStrategy;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.util.CodecUtils;
 import org.hisp.dhis.system.util.DateUtils;
@@ -104,7 +104,7 @@
 
         if ( cacheStrategy.equals( CacheStrategy.RESPECT_SYSTEM_SETTING ) )
         {
-            String strategy = trimToNull( (String) systemSettingManager.getSystemSetting( Setting.CACHE_STRATEGY ) );
+            String strategy = trimToNull( (String) systemSettingManager.getSystemSetting( SettingKey.CACHE_STRATEGY ) );
 
             cacheStrategy = strategy != null ? CacheStrategy.valueOf( strategy ) : CacheStrategy.NO_CACHE;
         }

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/RedirectAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/RedirectAction.java	2015-10-15 16:53:09 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/RedirectAction.java	2015-12-08 19:33:06 +0000
@@ -31,7 +31,7 @@
 import com.opensymphony.xwork2.Action;
 import org.hisp.dhis.appmanager.App;
 import org.hisp.dhis.appmanager.AppManager;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.springframework.beans.factory.annotation.Autowired;
 
@@ -60,7 +60,7 @@
     public String execute()
         throws Exception
     {
-        String startModule = (String) systemSettingManager.getSystemSetting( Setting.START_MODULE );
+        String startModule = (String) systemSettingManager.getSystemSetting( SettingKey.START_MODULE );
 
         if ( startModule != null && !startModule.trim().isEmpty() )
         {

=== 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-22 22:26:41 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java	2015-12-08 19:33:06 +0000
@@ -36,7 +36,7 @@
 
 import org.hisp.dhis.calendar.CalendarService;
 import org.hisp.dhis.configuration.ConfigurationService;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.springframework.beans.factory.annotation.Autowired;
 
@@ -53,12 +53,12 @@
     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,
-        Setting.FLAG, Setting.START_MODULE, Setting.MULTI_ORGANISATION_UNIT_FORMS, Setting.ACCOUNT_RECOVERY,
-        Setting.APP_BASE_URL, Setting.INSTANCE_BASE_URL, Setting.GOOGLE_ANALYTICS_UA, Setting.OPENID_PROVIDER,
-        Setting.OPENID_PROVIDER_LABEL, Setting.HELP_PAGE_LINK, Setting.REQUIRE_ADD_TO_VIEW, Setting.ALLOW_OBJECT_ASSIGNMENT,
-        Setting.CALENDAR, Setting.DATE_FORMAT );
+    private static final Set<SettingKey> SETTINGS = Sets.newHashSet( SettingKey.APPLICATION_TITLE, SettingKey.APPLICATION_INTRO,
+        SettingKey.APPLICATION_NOTIFICATION, SettingKey.APPLICATION_FOOTER, SettingKey.APPLICATION_RIGHT_FOOTER,
+        SettingKey.FLAG, SettingKey.START_MODULE, SettingKey.MULTI_ORGANISATION_UNIT_FORMS, SettingKey.ACCOUNT_RECOVERY,
+        SettingKey.APP_BASE_URL, SettingKey.INSTANCE_BASE_URL, SettingKey.GOOGLE_ANALYTICS_UA, SettingKey.OPENID_PROVIDER,
+        SettingKey.OPENID_PROVIDER_LABEL, SettingKey.HELP_PAGE_LINK, SettingKey.REQUIRE_ADD_TO_VIEW, SettingKey.ALLOW_OBJECT_ASSIGNMENT,
+        SettingKey.CALENDAR, SettingKey.DATE_FORMAT );
     
     // -------------------------------------------------------------------------
     // Dependencies
@@ -102,10 +102,10 @@
         Map<String, Object> map = new HashMap<>();
         
         map.put( DATE_FORMAT, calendarService.getSystemDateFormat() );
-        map.put( Setting.CONFIGURATION.getName(), configurationService.getConfiguration() );
-        map.put( Setting.FLAG_IMAGE.getName(), systemSettingManager.getFlagImage() );
-        map.put( Setting.CREDENTIALS_EXPIRES.getName(), systemSettingManager.credentialsExpires() );
-        map.put( Setting.SELF_REGISTRATION_NO_RECAPTCHA.getName(), systemSettingManager.selfRegistrationNoRecaptcha() );
+        map.put( SettingKey.CONFIGURATION.getName(), configurationService.getConfiguration() );
+        map.put( SettingKey.FLAG_IMAGE.getName(), systemSettingManager.getFlagImage() );
+        map.put( SettingKey.CREDENTIALS_EXPIRES.getName(), systemSettingManager.credentialsExpires() );
+        map.put( SettingKey.SELF_REGISTRATION_NO_RECAPTCHA.getName(), systemSettingManager.selfRegistrationNoRecaptcha() );
         map.put( SYSPROP_PORTAL, defaultIfEmpty( System.getProperty( SYSPROP_PORTAL ), String.valueOf( false ) ) );
         
         map.putAll( systemSettingManager.getSystemSettings( SETTINGS ) );

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/utils/FormUtilsImpl.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/utils/FormUtilsImpl.java	2015-10-06 18:35:24 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/utils/FormUtilsImpl.java	2015-12-08 19:33:06 +0000
@@ -53,7 +53,7 @@
 import org.hisp.dhis.period.CalendarPeriodType;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.YearlyPeriodType;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.filter.OrganisationUnitWithDataSetsFilter;
 import org.hisp.dhis.system.filter.PastAndCurrentPeriodFilter;
@@ -154,7 +154,7 @@
     {
         Map<String, DeflatedDataValue> validationErrorMap = new HashMap<>();
 
-        Double factor = (Double) systemSettingManager.getSystemSetting( Setting.FACTOR_OF_DEVIATION );
+        Double factor = (Double) systemSettingManager.getSystemSetting( SettingKey.FACTOR_OF_DEVIATION );
 
         Date from = new DateTime( period.getStartDate() ).minusYears( 2 ).toDate();
         

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/GenerateMinMaxValuesAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/GenerateMinMaxValuesAction.java	2015-10-06 17:53:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/minmaxvalidation/GenerateMinMaxValuesAction.java	2015-12-08 19:33:06 +0000
@@ -40,7 +40,7 @@
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.oust.manager.SelectionTreeManager;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 
 import com.opensymphony.xwork2.Action;
@@ -152,7 +152,7 @@
         Collection<OrganisationUnit> orgUnits = organisationUnitService.getOrganisationUnitWithChildren( unit.getId() );
         
         Double factor = (Double) systemSettingManager.
-            getSystemSetting( Setting.FACTOR_OF_DEVIATION );
+            getSystemSetting( SettingKey.FACTOR_OF_DEVIATION );
 
         Collection<DataElement> dataElements = new HashSet<>();
         

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/scheduling/ScheduleTasksAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/scheduling/ScheduleTasksAction.java	2015-11-27 15:15:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/scheduling/ScheduleTasksAction.java	2015-12-08 19:33:06 +0000
@@ -49,7 +49,7 @@
 import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.scheduling.SchedulingManager;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.scheduling.ScheduledTaskStatus;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -315,9 +315,9 @@
 
         levels = organisationUnitService.getOrganisationUnitLevels();
 
-        lastResourceTableSuccess = (Date) systemSettingManager.getSystemSetting( Setting.LAST_SUCCESSFUL_RESOURCE_TABLES_UPDATE );
-        lastAnalyticsTableSuccess = (Date) systemSettingManager.getSystemSetting( Setting.LAST_SUCCESSFUL_ANALYTICS_TABLES_UPDATE );
-        lastMonitoringSuccess = (Date) systemSettingManager.getSystemSetting( Setting.LAST_SUCCESSFUL_MONITORING );
+        lastResourceTableSuccess = (Date) systemSettingManager.getSystemSetting( SettingKey.LAST_SUCCESSFUL_RESOURCE_TABLES_UPDATE );
+        lastAnalyticsTableSuccess = (Date) systemSettingManager.getSystemSetting( SettingKey.LAST_SUCCESSFUL_ANALYTICS_TABLES_UPDATE );
+        lastMonitoringSuccess = (Date) systemSettingManager.getSystemSetting( SettingKey.LAST_SUCCESSFUL_MONITORING );
         lastDataSyncSuccess = synchronizationManager.getLastSynchSuccess();
 
         log.info( "Status: " + status );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/schedule/GetScheduleAggQueryBuilderParamsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/schedule/GetScheduleAggQueryBuilderParamsAction.java	2015-11-27 15:15:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/schedule/GetScheduleAggQueryBuilderParamsAction.java	2015-12-08 19:33:06 +0000
@@ -29,7 +29,7 @@
  */
 
 import org.hisp.dhis.scheduling.CaseAggregateConditionSchedulingManager;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.scheduling.ScheduledTaskStatus;
 
@@ -92,7 +92,7 @@
     public String execute()
         throws Exception
     {
-        taskStrategy = (String) systemSettingManager.getSystemSetting( Setting.SCHEDULE_AGGREGATE_QUERY_BUILDER_TASK_STRATEGY );
+        taskStrategy = (String) systemSettingManager.getSystemSetting( SettingKey.SCHEDULE_AGGREGATE_QUERY_BUILDER_TASK_STRATEGY );
 
         status = schedulingManager.getTaskStatus();
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/schedule/GetScheduleParamsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/schedule/GetScheduleParamsAction.java	2015-11-27 15:15:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/schedule/GetScheduleParamsAction.java	2015-12-08 19:33:06 +0000
@@ -29,7 +29,7 @@
  */
 
 import org.hisp.dhis.scheduling.ProgramSchedulingManager;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.scheduling.ScheduledTaskStatus;
 
@@ -94,7 +94,7 @@
     public String execute()
         throws Exception
     {
-        timeSendingMessage = (String)systemSettingManager.getSystemSetting( Setting.TIME_FOR_SENDING_MESSAGE );
+        timeSendingMessage = (String)systemSettingManager.getSystemSetting( SettingKey.TIME_FOR_SENDING_MESSAGE );
         
         status = schedulingManager.getTaskStatus();
         running = ScheduledTaskStatus.RUNNING.equals( status );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/schedule/ScheduleCaseAggregateConditionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/schedule/ScheduleCaseAggregateConditionAction.java	2015-11-27 15:15:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/schedule/ScheduleCaseAggregateConditionAction.java	2015-12-08 19:33:06 +0000
@@ -32,7 +32,7 @@
 import java.util.Map;
 
 import org.hisp.dhis.scheduling.CaseAggregateConditionSchedulingManager;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.scheduling.ScheduledTaskStatus;
 import org.hisp.dhis.system.scheduling.Scheduler;
@@ -121,7 +121,7 @@
             }
             else
             {
-                systemSettingManager.saveSystemSetting( Setting.SCHEDULE_AGGREGATE_QUERY_BUILDER_TASK_STRATEGY,
+                systemSettingManager.saveSystemSetting( SettingKey.SCHEDULE_AGGREGATE_QUERY_BUILDER_TASK_STRATEGY,
                     taskStrategy );
 
                 Map<String, String> keyCronMap = new HashMap<>();

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/schedule/ScheduleSendMessageTasksAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/schedule/ScheduleSendMessageTasksAction.java	2015-11-27 15:15:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/schedule/ScheduleSendMessageTasksAction.java	2015-12-08 19:33:06 +0000
@@ -35,7 +35,7 @@
 import org.hisp.dhis.scheduling.SendScheduledMessageTask;
 import org.hisp.dhis.scheduling.TaskCategory;
 import org.hisp.dhis.scheduling.TaskId;
-import org.hisp.dhis.setting.Setting;
+import org.hisp.dhis.setting.SettingKey;
 import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.system.notification.Notifier;
 import org.hisp.dhis.system.scheduling.ScheduledTaskStatus;
@@ -137,7 +137,7 @@
         notifier.clear( taskId );
         sendMessageScheduled.setTaskId( taskId );
 
-        systemSettingManager.saveSystemSetting( Setting.TIME_FOR_SENDING_MESSAGE, timeSendingMessage );
+        systemSettingManager.saveSystemSetting( SettingKey.TIME_FOR_SENDING_MESSAGE, timeSendingMessage );
 
         if ( execute )
         {
@@ -152,7 +152,7 @@
             else
             {
                 Map<String, String> keyCronMap = new HashMap<>();
-                String time = (String) systemSettingManager.getSystemSetting( Setting.TIME_FOR_SENDING_MESSAGE );
+                String time = (String) systemSettingManager.getSystemSetting( SettingKey.TIME_FOR_SENDING_MESSAGE );
 
                 // Schedule for sending messages
                 String[] infor = time.split( ":" );
@@ -170,8 +170,8 @@
                 
                 String cron = "0 " + Integer.parseInt( minute ) + " " + Integer.parseInt( hour ) + " ? * *";
 
-                keyCronMap.put( Setting.SEND_MESSAGE_SCHEDULED_TASKS.getName(), cron );
-                keyCronMap.put( Setting.SCHEDULE_MESSAGE_TASKS.getName(), "0 0 0 * * ?" );
+                keyCronMap.put( SettingKey.SEND_MESSAGE_SCHEDULED_TASKS.getName(), cron );
+                keyCronMap.put( SettingKey.SCHEDULE_MESSAGE_TASKS.getName(), "0 0 0 * * ?" );
 
                 schedulingManager.scheduleTasks( keyCronMap );
             }