← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20186: API, cleanup

 

------------------------------------------------------------
revno: 20186
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-09-16 17:14:04 +0200
message:
  API, cleanup
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/appmanager/AppManager.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/BaseIdentifiableObjectXmlAdapter.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/JacksonOrganisationUnitChildrenSerializer.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/JacksonOrganisationUnitGroupSymbolSerializer.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/JacksonPeriodDeserializer.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/ParametersMapXmlAdapter.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardSearchResult.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalLevel.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalLevelService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodType.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/ReportService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationResult.java
  dhis-2/dhis-api/src/test/java/org/hisp/dhis/common/AccessStringHelperTest.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/appmanager/AppManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/appmanager/AppManager.java	2015-09-16 14:49:50 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/appmanager/AppManager.java	2015-09-16 15:14:04 +0000
@@ -39,7 +39,7 @@
  */
 public interface AppManager
 {
-    final String ID = AppManager.class.getName();
+    String ID = AppManager.class.getName();
 
     String KEY_APP_FOLDER_PATH = "appFolderPath";
     String KEY_APP_BASE_URL = "appBaseUrl";

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/BaseIdentifiableObjectXmlAdapter.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/BaseIdentifiableObjectXmlAdapter.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/BaseIdentifiableObjectXmlAdapter.java	2015-09-16 15:14:04 +0000
@@ -38,13 +38,13 @@
 public class BaseIdentifiableObjectXmlAdapter extends XmlAdapter<BaseIdentifiableObject, BaseIdentifiableObject>
 {
     @Override
-    public BaseIdentifiableObject unmarshal( BaseIdentifiableObject baseIdentifiableObject ) throws Exception
+    public BaseIdentifiableObject unmarshal( BaseIdentifiableObject baseIdentifiableObject )
     {
         return baseIdentifiableObject;
     }
 
     @Override
-    public BaseIdentifiableObject marshal( BaseIdentifiableObject baseIdentifiableObject ) throws Exception
+    public BaseIdentifiableObject marshal( BaseIdentifiableObject baseIdentifiableObject )
     {
         if ( baseIdentifiableObject != null )
         {

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/JacksonOrganisationUnitChildrenSerializer.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/JacksonOrganisationUnitChildrenSerializer.java	2015-09-16 14:49:50 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/JacksonOrganisationUnitChildrenSerializer.java	2015-09-16 15:14:04 +0000
@@ -48,7 +48,7 @@
  */
 public class JacksonOrganisationUnitChildrenSerializer extends JsonSerializer<OrganisationUnit>
 {
-    private static DateFormat format = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ssZ" );
+    private static DateFormat DATE_FORMAT = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ssZ" );
 
     @Override
     public void serialize( OrganisationUnit value, JsonGenerator jgen, SerializerProvider provider ) throws IOException
@@ -64,8 +64,8 @@
                 staxWriter.writeStartElement( DxfNamespaces.DXF_2_0, "child" );
                 staxWriter.writeAttribute( "id", value.getUid() );
                 staxWriter.writeAttribute( "name", value.getName() );
-                staxWriter.writeAttribute( "created", format.format( value.getCreated() ) );
-                staxWriter.writeAttribute( "lastUpdated", format.format( value.getLastUpdated() ) );
+                staxWriter.writeAttribute( "created", DATE_FORMAT.format( value.getCreated() ) );
+                staxWriter.writeAttribute( "lastUpdated", DATE_FORMAT.format( value.getLastUpdated() ) );
 
                 if ( value.getHref() != null )
                 {

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/JacksonOrganisationUnitGroupSymbolSerializer.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/JacksonOrganisationUnitGroupSymbolSerializer.java	2015-09-16 14:49:50 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/JacksonOrganisationUnitGroupSymbolSerializer.java	2015-09-16 15:14:04 +0000
@@ -46,7 +46,7 @@
  */
 public class JacksonOrganisationUnitGroupSymbolSerializer extends JsonSerializer<OrganisationUnitGroup>
 {
-    private static DateFormat format = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ssZ" );
+    private static DateFormat DATE_FORMAT = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ssZ" );
 
     @Override
     public void serialize( OrganisationUnitGroup value, JsonGenerator jgen, SerializerProvider provider ) throws IOException
@@ -62,8 +62,8 @@
                 staxWriter.writeStartElement( DxfNamespaces.DXF_2_0, "organisationUnitGroup" );
                 staxWriter.writeAttribute( "id", value.getUid() );
                 staxWriter.writeAttribute( "name", value.getName() );
-                staxWriter.writeAttribute( "created", format.format( value.getCreated() ) );
-                staxWriter.writeAttribute( "lastUpdated", format.format( value.getLastUpdated() ) );
+                staxWriter.writeAttribute( "created", DATE_FORMAT.format( value.getCreated() ) );
+                staxWriter.writeAttribute( "lastUpdated", DATE_FORMAT.format( value.getLastUpdated() ) );
 
                 if ( value.getHref() != null )
                 {

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/JacksonPeriodDeserializer.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/JacksonPeriodDeserializer.java	2015-03-26 14:31:29 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/JacksonPeriodDeserializer.java	2015-09-16 15:14:04 +0000
@@ -78,8 +78,8 @@
     public Period deserialize( JsonParser jp, DeserializationContext ctxt )
         throws IOException
     {
-        LocalPeriod p = jp.readValueAs( LocalPeriod.class );
+        LocalPeriod period = jp.readValueAs( LocalPeriod.class );
 
-        return p.getId() == null ? null : PeriodType.getPeriodFromIsoString( p.getId() );
+        return period.getId() == null ? null : PeriodType.getPeriodFromIsoString( period.getId() );
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/ParametersMapXmlAdapter.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/ParametersMapXmlAdapter.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/adapter/ParametersMapXmlAdapter.java	2015-09-16 15:14:04 +0000
@@ -39,7 +39,6 @@
 {
     @Override
     public Parameters marshal( Map<String, String> v )
-        throws Exception
     {
         ArrayList<Parameter> list = new ArrayList<>();
 
@@ -53,7 +52,6 @@
 
     @Override
     public Map<String, String> unmarshal( Parameters v )
-        throws Exception
     {
         Map<String, String> map = new HashMap<>();
         

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardSearchResult.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardSearchResult.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardSearchResult.java	2015-09-16 15:14:04 +0000
@@ -107,7 +107,7 @@
     }
     
     @JsonProperty
-    private int getEventChartCount()
+    public int getEventChartCount()
     {
         return eventCharts.size();
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalLevel.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalLevel.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalLevel.java	2015-09-16 15:14:04 +0000
@@ -122,7 +122,7 @@
      */
     public String getCategoryOptionGroupSetName()
     {
-        return ( categoryOptionGroupSet == null ? "" : categoryOptionGroupSet.getName() );
+        return categoryOptionGroupSet == null ? "" : categoryOptionGroupSet.getName();
     }
     
     /**

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalLevelService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalLevelService.java	2015-09-16 14:49:50 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalLevelService.java	2015-09-16 15:14:04 +0000
@@ -185,7 +185,7 @@
      * @param level Data approval level to test for existence.
      * @return true if it exists, otherwise false.
      */
-    public boolean dataApprovalLevelExists ( DataApprovalLevel level );
+    boolean dataApprovalLevelExists ( DataApprovalLevel level );
 
     /**
      * Adds a new data approval level. Adds the new level at the highest

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageService.java	2015-06-16 05:11:29 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageService.java	2015-09-16 15:14:04 +0000
@@ -39,9 +39,9 @@
  */
 public interface MessageService
 {
-    final String ID = MessageService.class.getName();
+    String ID = MessageService.class.getName();
 
-    final String META_USER_AGENT = "User-agent: ";
+    String META_USER_AGENT = "User-agent: ";
 
     /**
      * Sends a message to the in-box of the given recipients.

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodType.java	2015-08-27 03:25:46 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodType.java	2015-09-16 15:14:04 +0000
@@ -61,7 +61,7 @@
     implements Serializable
 {
     // Cache for period lookup, uses calendar.name() + periodType.getName() + date.getTime() as key
-    private static Cache<String, Period> periodCache = CacheBuilder.newBuilder()
+    private static Cache<String, Period> PERIOD_CACHE = CacheBuilder.newBuilder()
         .expireAfterAccess( 5, TimeUnit.MINUTES )
         .initialCapacity( 10000 )
         .maximumSize( 30000 )
@@ -243,7 +243,7 @@
     {
         try
         {
-            return periodCache.get( getCacheKey( date ), () -> createPeriod( createCalendarInstance( date ) ) );
+            return PERIOD_CACHE.get( getCacheKey( date ), () -> createPeriod( createCalendarInstance( date ) ) );
         }
         catch ( ExecutionException ignored )
         {
@@ -273,7 +273,7 @@
     {
         try
         {
-            return periodCache.get( getCacheKey( calendar, date ), () -> createPeriod( calendar.fromIso( DateTimeUnit.fromJdkDate( date ) ), calendar ) );
+            return PERIOD_CACHE.get( getCacheKey( calendar, date ), () -> createPeriod( calendar.fromIso( DateTimeUnit.fromJdkDate( date ) ), calendar ) );
         }
         catch ( ExecutionException ignored )
         {

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/ReportService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/ReportService.java	2015-09-16 14:49:50 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/ReportService.java	2015-09-16 15:14:04 +0000
@@ -44,7 +44,7 @@
  */
 public interface ReportService
 {
-    final String ID = ReportService.class.getName();
+    String ID = ReportService.class.getName();
 
     String REPORTTYPE_PDF = "pdf";
     String REPORTTYPE_XLS = "xls";

=== 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-09-15 17:28:41 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java	2015-09-16 15:14:04 +0000
@@ -45,98 +45,98 @@
  */
 public interface SystemSettingManager
 {
-    final String ID = SystemSettingManager.class.getName();
+    String ID = SystemSettingManager.class.getName();
 
-    final String KEY_APPLICATION_TITLE = "applicationTitle";
-    final String KEY_APPLICATION_INTRO = "keyApplicationIntro";
-    final String KEY_APPLICATION_NOTIFICATION = "keyApplicationNotification";
-    final String KEY_APPLICATION_FOOTER = "keyApplicationFooter";
-    final String KEY_APPLICATION_RIGHT_FOOTER = "keyApplicationRightFooter";
-    final String KEY_FLAG = "keyFlag";
-    final String KEY_FLAG_IMAGE = "keyFlagImage";
-    final String KEY_START_MODULE = "startModule";
-    final String KEY_FORUM_INTEGRATION = "forumIntegration";
-    final String KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART = "omitIndicatorsZeroNumeratorDataMart";
-    final String KEY_REPORT_TEMPLATE_DIRECTORY = "reportTemplateDirectory";
-    final String KEY_GOOGLE_MAPS_API_KEY = "googleMapsAPIKey";
-    final String KEY_FACTOR_OF_DEVIATION = "factorDeviation";
-    final String KEY_TRACKED_ENTITY_EXCEL_TEMPLATE_FILE_NAME = "trackedEntityExcelTemplateFileName";
-    final String KEY_DATAMART_TASK = "keyDataMartTask";
-    final String KEY_DATASETCOMPLETENESS_TASK = "keyDataSetCompletenessTask";
-    final String KEY_EMAIL_HOST_NAME = "keyEmailHostName";
-    final String KEY_EMAIL_PORT = "keyEmailPort";
-    final String KEY_EMAIL_USERNAME = "keyEmailUsername";
-    final String KEY_EMAIL_PASSWORD = "keyEmailPassword";
-    final String KEY_EMAIL_TLS = "keyEmailTls";
-    final String KEY_EMAIL_SENDER = "keyEmailSender";
-    final String KEY_INSTANCE_BASE_URL = "keyInstanceBaseUrl";
-    final String KEY_SCHEDULED_PERIOD_TYPES = "keyScheduledPeriodTypes";
-    final String KEY_SCHEDULED_TASKS = "keySchedTasks";
-    final String KEY_ORGUNITGROUPSET_AGG_LEVEL = "orgUnitGroupSetAggregationLevel";
-    final String KEY_SMS_CONFIG = "SMS_CONFIG";
-    final String KEY_CACHE_STRATEGY = "keyCacheStrategy";
-    final String KEY_TIME_FOR_SENDING_MESSAGE = "timeSendingMessage";
-    final String KEY_SEND_MESSAGE_SCHEDULED_TASKS = "sendMessageScheduled";
-    final String KEY_SCHEDULE_MESSAGE_TASKS = "scheduleMessage";
-    final String KEY_PHONE_NUMBER_AREA_CODE = "phoneNumberAreaCode";
-    final String KEY_MULTI_ORGANISATION_UNIT_FORMS = "multiOrganisationUnitForms";
-    final String KEY_SCHEDULE_AGGREGATE_QUERY_BUILDER_TASKS = "scheduleAggregateQueryBuilder";
-    final String KEY_SCHEDULE_AGGREGATE_QUERY_BUILDER_TASK_STRATEGY = "scheduleAggregateQueryBuilderTackStrategy";
-    final String KEY_CONFIGURATION = "keyConfig";
-    final String KEY_ACCOUNT_RECOVERY = "keyAccountRecovery";
-    final String KEY_LAST_MONITORING_RUN = "keyLastMonitoringRun";
-    final String KEY_GOOGLE_ANALYTICS_UA = "googleAnalyticsUA";
-    final String KEY_CREDENTIALS_EXPIRES = "credentialsExpires";
-    final String KEY_SELF_REGISTRATION_NO_RECAPTCHA = "keySelfRegistrationNoRecaptcha";
-    final String KEY_OPENID_PROVIDER = "keyOpenIdProvider";
-    final String KEY_OPENID_PROVIDER_LABEL = "keyOpenIdProviderLabel";
-    final String KEY_CAN_GRANT_OWN_USER_AUTHORITY_GROUPS = "keyCanGrantOwnUserAuthorityGroups";
-    final String KEY_HIDE_UNAPPROVED_DATA_IN_ANALYTICS = "keyHideUnapprovedDataInAnalytics";
-    final String KEY_ANALYTICS_MAX_LIMIT = "keyAnalyticsMaxLimit";
-    final String KEY_CUSTOM_LOGIN_PAGE_LOGO = "keyCustomLoginPageLogo";
-    final String KEY_CUSTOM_TOP_MENU_LOGO = "keyCustomTopMenuLogo";
-    final String KEY_ANALYTICS_MAINTENANCE_MODE = "keyAnalyticsMaintenanceMode";
-    final String KEY_DATABASE_SERVER_CPUS = "keyDatabaseServerCpus";
-    final String KEY_LAST_SUCCESSFUL_DATA_SYNC = "keyLastSuccessfulDataSynch";
-    final String KEY_LAST_SUCCESSFUL_ANALYTICS_TABLES_UPDATE = "keyLastSuccessfulAnalyticsTablesUpdate";
-    final String KEY_LAST_SUCCESSFUL_ANALYTICS_TABLES_RUNTIME = "keyLastSuccessfulAnalyticsTablesRuntime";
-    final String KEY_LAST_SUCCESSFUL_RESOURCE_TABLES_UPDATE = "keyLastSuccessfulResourceTablesUpdate";
-    final String KEY_LAST_SUCCESSFUL_MONITORING = "keyLastSuccessfulMonitoring";
-    final String KEY_HELP_PAGE_LINK = "helpPageLink";
-    final String KEY_ACCEPTANCE_REQUIRED_FOR_APPROVAL = "keyAcceptanceRequiredForApproval";
-    final String KEY_SYSTEM_NOTIFICATIONS_EMAIL = "keySystemNotificationsEmail";
-    final String KEY_ANALYSIS_RELATIVE_PERIOD = "keyAnalysisRelativePeriod";
-    final String KEY_CORS_WHITELIST = "keyCorsWhitelist";
-    final String KEY_REQUIRE_ADD_TO_VIEW = "keyRequireAddToView";
-    final String KEY_ALLOW_OBJECT_ASSIGNMENT = "keyAllowObjectAssignment";
+    String KEY_APPLICATION_TITLE = "applicationTitle";
+    String KEY_APPLICATION_INTRO = "keyApplicationIntro";
+    String KEY_APPLICATION_NOTIFICATION = "keyApplicationNotification";
+    String KEY_APPLICATION_FOOTER = "keyApplicationFooter";
+    String KEY_APPLICATION_RIGHT_FOOTER = "keyApplicationRightFooter";
+    String KEY_FLAG = "keyFlag";
+    String KEY_FLAG_IMAGE = "keyFlagImage";
+    String KEY_START_MODULE = "startModule";
+    String KEY_FORUM_INTEGRATION = "forumIntegration";
+    String KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART = "omitIndicatorsZeroNumeratorDataMart";
+    String KEY_REPORT_TEMPLATE_DIRECTORY = "reportTemplateDirectory";
+    String KEY_GOOGLE_MAPS_API_KEY = "googleMapsAPIKey";
+    String KEY_FACTOR_OF_DEVIATION = "factorDeviation";
+    String KEY_TRACKED_ENTITY_EXCEL_TEMPLATE_FILE_NAME = "trackedEntityExcelTemplateFileName";
+    String KEY_DATAMART_TASK = "keyDataMartTask";
+    String KEY_DATASETCOMPLETENESS_TASK = "keyDataSetCompletenessTask";
+    String KEY_EMAIL_HOST_NAME = "keyEmailHostName";
+    String KEY_EMAIL_PORT = "keyEmailPort";
+    String KEY_EMAIL_USERNAME = "keyEmailUsername";
+    String KEY_EMAIL_PASSWORD = "keyEmailPassword";
+    String KEY_EMAIL_TLS = "keyEmailTls";
+    String KEY_EMAIL_SENDER = "keyEmailSender";
+    String KEY_INSTANCE_BASE_URL = "keyInstanceBaseUrl";
+    String KEY_SCHEDULED_PERIOD_TYPES = "keyScheduledPeriodTypes";
+    String KEY_SCHEDULED_TASKS = "keySchedTasks";
+    String KEY_ORGUNITGROUPSET_AGG_LEVEL = "orgUnitGroupSetAggregationLevel";
+    String KEY_SMS_CONFIG = "SMS_CONFIG";
+    String KEY_CACHE_STRATEGY = "keyCacheStrategy";
+    String KEY_TIME_FOR_SENDING_MESSAGE = "timeSendingMessage";
+    String KEY_SEND_MESSAGE_SCHEDULED_TASKS = "sendMessageScheduled";
+    String KEY_SCHEDULE_MESSAGE_TASKS = "scheduleMessage";
+    String KEY_PHONE_NUMBER_AREA_CODE = "phoneNumberAreaCode";
+    String KEY_MULTI_ORGANISATION_UNIT_FORMS = "multiOrganisationUnitForms";
+    String KEY_SCHEDULE_AGGREGATE_QUERY_BUILDER_TASKS = "scheduleAggregateQueryBuilder";
+    String KEY_SCHEDULE_AGGREGATE_QUERY_BUILDER_TASK_STRATEGY = "scheduleAggregateQueryBuilderTackStrategy";
+    String KEY_CONFIGURATION = "keyConfig";
+    String KEY_ACCOUNT_RECOVERY = "keyAccountRecovery";
+    String KEY_LAST_MONITORING_RUN = "keyLastMonitoringRun";
+    String KEY_GOOGLE_ANALYTICS_UA = "googleAnalyticsUA";
+    String KEY_CREDENTIALS_EXPIRES = "credentialsExpires";
+    String KEY_SELF_REGISTRATION_NO_RECAPTCHA = "keySelfRegistrationNoRecaptcha";
+    String KEY_OPENID_PROVIDER = "keyOpenIdProvider";
+    String KEY_OPENID_PROVIDER_LABEL = "keyOpenIdProviderLabel";
+    String KEY_CAN_GRANT_OWN_USER_AUTHORITY_GROUPS = "keyCanGrantOwnUserAuthorityGroups";
+    String KEY_HIDE_UNAPPROVED_DATA_IN_ANALYTICS = "keyHideUnapprovedDataInAnalytics";
+    String KEY_ANALYTICS_MAX_LIMIT = "keyAnalyticsMaxLimit";
+    String KEY_CUSTOM_LOGIN_PAGE_LOGO = "keyCustomLoginPageLogo";
+    String KEY_CUSTOM_TOP_MENU_LOGO = "keyCustomTopMenuLogo";
+    String KEY_ANALYTICS_MAINTENANCE_MODE = "keyAnalyticsMaintenanceMode";
+    String KEY_DATABASE_SERVER_CPUS = "keyDatabaseServerCpus";
+    String KEY_LAST_SUCCESSFUL_DATA_SYNC = "keyLastSuccessfulDataSynch";
+    String KEY_LAST_SUCCESSFUL_ANALYTICS_TABLES_UPDATE = "keyLastSuccessfulAnalyticsTablesUpdate";
+    String KEY_LAST_SUCCESSFUL_ANALYTICS_TABLES_RUNTIME = "keyLastSuccessfulAnalyticsTablesRuntime";
+    String KEY_LAST_SUCCESSFUL_RESOURCE_TABLES_UPDATE = "keyLastSuccessfulResourceTablesUpdate";
+    String KEY_LAST_SUCCESSFUL_MONITORING = "keyLastSuccessfulMonitoring";
+    String KEY_HELP_PAGE_LINK = "helpPageLink";
+    String KEY_ACCEPTANCE_REQUIRED_FOR_APPROVAL = "keyAcceptanceRequiredForApproval";
+    String KEY_SYSTEM_NOTIFICATIONS_EMAIL = "keySystemNotificationsEmail";
+    String KEY_ANALYSIS_RELATIVE_PERIOD = "keyAnalysisRelativePeriod";
+    String KEY_CORS_WHITELIST = "keyCorsWhitelist";
+    String KEY_REQUIRE_ADD_TO_VIEW = "keyRequireAddToView";
+    String KEY_ALLOW_OBJECT_ASSIGNMENT = "keyAllowObjectAssignment";
     
-    final String KEY_DATA_IMPORT_STRICT_PERIODS = "keyDataImportStrictPeriods";
-    final String KEY_DATA_IMPORT_STRICT_CATEGORY_OPTION_COMBOS = "keyDataImportStrictCategoryOptionCombos";
-    final String KEY_DATA_IMPORT_STRICT_ORGANISATION_UNITS = "keyDataImportStrictOrganisationUnits";
-    final String KEY_DATA_IMPORT_STRICT_ATTRIBUTE_OPTION_COMBOS = "keyDataImportStrictAttributeOptionCombos";
-    final String KEY_DATA_IMPORT_REQUIRE_CATEGORY_OPTION_COMBO = "keyDataImportRequireCategoryOptionCombo";
-    final String KEY_DATA_IMPORT_REQUIRE_ATTRIBUTE_OPTION_COMBO = "keyDataImportRequireAttributeOptionCombo";
+    String KEY_DATA_IMPORT_STRICT_PERIODS = "keyDataImportStrictPeriods";
+    String KEY_DATA_IMPORT_STRICT_CATEGORY_OPTION_COMBOS = "keyDataImportStrictCategoryOptionCombos";
+    String KEY_DATA_IMPORT_STRICT_ORGANISATION_UNITS = "keyDataImportStrictOrganisationUnits";
+    String KEY_DATA_IMPORT_STRICT_ATTRIBUTE_OPTION_COMBOS = "keyDataImportStrictAttributeOptionCombos";
+    String KEY_DATA_IMPORT_REQUIRE_CATEGORY_OPTION_COMBO = "keyDataImportRequireCategoryOptionCombo";
+    String KEY_DATA_IMPORT_REQUIRE_ATTRIBUTE_OPTION_COMBO = "keyDataImportRequireAttributeOptionCombo";
 
-    final String DEFAULT_SCHEDULE_AGGREGATE_QUERY_BUILDER_TASK_STRATEGY = "lastMonth";
-    final String DEFAULT_FLAG = "dhis2";
-    final int DEFAULT_MAX_NUMBER_OF_ATTEMPTS = 20;
-    final int DEFAULT_TIMEFRAME_MINUTES = 1;
-    final double DEFAULT_FACTOR_OF_DEVIATION = 2.0;
-    final int DEFAULT_ORGUNITGROUPSET_AGG_LEVEL = 3;
-    final String DEFAULT_GOOGLE_MAPS_API_KEY = "ABQIAAAAut6AhySExnYIXm5s2OFIkxRKNzJ-_9njnryRTbvC6CtrS4sRvRREWnxwlZUa630pLuPf3nD9i4fq9w";
-    final String DEFAULT_START_MODULE = "dhis-web-dashboard-integration";
-    final String DEFAULT_APPLICATION_TITLE = "District Health Information Software 2";
-    final int DEFAULT_EMAIL_PORT = 587;
-    final int DEFAULT_COMPLETENESS_OFFSET = 15;
-    final String DEFAULT_TIME_FOR_SENDING_MESSAGE = "08:00";
-    final String DEFAULT_CACHE_STRATEGY = "CACHE_6AM_TOMORROW";
-    final int DEFAULT_ANALYTICS_MAX_LIMIT = 50000;
-    final int DEFAULT_DATABASE_SERVER_CPUS = 0; // Detect automatically
-    final String DEFAULT_HELP_PAGE_LINK = "../dhis-web-commons-about/help.action";
-    final String DEFAULT_ANALYSIS_RELATIVE_PERIOD = "LAST_12_MONTHS";
-    final String DEFAULT_METADATA_REPO_URL = "http://metadata.dhis2.org";;
+    String DEFAULT_SCHEDULE_AGGREGATE_QUERY_BUILDER_TASK_STRATEGY = "lastMonth";
+    String DEFAULT_FLAG = "dhis2";
+    int DEFAULT_MAX_NUMBER_OF_ATTEMPTS = 20;
+    int DEFAULT_TIMEFRAME_MINUTES = 1;
+    double DEFAULT_FACTOR_OF_DEVIATION = 2.0;
+    int DEFAULT_ORGUNITGROUPSET_AGG_LEVEL = 3;
+    String DEFAULT_GOOGLE_MAPS_API_KEY = "ABQIAAAAut6AhySExnYIXm5s2OFIkxRKNzJ-_9njnryRTbvC6CtrS4sRvRREWnxwlZUa630pLuPf3nD9i4fq9w";
+    String DEFAULT_START_MODULE = "dhis-web-dashboard-integration";
+    String DEFAULT_APPLICATION_TITLE = "District Health Information Software 2";
+    int DEFAULT_EMAIL_PORT = 587;
+    int DEFAULT_COMPLETENESS_OFFSET = 15;
+    String DEFAULT_TIME_FOR_SENDING_MESSAGE = "08:00";
+    String DEFAULT_CACHE_STRATEGY = "CACHE_6AM_TOMORROW";
+    int DEFAULT_ANALYTICS_MAX_LIMIT = 50000;
+    int DEFAULT_DATABASE_SERVER_CPUS = 0; // Detect automatically
+    String DEFAULT_HELP_PAGE_LINK = "../dhis-web-commons-about/help.action";
+    String DEFAULT_ANALYSIS_RELATIVE_PERIOD = "LAST_12_MONTHS";
+    String DEFAULT_METADATA_REPO_URL = "http://metadata.dhis2.org";;
 	
-    final Map<String, Serializable> DEFAULT_SETTINGS_VALUES = new HashMap<String, Serializable>()
+    Map<String, Serializable> DEFAULT_SETTINGS_VALUES = new HashMap<String, Serializable>()
     {
         {
             put( KEY_SCHEDULE_AGGREGATE_QUERY_BUILDER_TASK_STRATEGY, DEFAULT_SCHEDULE_AGGREGATE_QUERY_BUILDER_TASK_STRATEGY );
@@ -155,9 +155,9 @@
         }
     };
 
-    final String SYSPROP_PORTAL = "runningAsPortal";
+    String SYSPROP_PORTAL = "runningAsPortal";
 
-    final HashSet<String> DEFAULT_SCHEDULED_PERIOD_TYPES = new HashSet<String>()
+    HashSet<String> DEFAULT_SCHEDULED_PERIOD_TYPES = new HashSet<String>()
     {
         {
             add( MonthlyPeriodType.NAME );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationResult.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationResult.java	2015-09-16 14:49:50 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationResult.java	2015-09-16 15:14:04 +0000
@@ -292,7 +292,7 @@
 
     private int validationImportanceOrder( String importance )
     {
-        return ( importance.equals( "high" ) ? 0 : importance.equals( "medium" ) ? 1 : 2 );
+        return importance.equals( "high" ) ? 0 : importance.equals( "medium" ) ? 1 : 2;
     }
 
     @Override

=== modified file 'dhis-2/dhis-api/src/test/java/org/hisp/dhis/common/AccessStringHelperTest.java'
--- dhis-2/dhis-api/src/test/java/org/hisp/dhis/common/AccessStringHelperTest.java	2015-07-14 07:21:33 +0000
+++ dhis-2/dhis-api/src/test/java/org/hisp/dhis/common/AccessStringHelperTest.java	2015-09-16 15:14:04 +0000
@@ -40,7 +40,7 @@
 public class AccessStringHelperTest
 {
     @Test
-    public void testCanRead() throws Exception
+    public void testCanRead()
     {
         String access = "r-------";
         String access_will_fail = "--------";
@@ -50,7 +50,7 @@
     }
 
     @Test
-    public void testCanWrite() throws Exception
+    public void testCanWrite()
     {
         String access1 = "rw------";
         String access2 = "-w------";