dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #38266
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19524: Add method to get convert multiple TEI to DXF2 TEI
------------------------------------------------------------
revno: 19524
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-06-29 13:42:08 +0700
message:
Add method to get convert multiple TEI to DXF2 TEI
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/TrackedEntityInstanceService.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-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java 2015-06-15 13:44:20 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java 2015-06-29 06:42:08 +0000
@@ -35,6 +35,7 @@
import org.hisp.dhis.common.OrganisationUnitSelectionMode;
import org.hisp.dhis.common.QueryItem;
import org.hisp.dhis.common.QueryOperator;
+import org.hisp.dhis.commons.collection.CachingMap;
import org.hisp.dhis.dbms.DbmsManager;
import org.hisp.dhis.dxf2.importsummary.ImportConflict;
import org.hisp.dhis.dxf2.importsummary.ImportStatus;
@@ -53,7 +54,6 @@
import org.hisp.dhis.trackedentityattributevalue.TrackedEntityAttributeValue;
import org.hisp.dhis.trackedentityattributevalue.TrackedEntityAttributeValueService;
import org.hisp.dhis.user.UserService;
-import org.hisp.dhis.commons.collection.CachingMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert;
@@ -108,6 +108,19 @@
// -------------------------------------------------------------------------
@Override
+ public List<TrackedEntityInstance> getTrackedEntityInstances( List<org.hisp.dhis.trackedentity.TrackedEntityInstance> trackedEntityInstances )
+ {
+ List<TrackedEntityInstance> teiItems = new ArrayList<>();
+
+ for ( org.hisp.dhis.trackedentity.TrackedEntityInstance trackedEntityInstance : trackedEntityInstances )
+ {
+ teiItems.add( getTrackedEntityInstance( trackedEntityInstance ) );
+ }
+
+ return teiItems;
+ }
+
+ @Override
public TrackedEntityInstance getTrackedEntityInstance( String uid )
{
return getTrackedEntityInstance( teiService.getTrackedEntityInstance( uid ) );
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/TrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/TrackedEntityInstanceService.java 2015-06-08 03:24:16 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/TrackedEntityInstanceService.java 2015-06-29 06:42:08 +0000
@@ -47,6 +47,8 @@
// READ
// -------------------------------------------------------------------------
+ List<TrackedEntityInstance> getTrackedEntityInstances( List<org.hisp.dhis.trackedentity.TrackedEntityInstance> trackedEntityInstances );
+
TrackedEntityInstance getTrackedEntityInstance( String uid );
TrackedEntityInstance getTrackedEntityInstance( org.hisp.dhis.trackedentity.TrackedEntityInstance entityInstance );