------------------------------------------------------------ revno: 13092 committer: Lars Helge Ă˜verland <[email protected]> branch nick: dhis2 timestamp: Sun 2013-12-01 23:32:50 +0100 message: Cleanup modified: dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/EnrollmentServiceTest.java dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/controller/FacilityAdvice.java dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/controller/FacilityController.java dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/InterpretationController.java dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SearchEventsAction.java dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/UploadAnonymousEventAction.java dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/SaveBeneficiaryAction.java dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DefineDataSetAssociationsAction.java dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/smscommand/CreateSMSCommandForm.java dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/GetProgramStageSectionListAction.java dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml
-- 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-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/EnrollmentServiceTest.java' --- dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/EnrollmentServiceTest.java 2013-10-15 09:22:18 +0000 +++ dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/EnrollmentServiceTest.java 2013-12-01 22:32:50 +0000 @@ -28,6 +28,14 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.mockito.Mockito.mock; + +import java.util.Date; +import java.util.HashSet; +import java.util.List; + import org.hamcrest.CoreMatchers; import org.hisp.dhis.DhisTest; import org.hisp.dhis.common.IdentifiableObjectManager; @@ -41,6 +49,7 @@ import org.hisp.dhis.i18n.I18nFormat; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.patient.Patient; +import org.hisp.dhis.period.Cal; import org.hisp.dhis.program.Program; import org.hisp.dhis.program.ProgramInstance; import org.hisp.dhis.program.ProgramInstanceService; @@ -48,14 +57,6 @@ import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; -import java.util.Date; -import java.util.HashSet; -import java.util.List; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; -import static org.mockito.Mockito.mock; - /** * @author Morten Olav Hansen <[email protected]> */ @@ -221,7 +222,7 @@ assertEquals( maleA.getUid(), enrollment.getPerson() ); assertEquals( programA.getUid(), enrollment.getProgram() ); - Date MARCH_20_81 = new Date( 81, 2, 20 ); + Date MARCH_20_81 = new Cal( 81, 2, 20 ).time(); enrollment.setDateOfEnrollment( MARCH_20_81 ); enrollmentService.updateEnrollment( enrollment ); === modified file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/controller/FacilityAdvice.java' --- dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/controller/FacilityAdvice.java 2013-11-01 11:24:53 +0000 +++ dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/controller/FacilityAdvice.java 2013-12-01 22:32:50 +0000 @@ -62,8 +62,6 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler; import org.springframework.web.servlet.mvc.multiaction.NoSuchRequestHandlingMethodException; -import java.io.IOException; - /** * @author Morten Olav Hansen <[email protected]> */ @@ -75,7 +73,7 @@ //-------------------------------------------------------------------------- @ExceptionHandler({ HttpClientErrorException.class, HttpServerErrorException.class }) - public ResponseEntity<String> statusCodeExceptionHandler( HttpStatusCodeException ex ) throws IOException + public ResponseEntity<String> statusCodeExceptionHandler( HttpStatusCodeException ex ) { HttpHeaders headers = new HttpHeaders(); headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE ); @@ -85,7 +83,7 @@ } @ExceptionHandler({ DeleteNotAllowedException.class, HierarchyViolationException.class }) - public ResponseEntity<String> handleForbidden( Exception ex ) throws IOException + public ResponseEntity<String> handleForbidden( Exception ex ) { HttpHeaders headers = new HttpHeaders(); headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE ); @@ -95,7 +93,7 @@ } @ExceptionHandler( { ETagVerificationException.class, UuidFormatException.class } ) - public ResponseEntity<String> handlePreconditionFailed( Exception ex ) throws IOException + public ResponseEntity<String> handlePreconditionFailed( Exception ex ) { HttpHeaders headers = new HttpHeaders(); headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE ); @@ -105,7 +103,7 @@ } @ExceptionHandler({ FacilityNotFoundException.class }) - public ResponseEntity<String> handleNotFound( Exception ex ) throws IOException + public ResponseEntity<String> handleNotFound( Exception ex ) { HttpHeaders headers = new HttpHeaders(); headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE ); @@ -115,7 +113,7 @@ } @ExceptionHandler({ DuplicateCodeException.class, DuplicateUidException.class, DuplicateUuidException.class }) - public ResponseEntity<String> handleConflict( Exception ex ) throws IOException + public ResponseEntity<String> handleConflict( Exception ex ) { HttpHeaders headers = new HttpHeaders(); headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE ); === modified file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/controller/FacilityController.java' --- dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/controller/FacilityController.java 2013-11-19 20:19:30 +0000 +++ dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/controller/FacilityController.java 2013-12-01 22:32:50 +0000 @@ -28,7 +28,29 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import com.fasterxml.jackson.databind.ObjectMapper; +import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo; + +import java.beans.PropertyEditorSupport; +import java.io.IOException; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.validation.ConstraintViolation; +import javax.validation.Validator; +import javax.validation.groups.Default; + import org.hisp.dhis.api.controller.organisationunit.OrganisationUnitLevelController; import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator; import org.hisp.dhis.dataset.DataSet; @@ -69,27 +91,7 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseStatus; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.validation.ConstraintViolation; -import javax.validation.Validator; -import javax.validation.groups.Default; -import java.beans.PropertyEditorSupport; -import java.io.IOException; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.UUID; - -import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo; +import com.fasterxml.jackson.databind.ObjectMapper; /** * @author Morten Olav Hansen <[email protected]> @@ -763,7 +765,7 @@ @RequestMapping( value = "/{id}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE ) @PreAuthorize( "hasRole('F_FRED_DELETE') or hasRole('ALL')" ) - public ResponseEntity<String> deleteFacility( @PathVariable String id ) throws HierarchyViolationException, IOException, FacilityNotFoundException + public ResponseEntity<String> deleteFacility( @PathVariable String id ) throws HierarchyViolationException, FacilityNotFoundException { OrganisationUnit organisationUnit = getOrganisationUnit( id ); === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/InterpretationController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/InterpretationController.java 2013-12-01 16:41:00 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/InterpretationController.java 2013-12-01 22:32:50 +0000 @@ -28,7 +28,14 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import org.hisp.dhis.api.controller.exception.NotFoundException; +import java.util.ArrayList; +import java.util.Date; +import java.util.Iterator; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + import org.hisp.dhis.api.utils.ContextUtils; import org.hisp.dhis.chart.Chart; import org.hisp.dhis.chart.ChartService; @@ -57,13 +64,6 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.ArrayList; -import java.util.Date; -import java.util.Iterator; -import java.util.List; - /** * @author Lars Helge Overland */ === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java 2013-11-25 06:30:47 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java 2013-12-01 22:32:50 +0000 @@ -51,7 +51,6 @@ import org.hisp.dhis.program.ProgramStageInstance; import org.hisp.dhis.program.ProgramStageInstanceService; import org.hisp.dhis.program.ProgramStageSection; -import org.hisp.dhis.program.ProgramStageSectionService; import org.hisp.dhis.program.ProgramStageService; import org.hisp.dhis.program.comparator.ProgramStageDataElementSortOrderComparator; import org.hisp.dhis.program.comparator.ProgramStageSectionSortOrderComparator; @@ -104,13 +103,6 @@ this.selectionManager = selectionManager; } - private ProgramStageSectionService programStageSectionService; - - public void setProgramStageSectionService( ProgramStageSectionService programStageSectionService ) - { - this.programStageSectionService = programStageSectionService; - } - private OrganisationUnitService organisationUnitService; public void setOrganisationUnitService( OrganisationUnitService organisationUnitService ) === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SearchEventsAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SearchEventsAction.java 2013-11-25 03:07:49 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SearchEventsAction.java 2013-12-01 22:32:50 +0000 @@ -269,8 +269,6 @@ this.useFormNameDataElement = useFormNameDataElement; } - private boolean accessPrivateInfo = false; - // ------------------------------------------------------------------------- // Implementation Action // ------------------------------------------------------------------------- === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/UploadAnonymousEventAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/UploadAnonymousEventAction.java 2013-11-25 06:30:47 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/UploadAnonymousEventAction.java 2013-12-01 22:32:50 +0000 @@ -28,12 +28,15 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import com.fasterxml.jackson.core.type.TypeReference; -import com.opensymphony.xwork2.Action; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +import javax.servlet.ServletInputStream; + import org.apache.struts2.ServletActionContext; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataelement.DataElementService; -import org.hisp.dhis.dxf2.events.event.Coordinate; import org.hisp.dhis.dxf2.utils.JacksonUtils; import org.hisp.dhis.i18n.I18nFormat; import org.hisp.dhis.organisationunit.OrganisationUnit; @@ -50,10 +53,8 @@ import org.hisp.dhis.user.CurrentUserService; import org.springframework.beans.factory.annotation.Autowired; -import javax.servlet.ServletInputStream; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; +import com.fasterxml.jackson.core.type.TypeReference; +import com.opensymphony.xwork2.Action; /** * @author Morten Olav Hansen <[email protected]> === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2013-11-25 03:07:49 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2013-12-01 22:32:50 +0000 @@ -93,8 +93,6 @@ ref="org.hisp.dhis.program.ProgramStageInstanceService" /> <property name="selectionManager" ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" /> - <property name="programStageSectionService" - ref="org.hisp.dhis.program.ProgramStageSectionService" /> <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" /> <property name="programIndicatorService" === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/SaveBeneficiaryAction.java' --- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/SaveBeneficiaryAction.java 2013-11-18 11:50:20 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/SaveBeneficiaryAction.java 2013-12-01 22:32:50 +0000 @@ -28,8 +28,15 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import com.opensymphony.xwork2.Action; -import com.opensymphony.xwork2.ActionContext; +import java.util.Collection; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import javax.servlet.http.HttpServletRequest; + import org.apache.commons.lang.math.NumberUtils; import org.apache.struts2.StrutsStatics; import org.hisp.dhis.light.utils.FormUtils; @@ -53,15 +60,8 @@ import org.joda.time.format.DateTimeFormatter; import org.joda.time.format.ISODateTimeFormat; -import javax.servlet.http.HttpServletRequest; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; +import com.opensymphony.xwork2.Action; +import com.opensymphony.xwork2.ActionContext; public class SaveBeneficiaryAction implements Action === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DefineDataSetAssociationsAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DefineDataSetAssociationsAction.java 2013-11-19 10:57:35 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DefineDataSetAssociationsAction.java 2013-12-01 22:32:50 +0000 @@ -28,26 +28,18 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import com.opensymphony.xwork2.Action; import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.dataset.DataSetService; -import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.organisationunit.OrganisationUnitService; import org.hisp.dhis.oust.manager.SelectionTreeManager; -import org.springframework.beans.factory.annotation.Autowired; -import java.util.HashSet; -import java.util.Set; +import com.opensymphony.xwork2.Action; /** * @author Kristian - * @version $Id: DefineDataSetAssociationsAction.java 3648 2007-10-15 22:47:45Z - * larshelg $ */ public class DefineDataSetAssociationsAction implements Action { - // ------------------------------------------------------------------------- // Dependencies // ------------------------------------------------------------------------- @@ -66,14 +58,6 @@ this.dataSetService = dataSetService; } - private OrganisationUnitService organisationUnitService; - - @Autowired - public void setOrganisationUnitService( OrganisationUnitService organisationUnitService ) - { - this.organisationUnitService = organisationUnitService; - } - // ------------------------------------------------------------------------- // Input & Output // ------------------------------------------------------------------------- === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/smscommand/CreateSMSCommandForm.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/smscommand/CreateSMSCommandForm.java 2013-11-20 04:49:25 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/smscommand/CreateSMSCommandForm.java 2013-12-01 22:32:50 +0000 @@ -28,16 +28,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import java.util.HashSet; -import java.util.Set; - import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.dataset.DataSetService; import org.hisp.dhis.sms.parse.ParserType; -import org.hisp.dhis.smscommand.SMSCode; import org.hisp.dhis.smscommand.SMSCommand; import org.hisp.dhis.smscommand.SMSCommandService; -import org.hisp.dhis.smscommand.SMSSpecialCharacter; import org.hisp.dhis.user.UserGroup; import org.hisp.dhis.user.UserGroupService; === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/GetProgramStageSectionListAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/GetProgramStageSectionListAction.java 2013-11-19 06:51:39 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/GetProgramStageSectionListAction.java 2013-12-01 22:32:50 +0000 @@ -34,7 +34,6 @@ import org.hisp.dhis.program.ProgramStage; import org.hisp.dhis.program.ProgramStageSection; -import org.hisp.dhis.program.ProgramStageSectionService; import org.hisp.dhis.program.ProgramStageService; import org.hisp.dhis.program.comparator.ProgramStageSectionSortOrderComparator; @@ -58,13 +57,6 @@ this.programStageService = programStageService; } - private ProgramStageSectionService programStageSectionService; - - public void setProgramStageSectionService( ProgramStageSectionService programStageSectionService ) - { - this.programStageSectionService = programStageSectionService; - } - // ------------------------------------------------------------------------- // Input/Output // ------------------------------------------------------------------------- === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2013-11-28 06:19:32 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2013-12-01 22:32:50 +0000 @@ -386,8 +386,6 @@ class="org.hisp.dhis.patient.action.programstage.GetProgramStageSectionAction" scope="prototype"> <property name="programStageService" ref="org.hisp.dhis.program.ProgramStageService" /> - <property name="programStageSectionService" - ref="org.hisp.dhis.program.ProgramStageSectionService" /> </bean> <bean
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : [email protected] Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp

