dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #29730
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15068: Code style
------------------------------------------------------------
revno: 15068
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-04-28 16:48:54 +0200
message:
Code style
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalStatus.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DataApprovalSelection.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/dataapproval/DataApprovalStatus.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalStatus.java 2014-03-25 11:32:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalStatus.java 2014-04-28 14:48:54 +0000
@@ -34,9 +34,7 @@
* selection, the approval object.
*
* @author Jim Grace
- * @version $Id$
*/
-
public class DataApprovalStatus
{
/**
@@ -66,9 +64,8 @@
{
}
- public DataApprovalStatus( DataApprovalState dataApprovalState,
- DataApproval dataApproval,
- DataApprovalLevel dataApprovalLevel )
+ public DataApprovalStatus( DataApprovalState dataApprovalState, DataApproval dataApproval,
+ DataApprovalLevel dataApprovalLevel )
{
this.dataApprovalState = dataApprovalState;
this.dataApproval = dataApproval;
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DataApprovalSelection.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DataApprovalSelection.java 2014-04-28 14:17:46 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DataApprovalSelection.java 2014-04-28 14:48:54 +0000
@@ -498,26 +498,6 @@
{
addDataGroups();
}
-
- if ( log.isInfoEnabled() )
- {
- log.debug("initSelectionGroups() returning " + selectionGroups.size() + " group sets:");
-
- for ( Map.Entry<CategoryOptionGroupSet,Set<CategoryOptionGroup>> entry : selectionGroups.entrySet() )
- {
- String s = "";
-
- if ( entry.getValue() != null )
- {
- for ( CategoryOptionGroup group : entry.getValue() )
- {
- s += ": " + group.getName();
- }
-
- log.debug( "Group set " + entry.getKey().getName() + " (" + + entry.getValue().size() + ")" + s );
- }
- }
- }
}
}
@@ -528,34 +508,10 @@
{
//TODO: Should we replace this exhaustive search with a Hibernate query?
- if ( log.isInfoEnabled() )
- {
- String s = "";
-
- for ( DataElementCategoryOption option : dataElementCategoryOptions )
- {
- s += (s.isEmpty() ? "" : ", ") + option.getName();
- }
-
- log.debug( "addDataGroups() looking for options " + s );
- }
-
Collection<CategoryOptionGroup> allGroups = categoryService.getAllCategoryOptionGroups();
for ( CategoryOptionGroup group : allGroups )
{
- if ( log.isInfoEnabled() )
- {
- String s = "";
-
- for ( DataElementCategoryOption option : group.getMembers() )
- {
- s += ( s.isEmpty() ? "" : ", " ) + option.getName();
- }
-
- log.debug( "addDataGroups() looking in group " + group.getName() + ", options " + s );
- }
-
if ( group.getGroupSet() != null && CollectionUtils.containsAny( group.getMembers(), dataElementCategoryOptions ) )
{
addDataGroup( group.getGroupSet(), group );
@@ -714,7 +670,7 @@
int orgLevel = organisationUnitLevel;
- for (int i = thisOrHigherIndex; i >= 0; i-- )
+ for ( int i = thisOrHigherIndex; i >= 0; i-- )
{
while ( orgLevel > allApprovalLevels.get( i ).getOrgUnitLevel() )
{
@@ -763,26 +719,26 @@
if ( groups == null )
{
- DataApproval dataApproval = dataApprovalStore.getDataApproval( dataSet, period, orgUnit, null );
-
- log.debug("getDataApproval( " + orgUnit.getName() + " ) = " + ( dataApproval != null ) + " (no groups)" );
-
- return dataApproval;
+ DataApproval da = dataApprovalStore.getDataApproval( dataSet, period, orgUnit, null );
+
+ log.debug( "getDataApproval( " + orgUnit.getName() + " ) = " + ( da != null ) + " (no groups)" );
+
+ return da;
}
for ( CategoryOptionGroup group : groups )
{
- DataApproval dataApproval = dataApprovalStore.getDataApproval( dataSet, period, orgUnit, group );
-
- log.debug("getDataApproval( " + orgUnit.getName() + " ) = " + ( dataApproval != null ) + " (group: " + group.getName() + ")" );
-
- if ( dataApproval != null )
+ DataApproval da = dataApprovalStore.getDataApproval( dataSet, period, orgUnit, group );
+
+ log.debug( "getDataApproval( " + orgUnit.getName() + " ) = " + ( da != null ) + " (group: " + group.getName() + ")" );
+
+ if ( da != null )
{
- return dataApproval;
+ return da;
}
}
- log.debug("getDataApproval( " + orgUnit.getName() + " ) = false (none of " + groups.size() + " groups matched)" );
+ log.debug( "getDataApproval( " + orgUnit.getName() + " ) = false (none of " + groups.size() + " groups matched)" );
return null;
}
@@ -819,11 +775,11 @@
{
log.debug( "isUnapprovedBelow() orgUnit level " + orgUnitLevel + " matches approval level." );
- DataApproval d = getDataApproval( lowerIndex, orgUnit );
-
- log.debug( "isUnapprovedBelow() returns " + ( d == null ) + " after looking for approval for this orgUnit." );
-
- return ( d == null );
+ DataApproval da = getDataApproval( lowerIndex, orgUnit );
+
+ log.debug( "isUnapprovedBelow() returns " + ( da == null ) + " after looking for approval for this orgUnit." );
+
+ return ( da == null );
}
}
else if ( dataSetAssignedAtOrBelowLevel )