dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11733
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3421: Logging when recieving data value sets.
------------------------------------------------------------
revno: 3421
committer: Jo Størset <storset@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-04-18 13:21:24 +0200
message:
Logging when recieving data value sets.
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/web/api/service/FacilityReportingServiceImpl.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-web/dhis-web-api/src/main/java/org/hisp/dhis/web/api/service/FacilityReportingServiceImpl.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/web/api/service/FacilityReportingServiceImpl.java 2011-04-14 03:30:48 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/web/api/service/FacilityReportingServiceImpl.java 2011-04-18 11:21:24 +0000
@@ -184,8 +184,9 @@
return updatedDataSetList;
}
-
- public DataSetList getDataSetsForLocale( OrganisationUnit unit, String locale ){
+
+ public DataSetList getDataSetsForLocale( OrganisationUnit unit, String locale )
+ {
DataSetList dataSetList = new DataSetList();
List<DataSet> dataSets = this.getMobileDataSetsForUnit( unit, locale );
dataSetList.setModifiedDataSets( dataSets );
@@ -273,6 +274,8 @@
if ( !dataSetAssociatedWithOrgUnit( unit, dataSet ) )
{
+ log.info( "Failed to save data value set for: " + unit.getName() + ", " + dataSet.getName()
+ + " - Org unit and data set not associated." );
throw NotAllowedException.INVALID_DATASET_ASSOCIATION;
}
@@ -280,11 +283,19 @@
if ( period == null )
{
+ log.info( "Failed to save data value set for: " + unit.getName() + ", " + dataSet.getName()
+ + " - Period not found." );
throw NotAllowedException.INVALID_PERIOD;
}
+ log.info( "Recieved data value set for: " + unit.getName() + ", " + dataSet.getName()
+ + ", " + period.getIsoDate() );
+
+
if ( dataSetLocked( unit, dataSet, period ) )
{
+ log.info( "Failed to save data value set: " + unit.getName() + ", " + dataSet.getName() + ", "
+ + period.getIsoDate() + " - Data value set locked." );
throw NotAllowedException.DATASET_LOCKED;
}
@@ -328,6 +339,8 @@
registrationService.saveCompleteDataSetRegistration( registration );
+ log.info( "Saved and registered data value set as complete: " + unit.getName() + ", " + dataSet.getName()
+ + ", " + period.getIsoDate() );
}
private Map<Integer, org.hisp.dhis.dataelement.DataElement> getDataElementIdMapping(