← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3302: Moved UsernameComparator to api

 

------------------------------------------------------------
revno: 3302
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-04-06 18:03:34 +0200
message:
  Moved UsernameComparator to api
removed:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/comparator/
added:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/comparator/
renamed:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/comparator/UsernameComparator.java => dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/comparator/UsernameComparator.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTableService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserCredentials.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/error.html
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetOrgunitUserListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserGroupListAction.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/comparator/UsernameComparator.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/reporttable/ReportTableService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTableService.java	2011-02-23 21:08:31 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTableService.java	2011-04-06 16:03:34 +0000
@@ -40,6 +40,9 @@
 {
     String ID = ReportTableService.class.getName();
 
+    final String MODE_REPORT = "report";
+    final String MODE_REPORT_TABLE = "table";
+    
     /**
      * Populated data mart with the relevant aggregated data for this ReportTable.
      * 

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserCredentials.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserCredentials.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserCredentials.java	2011-04-06 16:03:34 +0000
@@ -90,6 +90,12 @@
 
         return username.equals( other.getUsername() );
     }
+    
+    @Override
+    public String toString()
+    {
+        return "[" + username + "]";
+    }
 
     // -------------------------------------------------------------------------
     // Getters and setters

=== added directory 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/comparator'
=== renamed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/comparator/UsernameComparator.java' => 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/comparator/UsernameComparator.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/comparator/UsernameComparator.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/comparator/UsernameComparator.java	2011-04-06 16:03:34 +0000
@@ -40,6 +40,16 @@
 {
     public int compare( UserCredentials uc0, UserCredentials uc1 )
     {
+        if ( uc0 == null )
+        {
+            return 1;
+        }
+        
+        if ( uc1 == null )
+        {
+            return -1;
+        }
+        
         return uc0.getUsername().compareTo( uc1.getUsername() );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java	2011-04-01 09:57:53 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java	2011-04-06 16:03:34 +0000
@@ -82,8 +82,6 @@
 {
     private static final Log log = LogFactory.getLog( DefaultReportTableService.class );
     
-    private static final String MODE_REPORT = "report";
-    private static final String MODE_REPORT_TABLE = "table";
     private static final String YES = "Yes";
     private static final String NO = "No";
     

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/error.html'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/error.html	2010-03-31 19:01:07 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/error.html	2011-04-06 16:03:34 +0000
@@ -2,12 +2,11 @@
 <html>
     <head>
         <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"><title>DHIS 2 - Error Occurred</title>
-        <style type="text/css" media="screen">
-            <!--
+        <style type="text/css">
             body
             {
                 color: white;
-                background-color: #425073;
+                background-color: #1d5288;
                 margin: 0px
             }
 
@@ -28,7 +27,7 @@
 
             #content
             {
-                font-family: Verdana, Geneva, Arial, sans-serif;
+                font-family: Arial, sans-serif;
                 background-color: transparent;
             }
 
@@ -48,8 +47,6 @@
                 font-weight: bold;
                 font-size: 24px
             }
-
-            -->
         </style>
     </head>
     <body>
@@ -57,10 +54,9 @@
             <div id="content">
                 <div id="logo"><img src="../images/logo_banner.png" alt="" /></div>
                 <div class="bodytext">
-                    <span class="headline">Aw, Snap! Something went wrong</span><br>
-					Do not panic... We've recorded in the log
-                </div> <br>
-                <input type="button" value="Go Back" onclick="history.go( -1 )">
+                    <span class="headline">Oops, something went wrong</span><br>
+					Do not panic... We recorded it in the log
+                </div>
             </div>
         </div>
     </body>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetOrgunitUserListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetOrgunitUserListAction.java	2010-12-30 09:13:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetOrgunitUserListAction.java	2011-04-06 16:03:34 +0000
@@ -126,8 +126,7 @@
             {
                 this.paging = createPaging( userService.getUsersByOrganisationUnitCount( organisationUnit ) );
                 
-                userCredentialsList = new ArrayList<UserCredentials>( userService.getUsersByOrganisationUnitBetween( organisationUnit, paging.getStartPos(), paging.getPageSize() ) );
-                
+                userCredentialsList = new ArrayList<UserCredentials>( userService.getUsersByOrganisationUnitBetween( organisationUnit, paging.getStartPos(), paging.getPageSize() ) );                
             }
         }
         

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserGroupListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserGroupListAction.java	2011-01-25 19:27:15 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserGroupListAction.java	2011-04-06 16:03:34 +0000
@@ -92,8 +92,6 @@
             userGroupList = new ArrayList<UserGroup>( userGroupService.getUserGroupsBetween( paging.getStartPos(), paging.getPageSize() ) );
         }
         
-//        userGroupList = new ArrayList<UserGroup>( userGroupService.getAllUserGroups() );
-        
         return SUCCESS;
     }
 }

=== removed directory 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/comparator'