← Back to team overview

dhis2-devs team mailing list archive

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

 

------------------------------------------------------------
revno: 13831
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-01-23 18:54:20 +0200
message:
  Unused code
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeService.java
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/usergroup/action/AddUserGroupFormAction.java
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/usergroup/action/EditUserGroupFormAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/FindBeneficiarytAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/ShowUpdatePatientAttributeAction.java
  dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.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/attribute/AttributeService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeService.java	2014-01-20 10:20:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeService.java	2014-01-23 16:54:20 +0000
@@ -28,7 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Collection;
 import java.util.Set;
 
 /**

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/usergroup/action/AddUserGroupFormAction.java'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/usergroup/action/AddUserGroupFormAction.java	2014-01-19 06:27:35 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/usergroup/action/AddUserGroupFormAction.java	2014-01-23 16:54:20 +0000
@@ -28,15 +28,15 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.opensymphony.xwork2.Action;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
 import org.hisp.dhis.attribute.Attribute;
 import org.hisp.dhis.attribute.AttributeService;
 import org.hisp.dhis.attribute.comparator.AttributeSortOrderComparator;
-import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
+import com.opensymphony.xwork2.Action;
 
 public class AddUserGroupFormAction
     implements Action

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/usergroup/action/EditUserGroupFormAction.java'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/usergroup/action/EditUserGroupFormAction.java	2014-01-19 06:27:35 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/usergroup/action/EditUserGroupFormAction.java	2014-01-23 16:54:20 +0000
@@ -28,17 +28,21 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.opensymphony.xwork2.Action;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 import org.hisp.dhis.attribute.Attribute;
 import org.hisp.dhis.attribute.AttributeService;
 import org.hisp.dhis.attribute.comparator.AttributeSortOrderComparator;
-import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.system.util.AttributeUtils;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserGroup;
 import org.hisp.dhis.user.UserGroupService;
 
-import java.util.*;
+import com.opensymphony.xwork2.Action;
 
 /**
  * @author Lars Helge Overland

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/FindBeneficiarytAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/FindBeneficiarytAction.java	2014-01-23 14:18:27 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/FindBeneficiarytAction.java	2014-01-23 16:54:20 +0000
@@ -33,139 +33,151 @@
 import java.util.Set;
 
 import org.hisp.dhis.patient.Patient;
-import org.hisp.dhis.patient.PatientService;
 import org.hisp.dhis.patientattributevalue.PatientAttributeValue;
 
 import com.opensymphony.xwork2.Action;
 
-public class FindBeneficiarytAction implements Action {
-	private static final String REDIRECT = "redirect";
-
-	// -------------------------------------------------------------------------
-	// Dependencies
-	// -------------------------------------------------------------------------
-
-	private PatientService patientService;
-
-	public void setPatientService(PatientService patientService) {
-		this.patientService = patientService;
-	}
-
-	// -------------------------------------------------------------------------
-	// Input & Output
-	// -------------------------------------------------------------------------
-
-	private Collection<Patient> patients;
-
-	public Collection<Patient> getPatients() {
-		return patients;
-	}
-
-	public void setPatients(Collection<Patient> patients) {
-		this.patients = patients;
-	}
-
-	private Set<PatientAttributeValue> pavSet;
-
-	public Set<PatientAttributeValue> getPavSet() {
-		return pavSet;
-	}
-
-	public void setPavSet(Set<PatientAttributeValue> pavSet) {
-		this.pavSet = pavSet;
-	}
-
-	private Set<PatientAttributeValue> patientAttributes;
-
-	public Set<PatientAttributeValue> getPatientAttributes() {
-		return patientAttributes;
-	}
-
-	public void setPatientAttributes(
-			Set<PatientAttributeValue> patientAttributes) {
-		this.patientAttributes = patientAttributes;
-	}
-
-	private String keyword;
-
-	public String getKeyword() {
-		return keyword;
-	}
-
-	public void setKeyword(String keyword) {
-		this.keyword = keyword;
-	}
-
-	private Integer organisationUnitId;
-
-	public Integer getOrganisationUnitId() {
-		return organisationUnitId;
-	}
-
-	public void setOrganisationUnitId(Integer organisationUnitId) {
-		this.organisationUnitId = organisationUnitId;
-	}
-
-	private Integer patientAttributeId;
-
-	public Integer getPatientAttributeId() {
-		return patientAttributeId;
-	}
-
-	public void setPatientAttributeId(Integer patientAttributeId) {
-		this.patientAttributeId = patientAttributeId;
-	}
-
-	private Integer patientId;
-
-	public Integer getPatientId() {
-		return patientId;
-	}
-
-	public void setPatientId(Integer patientId) {
-		this.patientId = patientId;
-	}
-
-	// Use in search related patient
-
-	private Integer originalPatientId;
-
-	public void setOriginalPatientId(Integer originalPatientId) {
-		this.originalPatientId = originalPatientId;
-	}
-
-	public Integer getOriginalPatientId() {
-		return originalPatientId;
-	}
-
-	private Integer relationshipTypeId;
-
-	public Integer getRelationshipTypeId() {
-		return relationshipTypeId;
-	}
-
-	public void setRelationshipTypeId(Integer relationshipTypeId) {
-		this.relationshipTypeId = relationshipTypeId;
-	}
-
-	@Override
-	public String execute() throws Exception {
-
-//		patients = patientService.searchPatientsForMobile(keyword,
-//				organisationUnitId, patientAttributeId);
-		pavSet = new HashSet<PatientAttributeValue>();
-
-		for (Patient p : patients) {
-			pavSet.addAll(p.getAttributeValues());
-		}
-
-		if (patients.size() == 1) {
-			Patient patient = patients.iterator().next();
-			patientId = patient.getId();
-
-			return REDIRECT;
-		}
-		return SUCCESS;
-	}
+public class FindBeneficiarytAction
+    implements Action
+{
+    private static final String REDIRECT = "redirect";
+
+    // -------------------------------------------------------------------------
+    // Input & Output
+    // -------------------------------------------------------------------------
+
+    private Collection<Patient> patients;
+
+    public Collection<Patient> getPatients()
+    {
+        return patients;
+    }
+
+    public void setPatients( Collection<Patient> patients )
+    {
+        this.patients = patients;
+    }
+
+    private Set<PatientAttributeValue> pavSet;
+
+    public Set<PatientAttributeValue> getPavSet()
+    {
+        return pavSet;
+    }
+
+    public void setPavSet( Set<PatientAttributeValue> pavSet )
+    {
+        this.pavSet = pavSet;
+    }
+
+    private Set<PatientAttributeValue> patientAttributes;
+
+    public Set<PatientAttributeValue> getPatientAttributes()
+    {
+        return patientAttributes;
+    }
+
+    public void setPatientAttributes( Set<PatientAttributeValue> patientAttributes )
+    {
+        this.patientAttributes = patientAttributes;
+    }
+
+    private String keyword;
+
+    public String getKeyword()
+    {
+        return keyword;
+    }
+
+    public void setKeyword( String keyword )
+    {
+        this.keyword = keyword;
+    }
+
+    private Integer organisationUnitId;
+
+    public Integer getOrganisationUnitId()
+    {
+        return organisationUnitId;
+    }
+
+    public void setOrganisationUnitId( Integer organisationUnitId )
+    {
+        this.organisationUnitId = organisationUnitId;
+    }
+
+    private Integer patientAttributeId;
+
+    public Integer getPatientAttributeId()
+    {
+        return patientAttributeId;
+    }
+
+    public void setPatientAttributeId( Integer patientAttributeId )
+    {
+        this.patientAttributeId = patientAttributeId;
+    }
+
+    private Integer patientId;
+
+    public Integer getPatientId()
+    {
+        return patientId;
+    }
+
+    public void setPatientId( Integer patientId )
+    {
+        this.patientId = patientId;
+    }
+
+    // Use in search related patient
+
+    private Integer originalPatientId;
+
+    public void setOriginalPatientId( Integer originalPatientId )
+    {
+        this.originalPatientId = originalPatientId;
+    }
+
+    public Integer getOriginalPatientId()
+    {
+        return originalPatientId;
+    }
+
+    private Integer relationshipTypeId;
+
+    public Integer getRelationshipTypeId()
+    {
+        return relationshipTypeId;
+    }
+
+    public void setRelationshipTypeId( Integer relationshipTypeId )
+    {
+        this.relationshipTypeId = relationshipTypeId;
+    }
+
+    @Override
+    public String execute()
+        throws Exception
+    {
+
+        // patients = patientService.searchPatientsForMobile(keyword,
+        // organisationUnitId, patientAttributeId);
+        pavSet = new HashSet<PatientAttributeValue>();
+
+        for ( Patient p : patients )
+        {
+            pavSet.addAll( p.getAttributeValues() );
+        }
+
+        if ( patients.size() == 1 )
+        {
+            Patient patient = patients.iterator().next();
+            patientId = patient.getId();
+
+            return REDIRECT;
+        }
+        return SUCCESS;
+    }
 
 }

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml	2014-01-22 04:25:46 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml	2014-01-23 16:54:20 +0000
@@ -244,7 +244,6 @@
 		id="org.hisp.dhis.light.namebaseddataentry.action.FindBeneficiarytAction"
 		class="org.hisp.dhis.light.namebaseddataentry.action.FindBeneficiarytAction"
 		scope="prototype">
-		<property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
 	</bean>
 
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/ShowUpdatePatientAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/ShowUpdatePatientAttributeAction.java	2014-01-23 14:18:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/ShowUpdatePatientAttributeAction.java	2014-01-23 16:54:20 +0000
@@ -38,14 +38,11 @@
 import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.program.Program;
 import org.hisp.dhis.program.ProgramService;
-import org.springframework.beans.factory.annotation.Autowired;
 
 import com.opensymphony.xwork2.Action;
 
 /**
  * @author Chau Thu Tran
- * 
- * @version $ShowUpdatePatientAttributeAction.java Mar 26, 2012 1:58:26 PM$
  */
 public class ShowUpdatePatientAttributeAction
     implements Action

=== modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java'
--- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java	2014-01-23 13:11:25 +0000
+++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java	2014-01-23 16:54:20 +0000
@@ -28,10 +28,20 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+
 import org.hisp.dhis.attribute.AttributeValue;
 import org.hisp.dhis.attribute.comparator.AttributeValueSortOrderComparator;
 import org.hisp.dhis.dataset.DataSet;
@@ -68,18 +78,8 @@
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
 
 /**
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
@@ -88,8 +88,6 @@
 @RequestMapping( value = "/csd" )
 public class CsdController
 {
-    private static final Log log = LogFactory.getLog( CsdController.class );
-
     private static final String SOAP_CONTENT_TYPE = "application/soap+xml";
 
     // Name of group
@@ -110,7 +108,7 @@
     {
         try
         {
-            Class[] classes = new Class[]{
+            Class<?>[] classes = new Class<?>[]{
                 Envelope.class
             };