← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21833: minor rename

 

------------------------------------------------------------
revno: 21833
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2016-01-29 12:22:32 +0700
message:
  minor rename
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/preheat/PreheatService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/preheat/DefaultPreheatService.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/preheat/PreheatServiceTest.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/preheat/PreheatService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/preheat/PreheatService.java	2016-01-25 04:37:41 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/preheat/PreheatService.java	2016-01-29 05:22:32 +0000
@@ -59,7 +59,7 @@
      * @param identifier Identifier to collect
      * @return Maps classes to collections of identifiers
      */
-    Map<Class<? extends IdentifiableObject>, Set<String>> scanObjectForReferences( Object object, PreheatIdentifier identifier );
+    Map<Class<? extends IdentifiableObject>, Set<String>> collectReferences( Object object, PreheatIdentifier identifier );
 
     /**
      * Scan objects and collect all references (both id object and collections with id objects).
@@ -68,5 +68,5 @@
      * @param identifier Identifier to collect
      * @return Maps classes to collections of identifiers
      */
-    Map<Class<? extends IdentifiableObject>, Set<String>> scanObjectsForReferences( Set<Object> objects, PreheatIdentifier identifier );
+    Map<Class<? extends IdentifiableObject>, Set<String>> collectReferences( Set<Object> objects, PreheatIdentifier identifier );
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/preheat/DefaultPreheatService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/preheat/DefaultPreheatService.java	2016-01-25 06:22:42 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/preheat/DefaultPreheatService.java	2016-01-29 05:22:32 +0000
@@ -122,14 +122,14 @@
     }
 
     @Override
-    public Map<Class<? extends IdentifiableObject>, Set<String>> scanObjectForReferences( Object object, PreheatIdentifier identifier )
+    public Map<Class<? extends IdentifiableObject>, Set<String>> collectReferences( Object object, PreheatIdentifier identifier )
     {
-        return scanObjectsForReferences( Sets.newHashSet( object ), identifier );
+        return collectReferences( Sets.newHashSet( object ), identifier );
     }
 
     @Override
     @SuppressWarnings( "unchecked" )
-    public Map<Class<? extends IdentifiableObject>, Set<String>> scanObjectsForReferences( Set<Object> objects, PreheatIdentifier identifier )
+    public Map<Class<? extends IdentifiableObject>, Set<String>> collectReferences( Set<Object> objects, PreheatIdentifier identifier )
     {
         Map<Class<? extends IdentifiableObject>, Set<String>> map = new HashMap<>();
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/preheat/PreheatServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/preheat/PreheatServiceTest.java	2016-01-25 06:22:42 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/preheat/PreheatServiceTest.java	2016-01-29 05:22:32 +0000
@@ -94,10 +94,10 @@
     }
 
     @Test
-    public void testScanNoObjectsDE()
+    public void testCollectNoObjectsDE()
     {
         DataElement dataElement = createDataElement( 'A' );
-        Map<Class<? extends IdentifiableObject>, Set<String>> references = preheatService.scanObjectForReferences( dataElement, PreheatIdentifier.UID );
+        Map<Class<? extends IdentifiableObject>, Set<String>> references = preheatService.collectReferences( dataElement, PreheatIdentifier.UID );
 
         assertTrue( references.containsKey( OptionSet.class ) );
         assertTrue( references.containsKey( LegendSet.class ) );
@@ -106,17 +106,17 @@
     }
 
     @Test
-    public void testScanNoObjectsDEG()
+    public void testCollectNoObjectsDEG()
     {
         DataElementGroup dataElementGroup = createDataElementGroup( 'A' );
-        Map<Class<? extends IdentifiableObject>, Set<String>> references = preheatService.scanObjectForReferences( dataElementGroup, PreheatIdentifier.UID );
+        Map<Class<? extends IdentifiableObject>, Set<String>> references = preheatService.collectReferences( dataElementGroup, PreheatIdentifier.UID );
 
         assertTrue( references.containsKey( DataElement.class ) );
         assertTrue( references.containsKey( User.class ) );
     }
 
     @Test
-    public void testScanObjectReferenceUidDEG()
+    public void testCollectReferenceUidDEG1()
     {
         DataElementGroup deg1 = createDataElementGroup( 'A' );
 
@@ -132,7 +132,7 @@
 
         deg1.setUser( user );
 
-        Map<Class<? extends IdentifiableObject>, Set<String>> references = preheatService.scanObjectForReferences( deg1, PreheatIdentifier.UID );
+        Map<Class<? extends IdentifiableObject>, Set<String>> references = preheatService.collectReferences( deg1, PreheatIdentifier.UID );
 
         assertTrue( references.containsKey( DataElement.class ) );
         assertTrue( references.containsKey( User.class ) );
@@ -148,7 +148,7 @@
     }
 
     @Test
-    public void testScanObjectsReferenceUidDEG()
+    public void testCollectReferenceUidDEG2()
     {
         DataElementGroup deg1 = createDataElementGroup( 'A' );
         DataElementGroup deg2 = createDataElementGroup( 'B' );
@@ -161,7 +161,7 @@
         deg1.addDataElement( de2 );
         deg2.addDataElement( de3 );
 
-        Map<Class<? extends IdentifiableObject>, Set<String>> references = preheatService.scanObjectsForReferences(
+        Map<Class<? extends IdentifiableObject>, Set<String>> references = preheatService.collectReferences(
             Sets.newHashSet( deg1, deg2 ), PreheatIdentifier.UID );
 
         assertTrue( references.containsKey( DataElement.class ) );
@@ -173,7 +173,7 @@
     }
 
     @Test
-    public void testScanObjectReferenceCodeDEG()
+    public void testCollectReferenceCodeDEG1()
     {
         DataElementGroup dataElementGroup = createDataElementGroup( 'A' );
 
@@ -189,7 +189,7 @@
 
         dataElementGroup.setUser( user );
 
-        Map<Class<? extends IdentifiableObject>, Set<String>> references = preheatService.scanObjectForReferences( dataElementGroup, PreheatIdentifier.CODE );
+        Map<Class<? extends IdentifiableObject>, Set<String>> references = preheatService.collectReferences( dataElementGroup, PreheatIdentifier.CODE );
 
         assertTrue( references.containsKey( DataElement.class ) );
         assertTrue( references.containsKey( User.class ) );
@@ -205,7 +205,7 @@
     }
 
     @Test
-    public void testScanObjectsReferenceCodeDEG()
+    public void testCollectReferenceCodeDEG2()
     {
         DataElementGroup deg1 = createDataElementGroup( 'A' );
         DataElementGroup deg2 = createDataElementGroup( 'B' );
@@ -218,7 +218,7 @@
         deg1.addDataElement( de2 );
         deg2.addDataElement( de3 );
 
-        Map<Class<? extends IdentifiableObject>, Set<String>> references = preheatService.scanObjectsForReferences(
+        Map<Class<? extends IdentifiableObject>, Set<String>> references = preheatService.collectReferences(
             Sets.newHashSet( deg1, deg2 ), PreheatIdentifier.CODE );
 
         assertTrue( references.containsKey( DataElement.class ) );
@@ -442,7 +442,7 @@
         dataElementGroup.setUser( user );
         manager.save( dataElementGroup );
 
-        Map<Class<? extends IdentifiableObject>, Set<String>> references = preheatService.scanObjectForReferences( dataElementGroup, PreheatIdentifier.UID );
+        Map<Class<? extends IdentifiableObject>, Set<String>> references = preheatService.collectReferences( dataElementGroup, PreheatIdentifier.UID );
 
         PreheatParams params = new PreheatParams();
         params.setPreheatMode( PreheatMode.REFERENCE );