← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13959: Unused code

 

------------------------------------------------------------
revno: 13959
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2014-02-09 15:16:17 +0200
message:
  Unused code
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyAprilPeriodType.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyPeriodType.java
  dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/LWUITmodel/Patient.java
  dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java
  dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetActivityListAction.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/period/SixMonthlyAprilPeriodType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyAprilPeriodType.java	2014-02-08 18:09:18 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyAprilPeriodType.java	2014-02-09 13:16:17 +0000
@@ -28,10 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.ArrayList;
 import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
 
 /**
  * PeriodType for six-monthly Periods aligned to a financial year starting in
@@ -44,7 +41,7 @@
  */
 
 public class SixMonthlyAprilPeriodType
-        extends SixMonthlyAbstractPeriodType
+    extends SixMonthlyAbstractPeriodType
 {
     private static final long serialVersionUID = -2770872821413382644L;
 

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyPeriodType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyPeriodType.java	2014-02-08 18:09:18 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyPeriodType.java	2014-02-09 13:16:17 +0000
@@ -28,10 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.ArrayList;
 import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
 
 /**
  * PeriodType for six-monthly Periods. A valid six-monthly Period has startDate

=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/LWUITmodel/Patient.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/LWUITmodel/Patient.java	2014-02-07 20:25:49 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/LWUITmodel/Patient.java	2014-02-09 13:16:17 +0000
@@ -37,7 +37,6 @@
 
 import org.hisp.dhis.api.mobile.model.DataStreamSerializable;
 import org.hisp.dhis.api.mobile.model.PatientAttribute;
-import org.hisp.dhis.api.mobile.model.LWUITmodel.ProgramInstance;
 
 /**
  * @author Nguyen Kim Lai
@@ -241,27 +240,6 @@
     }
 
     @Override
-    public boolean equals( Object otherObject )
-    {
-        if ( this == otherObject )
-        {
-            return true;
-        }
-
-        if ( otherObject == null )
-        {
-            return false;
-        }
-
-        if ( getClass() != otherObject.getClass() )
-        {
-            return false;
-        }
-
-        return true;
-    }
-
-    @Override
     public void serializeVersion2_8( DataOutputStream out )
         throws IOException
     {

=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java	2014-02-07 20:25:49 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java	2014-02-09 13:16:17 +0000
@@ -56,7 +56,6 @@
 import org.hisp.dhis.api.mobile.model.Task;
 import org.hisp.dhis.api.mobile.model.LWUITmodel.LostEvent;
 import org.hisp.dhis.api.mobile.model.LWUITmodel.Notification;
-import org.hisp.dhis.api.mobile.model.LWUITmodel.Patient;
 import org.hisp.dhis.api.mobile.model.LWUITmodel.Section;
 import org.hisp.dhis.api.mobile.model.comparator.ActivityComparator;
 import org.hisp.dhis.dataelement.DataElement;
@@ -1064,29 +1063,6 @@
         return setting;
     }
 
-    private List<Program> generateEnrollmentProgramList( TrackedEntityInstance patient )
-    {
-        List<Program> programs = new ArrayList<Program>();
-
-        for ( Program program : programService.getPrograms( patient.getOrganisationUnit() ) )
-        {
-            if ( (program.isSingleEvent() && program.isRegistration()) || !program.isSingleEvent() )
-            {
-                // wrong here
-                if ( programInstanceService.getProgramInstances( patient, program ).size() == 0 )
-                {
-                    programs.add( program );
-                }
-                else
-                {
-                    // TODO handle
-                }
-            }
-        }
-
-        return programs;
-    }
-
     private boolean isNumber( String value )
     {
         try

=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java	2014-02-07 20:25:49 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java	2014-02-09 13:16:17 +0000
@@ -28,6 +28,12 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
 import org.hisp.dhis.api.mobile.IProgramService;
 import org.hisp.dhis.api.mobile.model.DataElement;
 import org.hisp.dhis.api.mobile.model.Model;
@@ -35,23 +41,13 @@
 import org.hisp.dhis.api.mobile.model.Program;
 import org.hisp.dhis.api.mobile.model.ProgramStage;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.program.ProgramInstance;
-import org.hisp.dhis.program.ProgramTrackedEntityAttribute;
 import org.hisp.dhis.program.ProgramStageDataElement;
 import org.hisp.dhis.program.ProgramStageSection;
 import org.hisp.dhis.program.ProgramTrackedEntityAttribute;
 import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
 import org.hisp.dhis.trackedentity.TrackedEntityAttributeOption;
-import org.hisp.dhis.trackedentity.TrackedEntityAttributeService;
 import org.springframework.beans.factory.annotation.Required;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
 public class DefaultProgramService
     implements IProgramService
 {
@@ -289,27 +285,6 @@
         return pr;
     }
 
-    private org.hisp.dhis.api.mobile.model.PatientAttribute getPatientAttributeForMobile( TrackedEntityAttribute pa )
-    {
-        TrackedEntityAttributeService patientAttributeService;
-        List<String> optionList = new ArrayList<String>();
-        if ( pa.getAttributeOptions() != null )
-        {
-            for ( TrackedEntityAttributeOption pao : pa.getAttributeOptions() )
-            {
-                optionList.add( pao.getName() );
-            }
-        }
-        org.hisp.dhis.api.mobile.model.PatientAttribute mobileAttribute = new org.hisp.dhis.api.mobile.model.PatientAttribute();
-        mobileAttribute.setName( pa.getName() );
-        mobileAttribute.setMandatory( pa.isMandatory() );
-        mobileAttribute.setType( pa.getValueType() );
-        mobileAttribute.setValue( "" );
-        mobileAttribute.setPredefinedValues( optionList );
-        mobileAttribute.setDisplayedInList( false );
-        return mobileAttribute;
-    }
-
     private org.hisp.dhis.api.mobile.model.PatientAttribute getPatientAttributeForMobile( ProgramTrackedEntityAttribute ppa )
     {
         TrackedEntityAttribute pa = ppa.getAttribute();

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetActivityListAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetActivityListAction.java	2014-02-07 20:25:49 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetActivityListAction.java	2014-02-09 13:16:17 +0000
@@ -37,8 +37,6 @@
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 
-import sun.rmi.server.Activation;
-
 import com.opensymphony.xwork2.Action;
 
 public class GetActivityListAction