dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28532
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14251: minor rename
------------------------------------------------------------
revno: 14251
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-03-17 14:28:21 +0100
message:
minor rename
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/JacksonTrackedEntityInstanceService.java
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/test/java/org/hisp/dhis/dxf2/events/TrackedEntityInstanceServiceTest.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/TrackedEntityInstanceController.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 2014-03-17 11:30:30 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java 2014-03-17 13:28:21 +0000
@@ -143,7 +143,7 @@
// -------------------------------------------------------------------------
@Override
- public ImportSummary saveTrackedEntityInstance( TrackedEntityInstance trackedEntityInstance )
+ public ImportSummary addTrackedEntityInstance( TrackedEntityInstance trackedEntityInstance )
{
ImportSummary importSummary = new ImportSummary();
importSummary.setDataValueCount( null );
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/JacksonTrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/JacksonTrackedEntityInstanceService.java 2014-03-17 08:22:01 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/JacksonTrackedEntityInstanceService.java 2014-03-17 13:28:21 +0000
@@ -94,7 +94,7 @@
// -------------------------------------------------------------------------
@Override
- public ImportSummaries saveTrackedEntityInstanceXml( InputStream inputStream ) throws IOException
+ public ImportSummaries addTrackedEntityInstanceXml( InputStream inputStream ) throws IOException
{
ImportSummaries importSummaries = new ImportSummaries();
String input = StreamUtils.copyToString( inputStream, Charset.forName( "UTF-8" ) );
@@ -106,21 +106,21 @@
for ( TrackedEntityInstance trackedEntityInstance : trackedEntityInstances.getTrackedEntityInstances() )
{
trackedEntityInstance.setTrackedEntityInstance( null );
- importSummaries.addImportSummary( saveTrackedEntityInstance( trackedEntityInstance ) );
+ importSummaries.addImportSummary( addTrackedEntityInstance( trackedEntityInstance ) );
}
}
catch ( Exception ex )
{
TrackedEntityInstance trackedEntityInstance = fromXml( input, TrackedEntityInstance.class );
trackedEntityInstance.setTrackedEntityInstance( null );
- importSummaries.addImportSummary( saveTrackedEntityInstance( trackedEntityInstance ) );
+ importSummaries.addImportSummary( addTrackedEntityInstance( trackedEntityInstance ) );
}
return importSummaries;
}
@Override
- public ImportSummaries saveTrackedEntityInstanceJson( InputStream inputStream ) throws IOException
+ public ImportSummaries addTrackedEntityInstanceJson( InputStream inputStream ) throws IOException
{
ImportSummaries importSummaries = new ImportSummaries();
String input = StreamUtils.copyToString( inputStream, Charset.forName( "UTF-8" ) );
@@ -132,14 +132,14 @@
for ( TrackedEntityInstance trackedEntityInstance : trackedEntityInstances.getTrackedEntityInstances() )
{
trackedEntityInstance.setTrackedEntityInstance( null );
- importSummaries.addImportSummary( saveTrackedEntityInstance( trackedEntityInstance ) );
+ importSummaries.addImportSummary( addTrackedEntityInstance( trackedEntityInstance ) );
}
}
catch ( Exception ex )
{
TrackedEntityInstance trackedEntityInstance = fromJson( input, TrackedEntityInstance.class );
trackedEntityInstance.setTrackedEntityInstance( null );
- importSummaries.addImportSummary( saveTrackedEntityInstance( trackedEntityInstance ) );
+ importSummaries.addImportSummary( addTrackedEntityInstance( trackedEntityInstance ) );
}
return importSummaries;
=== 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 2014-03-17 11:30:30 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/TrackedEntityInstanceService.java 2014-03-17 13:28:21 +0000
@@ -51,13 +51,13 @@
// CREATE
// -------------------------------------------------------------------------
- ImportSummaries saveTrackedEntityInstanceXml( InputStream inputStream )
- throws IOException;
-
- ImportSummaries saveTrackedEntityInstanceJson( InputStream inputStream )
- throws IOException;
-
- ImportSummary saveTrackedEntityInstance( TrackedEntityInstance trackedEntityInstance );
+ ImportSummaries addTrackedEntityInstanceXml( InputStream inputStream )
+ throws IOException;
+
+ ImportSummaries addTrackedEntityInstanceJson( InputStream inputStream )
+ throws IOException;
+
+ ImportSummary addTrackedEntityInstance( TrackedEntityInstance trackedEntityInstance );
// -------------------------------------------------------------------------
// UPDATE
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/TrackedEntityInstanceServiceTest.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/TrackedEntityInstanceServiceTest.java 2014-03-17 11:30:30 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/TrackedEntityInstanceServiceTest.java 2014-03-17 13:28:21 +0000
@@ -145,7 +145,7 @@
// person.setName( "NAME" );
trackedEntityInstance.setOrgUnit( organisationUnitA.getUid() );
- ImportSummary importSummary = trackedEntityInstanceService.saveTrackedEntityInstance( trackedEntityInstance );
+ ImportSummary importSummary = trackedEntityInstanceService.addTrackedEntityInstance( trackedEntityInstance );
assertEquals( ImportStatus.SUCCESS, importSummary.getStatus() );
// assertEquals( "NAME", personService.getTrackedEntityInstance( importSummary.getReference() ).getName() );
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/TrackedEntityInstanceController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/TrackedEntityInstanceController.java 2014-03-17 11:30:30 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/event/TrackedEntityInstanceController.java 2014-03-17 13:28:21 +0000
@@ -134,7 +134,7 @@
public void postTrackedEntityInstanceXml( HttpServletRequest request, HttpServletResponse response )
throws IOException
{
- ImportSummaries importSummaries = trackedEntityInstanceService.saveTrackedEntityInstanceXml( request.getInputStream() );
+ ImportSummaries importSummaries = trackedEntityInstanceService.addTrackedEntityInstanceXml( request.getInputStream() );
if ( importSummaries.getImportSummaries().size() > 1 )
{
@@ -160,7 +160,7 @@
public void postTrackedEntityInstanceJson( HttpServletRequest request, HttpServletResponse response )
throws IOException
{
- ImportSummaries importSummaries = trackedEntityInstanceService.saveTrackedEntityInstanceJson( request.getInputStream() );
+ ImportSummaries importSummaries = trackedEntityInstanceService.addTrackedEntityInstanceJson( request.getInputStream() );
if ( importSummaries.getImportSummaries().size() > 1 )
{