← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20114: Cleanup

 

------------------------------------------------------------
revno: 20114
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2015-09-13 23:12:28 +0200
message:
  Cleanup
modified:
  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/dataset/CompleteDataSetRegistrationDeletionHandler.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/ProgramInstanceDeletionHandler.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/programrule/ProgramRuleActionDeletionHandler.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/programrule/ProgramRuleDeletionHandler.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/programrule/ProgramRuleVariableDeletionHandler.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/RestoreOptions.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/RestoreType.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/command/hibernate/HibernateSMSCommandStore.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementGroupSetStoreTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorGroupSetStoreTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSetStoreTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupStoreTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramInstanceServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramInstanceStoreTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleActionStoreTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleStoreTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleVariableStoreTest.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-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-09-13 17:45:53 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DataApprovalPermissionsEvaluator.java	2015-09-13 21:12:28 +0000
@@ -93,7 +93,7 @@
      * @param dataApprovalLevelService Data approval level service
      * @return context for determining user permissions
      */
-    static DataApprovalPermissionsEvaluator makePermissionsEvaluator( CurrentUserService currentUserService,
+    public static DataApprovalPermissionsEvaluator makePermissionsEvaluator( CurrentUserService currentUserService,
             OrganisationUnitService organisationUnitService, SystemSettingManager systemSettingManager,
             DataApprovalLevelService dataApprovalLevelService )
     {
@@ -131,7 +131,7 @@
      * @param status the data approval status (if any)
      * @return the data approval permissions for the object
      */
-    DataApprovalPermissions getPermissions( DataApprovalStatus status, OrganisationUnit orgUnit )
+    public DataApprovalPermissions getPermissions( DataApprovalStatus status, OrganisationUnit orgUnit )
     {
         DataApproval da = status.getDataApproval();
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/CompleteDataSetRegistrationDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/CompleteDataSetRegistrationDeletionHandler.java	2015-03-24 18:54:44 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/CompleteDataSetRegistrationDeletionHandler.java	2015-09-13 21:12:28 +0000
@@ -45,7 +45,7 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    public CompleteDataSetRegistrationService completeDataSetRegistrationService;
+    private CompleteDataSetRegistrationService completeDataSetRegistrationService;
 
     public void setCompleteDataSetRegistrationService( CompleteDataSetRegistrationService completeDataSetRegistrationService )
     {

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/ProgramInstanceDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/ProgramInstanceDeletionHandler.java	2015-07-01 05:49:17 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/ProgramInstanceDeletionHandler.java	2015-09-13 21:12:28 +0000
@@ -60,7 +60,7 @@
         this.commentService = commentService;
     }
 
-    public ProgramStageDataElementService programStageDEService;
+    private ProgramStageDataElementService programStageDEService;
 
     public void setProgramStageDEService( ProgramStageDataElementService programStageDEService )
     {

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/programrule/ProgramRuleActionDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/programrule/ProgramRuleActionDeletionHandler.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/programrule/ProgramRuleActionDeletionHandler.java	2015-09-13 21:12:28 +0000
@@ -40,7 +40,7 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    ProgramRuleActionService programRuleActionService;
+    private ProgramRuleActionService programRuleActionService;
 
     public void setProgramRuleActionService( ProgramRuleActionService programRuleActionService )
     {

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/programrule/ProgramRuleDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/programrule/ProgramRuleDeletionHandler.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/programrule/ProgramRuleDeletionHandler.java	2015-09-13 21:12:28 +0000
@@ -41,7 +41,7 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    ProgramRuleService programRuleService;
+    private ProgramRuleService programRuleService;
 
     public void setProgramRuleService( ProgramRuleService programRuleService )
     {

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/programrule/ProgramRuleVariableDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/programrule/ProgramRuleVariableDeletionHandler.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/programrule/ProgramRuleVariableDeletionHandler.java	2015-09-13 21:12:28 +0000
@@ -41,7 +41,7 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    ProgramRuleVariableService programRuleVariableService;
+    private ProgramRuleVariableService programRuleVariableService;
 
     public void setProgramRuleVariableService( ProgramRuleVariableService programRuleVariableService )
     {

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java	2015-08-12 02:48:13 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java	2015-09-13 21:12:28 +0000
@@ -81,9 +81,9 @@
         .put( AnalyticalObject.class, BaseAnalyticalObject.class )
         .build();
 
-    protected Map<Class<?>, Map<String, Property>> classMapCache = new HashMap<>();
+    protected final Map<Class<?>, Map<String, Property>> classMapCache = new HashMap<>();
 
-    protected Map<String, String> roleToRole = new HashMap<>();
+    protected final Map<String, String> roleToRole = new HashMap<>();
 
     @Autowired
     protected ApplicationContext context;

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/RestoreOptions.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/RestoreOptions.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/RestoreOptions.java	2015-09-13 21:12:28 +0000
@@ -64,7 +64,7 @@
     // Constructor
     // -------------------------------------------------------------------------
 
-    RestoreOptions( String tokenPrefix, RestoreType restoreType, boolean usernameChoice )
+    private RestoreOptions( String tokenPrefix, RestoreType restoreType, boolean usernameChoice )
     {
         this.tokenPrefix = tokenPrefix;
         this.restoreType = restoreType;

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/RestoreType.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/RestoreType.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/RestoreType.java	2015-09-13 21:12:28 +0000
@@ -70,7 +70,7 @@
     // Constructor
     // -------------------------------------------------------------------------
 
-    RestoreType( int expiryIntervalType, int expiryIntervalCount,
+    private RestoreType( int expiryIntervalType, int expiryIntervalCount,
                  String emailTemplate, String emailSubject, String action )
     {
         this.expiryIntervalType = expiryIntervalType;

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/command/hibernate/HibernateSMSCommandStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/command/hibernate/HibernateSMSCommandStore.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/command/hibernate/HibernateSMSCommandStore.java	2015-09-13 21:12:28 +0000
@@ -48,7 +48,7 @@
 public class HibernateSMSCommandStore
     implements SMSCommandStore
 {
-    protected SessionFactory sessionFactory;
+    private SessionFactory sessionFactory;
 
     @Required
     public void setSessionFactory( SessionFactory sessionFactory )

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementGroupSetStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementGroupSetStoreTest.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementGroupSetStoreTest.java	2015-09-13 21:12:28 +0000
@@ -36,15 +36,15 @@
  */
 public class DataElementGroupSetStoreTest
     extends GenericDhisSpringTest<DataElementGroupSet>
-{
-    private DataElementGroupSet[] objects = {
-        new DataElementGroupSet( "GroupSetA" ),
-        new DataElementGroupSet( "GroupSetB" ),
-        new DataElementGroupSet( "GroupSetC" ) };
-    
+{    
     @Override
     protected DataElementGroupSet[] getObjects()
     {
+        DataElementGroupSet[] objects = {
+            new DataElementGroupSet( "GroupSetA" ),
+            new DataElementGroupSet( "GroupSetB" ),
+            new DataElementGroupSet( "GroupSetC" ) };
+        
         return objects;
     }    
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorGroupSetStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorGroupSetStoreTest.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorGroupSetStoreTest.java	2015-09-13 21:12:28 +0000
@@ -36,15 +36,15 @@
  */
 public class IndicatorGroupSetStoreTest
     extends GenericDhisSpringTest<IndicatorGroupSet>
-{
-    private IndicatorGroupSet[] objects = { 
-        new IndicatorGroupSet( "GroupSetA" ), 
-        new IndicatorGroupSet( "GroupSetB" ),
-        new IndicatorGroupSet( "GroupSetC" ) };
-    
+{    
     @Override
     protected IndicatorGroupSet[] getObjects()
     {
+        IndicatorGroupSet[] objects = { 
+            new IndicatorGroupSet( "GroupSetA" ), 
+            new IndicatorGroupSet( "GroupSetB" ),
+            new IndicatorGroupSet( "GroupSetC" ) };
+        
         return objects;
     }
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSetStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSetStoreTest.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSetStoreTest.java	2015-09-13 21:12:28 +0000
@@ -37,14 +37,14 @@
 public class OrganisationUnitGroupSetStoreTest
     extends GenericDhisSpringTest<OrganisationUnitGroupSet>
 {
-    private OrganisationUnitGroupSet[] objects = {
-        createOrganisationUnitGroupSet( 'A' ),
-        createOrganisationUnitGroupSet( 'B' ),
-        createOrganisationUnitGroupSet( 'C' ) };
-
     @Override
     protected OrganisationUnitGroupSet[] getObjects()
     {
+        OrganisationUnitGroupSet[] objects = {
+            createOrganisationUnitGroupSet( 'A' ),
+            createOrganisationUnitGroupSet( 'B' ),
+            createOrganisationUnitGroupSet( 'C' ) };
+        
         return objects;
     }    
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupStoreTest.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupStoreTest.java	2015-09-13 21:12:28 +0000
@@ -37,14 +37,14 @@
 public class OrganisationUnitGroupStoreTest
     extends GenericDhisSpringTest<OrganisationUnitGroup>
 {
-    private OrganisationUnitGroup[] objects = {
-        new OrganisationUnitGroup( "GroupA" ),
-        new OrganisationUnitGroup( "GroupB" ),
-        new OrganisationUnitGroup( "GroupC" ) };
-
     @Override
     protected OrganisationUnitGroup[] getObjects()
     {
+        OrganisationUnitGroup[] objects = {
+            new OrganisationUnitGroup( "GroupA" ),
+            new OrganisationUnitGroup( "GroupB" ),
+            new OrganisationUnitGroup( "GroupC" ) };
+        
         return objects;
     }    
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramInstanceServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramInstanceServiceTest.java	2015-09-11 11:54:53 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramInstanceServiceTest.java	2015-09-13 21:12:28 +0000
@@ -52,7 +52,6 @@
 import org.joda.time.DateTime;
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.jdbc.core.JdbcTemplate;
 
 /**
  * @author Chau Thu Tran
@@ -110,9 +109,6 @@
 
     private Collection<Integer> orgunitIds;
 
-    @Autowired
-    JdbcTemplate jdbcTemplate;
-
     @Override
     public void setUpTest()
     {

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramInstanceStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramInstanceStoreTest.java	2015-09-03 03:11:47 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramInstanceStoreTest.java	2015-09-13 21:12:28 +0000
@@ -47,7 +47,6 @@
 import org.joda.time.DateTime;
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.jdbc.core.JdbcTemplate;
 
 /**
  * @author Chau Thu Tran
@@ -96,9 +95,6 @@
 
     private Collection<Integer> orgunitIds;
 
-    @Autowired
-    JdbcTemplate jdbcTemplate;
-
     @Override
     public void setUpTest()
     {

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleActionStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleActionStoreTest.java	2015-08-26 18:14:12 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleActionStoreTest.java	2015-09-13 21:12:28 +0000
@@ -49,13 +49,13 @@
     private Program programA;
     
     @Autowired
-    public ProgramRuleStore programRuleStore;
-    
-    @Autowired
-    public DataElementService dataElementService;
-    
-    @Autowired
-    public ProgramRuleActionStore actionStore;
+    private ProgramRuleStore programRuleStore;
+    
+    @Autowired
+    private DataElementService dataElementService;
+    
+    @Autowired
+    private ProgramRuleActionStore actionStore;
 
     @Autowired
     private ProgramService programService;

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleStoreTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleStoreTest.java	2015-09-13 21:12:28 +0000
@@ -44,17 +44,18 @@
 public class ProgramRuleStoreTest
     extends DhisSpringTest
 {
-    private Program programA;    
+    private Program programA;
+    
     private ProgramStage programStageA;
     
     @Autowired
-    public ProgramStore programStore;
-    
-    @Autowired
-    public ProgramStageStore programStageStore;
-    
-    @Autowired
-    public ProgramRuleStore variableStore;
+    private ProgramStore programStore;
+    
+    @Autowired
+    private ProgramStageStore programStageStore;
+    
+    @Autowired
+    private ProgramRuleStore variableStore;
     
     @Override
     public void setUpTest()
@@ -63,8 +64,7 @@
         programStageA = createProgramStage( 'A', 0 );
         
         programStore.save( programA );
-        programStageStore.save( programStageA );
-        
+        programStageStore.save( programStageA );        
     }
     
     @Test

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleVariableStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleVariableStoreTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleVariableStoreTest.java	2015-09-13 21:12:28 +0000
@@ -44,18 +44,18 @@
 public class ProgramRuleVariableStoreTest
     extends DhisSpringTest
 {
-    public Program programA; 
-    
-    public DataElement dataelementA;
-    
-    @Autowired
-    public ProgramStore programStore;
-    
-    @Autowired
-    public DataElementStore dataElementStore;
-    
-    @Autowired
-    public ProgramRuleVariableStore variableStore;
+    private Program programA; 
+    
+    private DataElement dataelementA;
+    
+    @Autowired
+    private ProgramStore programStore;
+    
+    @Autowired
+    private DataElementStore dataElementStore;
+    
+    @Autowired
+    private ProgramRuleVariableStore variableStore;
     
     @Override
     public void setUpTest()
@@ -64,8 +64,7 @@
         dataelementA = createDataElement('A');
         
         programStore.save( programA );
-        dataElementStore.save( dataelementA );
-        
+        dataElementStore.save( dataelementA );        
     }
     
     @Test