=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/databrowser/DefaultDataBrowserGridService.java' --- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/databrowser/DefaultDataBrowserGridService.java 2013-08-23 16:00:30 +0000 +++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/databrowser/DefaultDataBrowserGridService.java 2014-01-24 08:41:50 +0000 @@ -317,13 +317,10 @@ String formatString = Period.DEFAULT_DATE_FORMAT; SimpleDateFormat sdf = new SimpleDateFormat( formatString ); - Date date1 = new Date(); - Date date2 = new Date(); - try { - date1 = sdf.parse( fromDate ); - date2 = sdf.parse( toDate ); + Date date1 = sdf.parse( fromDate ); + Date date2 = sdf.parse( toDate ); List periods = new ArrayList( periodService.getPeriodsBetweenDates( periodType, date1, date2 ) ); === modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java' --- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java 2013-11-27 19:08:59 +0000 +++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java 2014-01-24 08:41:50 +0000 @@ -155,7 +155,7 @@ { String[] keyArray = key.split( DIMENSION_SEP ); - Assert.notNull( keyArray[periodIndex], keyArray.toString() ); + Assert.notNull( keyArray[periodIndex] ); List periods = dataPeriodAggregationPeriodMap.get( PeriodType.getPeriodFromIsoString( keyArray[periodIndex] ) ); === modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java' --- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java 2014-01-24 04:47:13 +0000 +++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java 2014-01-24 08:41:50 +0000 @@ -29,9 +29,14 @@ */ -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.hisp.dhis.common.IdentifiableObjectManager; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataelement.DataElementService; import org.hisp.dhis.dxf2.events.person.Person; @@ -64,13 +69,8 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.Assert; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; -import java.util.HashSet; -import java.util.List; -import java.util.Set; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; /** * @author Morten Olav Hansen @@ -113,9 +113,6 @@ private PatientCommentService patientCommentService; @Autowired - private IdentifiableObjectManager manager; - - @Autowired private EventStore eventStore; @Autowired === modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/DefaultEventStore.java' --- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/DefaultEventStore.java 2013-11-25 10:48:06 +0000 +++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/DefaultEventStore.java 2014-01-24 08:41:50 +0000 @@ -205,13 +205,13 @@ if ( rowSet.getBoolean( "ps_capturecoordinates" ) ) { - Coordinate coordinate = new Coordinate(); Double psi_longitude = rowSet.getDouble( "psi_longitude" ); Double psi_latitude = rowSet.getDouble( "psi_latitude" ); if ( !StringUtils.isEmpty( psi_longitude ) && !StringUtils.isEmpty( psi_latitude ) ) { - coordinate = new Coordinate( psi_longitude, psi_latitude ); + Coordinate coordinate = new Coordinate( psi_longitude, psi_latitude ); + try { List list = objectMapper.readValue( coordinate.getCoordinateString(), === modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/person/JacksonPersonService.java' --- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/person/JacksonPersonService.java 2013-10-15 07:40:07 +0000 +++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/person/JacksonPersonService.java 2014-01-24 08:41:50 +0000 @@ -28,19 +28,18 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.Charset; + import org.hisp.dhis.dxf2.importsummary.ImportSummaries; import org.hisp.dhis.dxf2.importsummary.ImportSummary; -import org.hisp.dhis.system.notification.Notifier; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.StreamUtils; -import java.io.IOException; -import java.io.InputStream; -import java.nio.charset.Charset; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.dataformat.xml.XmlMapper; /** * @author Morten Olav Hansen @@ -48,9 +47,6 @@ @Transactional public class JacksonPersonService extends AbstractPersonService { - @Autowired - private Notifier notifier; - // ------------------------------------------------------------------------- // Implementation // ------------------------------------------------------------------------- === modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultObjectBridge.java' --- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultObjectBridge.java 2013-12-13 09:58:21 +0000 +++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultObjectBridge.java 2014-01-24 08:41:50 +0000 @@ -28,6 +28,14 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hisp.dhis.common.IdentifiableObject; @@ -42,14 +50,6 @@ import org.hisp.dhis.user.UserService; import org.springframework.beans.factory.annotation.Autowired; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - /** * @author Morten Olav Hansen */ @@ -344,17 +344,16 @@ } catch ( NullPointerException ignored ) { + objectName = "UNKNOWN_NAME (" + object.getClass().getName() + ")"; } if ( objects.size() > 1 ) { - log.debug( "Multiple objects found for " + - (objectName == null ? objectName : "UNKNOWN_NAME (" + object.getClass().getName() + ")") + ", object discarded, returning null." ); + log.debug( "Multiple objects found for " + objectName + ", object discarded, returning null." ); } else { - log.debug( "No object found for " + - (objectName == null ? objectName : "UNKNOWN_NAME (" + object.getClass().getName() + ")") + ", returning null." ); + log.debug( "No object found for " + objectName + ", returning null." ); } } === modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/pdfform/PdfFieldCell.java' --- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/pdfform/PdfFieldCell.java 2013-11-26 08:13:23 +0000 +++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/pdfform/PdfFieldCell.java 2014-01-24 08:41:50 +0000 @@ -28,6 +28,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import java.io.IOException; + +import com.lowagie.text.DocumentException; import com.lowagie.text.Element; import com.lowagie.text.Phrase; import com.lowagie.text.Rectangle; @@ -49,7 +52,6 @@ /** * @author James Chang */ - public class PdfFieldCell implements PdfPCellEvent { @@ -148,7 +150,6 @@ { try { - PdfContentByte canvasText = canvases[PdfPTable.TEXTCANVAS]; if ( type == TYPE_RADIOBUTTON ) @@ -158,43 +159,38 @@ float leftLoc = rect.getLeft(); float rightLoc = rect.getLeft() + RADIOBUTTON_WIDTH; - try + String text; + String value; + + for ( int i = 0; i < texts.length; i++ ) { - String text; - String value; - - for ( int i = 0; i < texts.length; i++ ) + + text = texts[i]; + value = values[i]; + + Rectangle radioRec = new Rectangle( leftLoc, rect.getTop() - height, rightLoc, rect.getTop() ); + + RadioCheckField rf = new RadioCheckField( writer, radioRec, "RDBtn_" + text, value ); + + if ( value != null && value.equals( checkValue ) ) { - - text = texts[i]; - value = values[i]; - - Rectangle radioRec = new Rectangle( leftLoc, rect.getTop() - height, rightLoc, rect.getTop() ); - - RadioCheckField rf = new RadioCheckField( writer, radioRec, "RDBtn_" + text, value ); - - if ( value == checkValue ) - rf.setChecked( true ); - - rf.setBorderColor( GrayColor.GRAYBLACK ); - rf.setBackgroundColor( GrayColor.GRAYWHITE ); - rf.setCheckType( RadioCheckField.TYPE_CIRCLE ); - - parent.addKid( rf.getRadioField() ); - - leftLoc = rightLoc; - rightLoc += width; - - ColumnText.showTextAligned( canvasText, Element.ALIGN_LEFT, new Phrase( text ), leftLoc - + RADIOBUTTON_TEXTOFFSET, height, 0 ); - - leftLoc = rightLoc; - rightLoc += RADIOBUTTON_WIDTH; + rf.setChecked( true ); } - } - catch ( Exception ex ) - { - throw new RuntimeException( ex.getMessage() ); + + rf.setBorderColor( GrayColor.GRAYBLACK ); + rf.setBackgroundColor( GrayColor.GRAYWHITE ); + rf.setCheckType( RadioCheckField.TYPE_CIRCLE ); + + parent.addKid( rf.getRadioField() ); + + leftLoc = rightLoc; + rightLoc += width; + + ColumnText.showTextAligned( canvasText, Element.ALIGN_LEFT, new Phrase( text ), leftLoc + + RADIOBUTTON_TEXTOFFSET, height, 0 ); + + leftLoc = rightLoc; + rightLoc += RADIOBUTTON_WIDTH; } writer.addAnnotation( parent ); @@ -237,11 +233,11 @@ if ( type == TYPE_TEXT_ORGUNIT ) { formField.setAdditionalActions( PdfName.BL, PdfAction.javaScript( - "if(event.value == '') app.alert('Warning! Please Enter The Org ID.');", writer ) ); + "if(event.value == '') app.alert('Please enter org unit identifier');", writer ) ); } - // TYPE_TEXT_NUMBER and TYPE_CHECKBOX cases included as well here. - + // TYPE_TEXT_NUMBER and TYPE_CHECKBOX cases included as well here + formField.setWidget( new Rectangle( rect.getLeft() + offSetLeft, rect.getTop() - height - offSetTop, rect.getLeft() + width + offSetLeft, rect.getTop() - offSetTop ), PdfAnnotation.HIGHLIGHT_NONE ); @@ -251,7 +247,11 @@ writer.addAnnotation( formField ); } - catch ( Exception ex ) + catch ( DocumentException ex ) + { + throw new RuntimeException( ex.getMessage() ); + } + catch ( IOException ex ) { throw new RuntimeException( ex.getMessage() ); } === modified file 'dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java' --- dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java 2013-12-26 03:01:38 +0000 +++ dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java 2014-01-24 08:41:50 +0000 @@ -73,9 +73,9 @@ public class DefaultCaseAggregationConditionService implements CaseAggregationConditionService { - private final String INVALID_CONDITION = "Invalid condition"; + private static final String INVALID_CONDITION = "Invalid condition"; - private final String IN_CONDITION_GET_ALL = "*"; + private static final String IN_CONDITION_GET_ALL = "*"; // ------------------------------------------------------------------------- // Dependencies === modified file 'dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/hibernate/HibernateCaseAggregationConditionStore.java' --- dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/hibernate/HibernateCaseAggregationConditionStore.java 2013-12-26 08:38:18 +0000 +++ dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/hibernate/HibernateCaseAggregationConditionStore.java 2014-01-24 08:41:50 +0000 @@ -88,16 +88,12 @@ extends HibernateIdentifiableObjectStore implements CaseAggregationConditionStore { - private final String IS_NULL = "is null"; - - private final String IN_CONDITION_GET_ALL = "*"; - - private final String IN_CONDITION_START_SIGN = "@"; - - private final String IN_CONDITION_END_SIGN = "#"; - - private final String IN_CONDITION_COUNT_X_TIMES = "COUNT"; - + private static final String IS_NULL = "is null"; + private static final String IN_CONDITION_GET_ALL = "*"; + private static final String IN_CONDITION_START_SIGN = "@"; + private static final String IN_CONDITION_END_SIGN = "#"; + private static final String IN_CONDITION_COUNT_X_TIMES = "COUNT"; + public static final String STORED_BY_DHIS_SYSTEM = "DHIS-System"; // ------------------------------------------------------------------------- @@ -646,7 +642,7 @@ if ( attributeId.split( SEPARATOR_ID ).length == 2 ) { - sql += " AND _pav.patientattributeid=" + attributeId.split( "." )[0] + sql += " AND _pav.patientattributeid=" + attributeId.split( "\\." )[0] + " AND DATE(now) - DATE( _pav.value ) "; } if ( isExist ) @@ -856,8 +852,7 @@ sql += " UNION "; sql += "(select distinct organisationunitid from programstageinstance where organisationunitid is not null)"; - Collection orgunitIds = new HashSet(); - orgunitIds = jdbcTemplate.query( sql, new RowMapper() + Collection orgunitIds = jdbcTemplate.query( sql, new RowMapper() { public Integer mapRow( ResultSet rs, int rowNum ) throws SQLException === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/synchronous/ExportPivotViewService.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/synchronous/ExportPivotViewService.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/synchronous/ExportPivotViewService.java 2014-01-24 08:41:50 +0000 @@ -70,7 +70,7 @@ DATAVALUE, INDICATORVALUE } - public static int PRECISION = 5; + public static final int PRECISION = 5; // ------------------------------------------------------------------------- // Dependencies === 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-01-23 14:18:27 +0000 +++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/LWUITmodel/Patient.java 2014-01-24 08:41:50 +0000 @@ -440,7 +440,7 @@ if ( din.readBoolean() ) { char dobTypeDeserialized = din.readChar(); - this.setDobType( new Character( dobTypeDeserialized ) ); + this.setDobType( Character.valueOf( dobTypeDeserialized ) ); } else { === modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/MobileOrgUnitLinks.java' --- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/MobileOrgUnitLinks.java 2013-11-05 08:24:51 +0000 +++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/MobileOrgUnitLinks.java 2014-01-24 08:41:50 +0000 @@ -39,6 +39,8 @@ public class MobileOrgUnitLinks implements DataStreamSerializable { + public static final double currentVersion = 2.11; + private String clientVersion; private int id; @@ -59,8 +61,6 @@ private String searchUrl; - public static double currentVersion = 2.11; - private String updateNewVersionUrl; private String updateContactUrl; === 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-01-23 14:18:27 +0000 +++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2014-01-24 08:41:50 +0000 @@ -416,7 +416,7 @@ if ( patients.size() > 1 ) { - String patientsInfo = new String(); + String patientsInfo = ""; for ( Patient each : patients ) { @@ -895,8 +895,7 @@ patientModel.setRelationships( relationshipList ); // Set available enrollment programs - List enrollmentProgramList = new ArrayList(); - enrollmentProgramList = generateEnrollmentProgramList( patient ); + List enrollmentProgramList = generateEnrollmentProgramList( patient ); List enrollmentProgramListMobileList = new ArrayList(); for ( Program enrollmentProgram : enrollmentProgramList ) @@ -1179,7 +1178,7 @@ if ( patients.size() > 1 ) { - String patientsInfo = new String(); + String patientsInfo = ""; for ( Patient each : patients ) { @@ -1466,7 +1465,7 @@ public Collection getPatientAtts( String programId ) { - Collection patientAttributes = new HashSet(); + Collection patientAttributes = null; if ( programId != null && !programId.trim().equals( "" ) ) { @@ -1643,7 +1642,7 @@ if ( patients.size() > 1 ) { - String patientsInfo = new String(); + String patientsInfo = ""; int i = 1; String name = ""; === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientReminderService.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientReminderService.java 2014-01-23 14:18:27 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientReminderService.java 2014-01-24 08:41:50 +0000 @@ -52,9 +52,9 @@ public class DefaultPatientReminderService implements PatientReminderService { - private final String ATTRIBUTE = "attributeid"; + private static final String ATTRIBUTE = "attributeid"; - private final Pattern ATTRIBUTE_PATTERN = Pattern.compile( "\\{(" + ATTRIBUTE + ")=(\\w+)\\}" ); + private static final Pattern ATTRIBUTE_PATTERN = Pattern.compile( "\\{(" + ATTRIBUTE + ")=(\\w+)\\}" ); // ------------------------------------------------------------------------- // Dependency === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2014-01-23 17:00:21 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2014-01-24 08:41:50 +0000 @@ -734,9 +734,8 @@ String id = resultSet.getString( "patientreminderid" ); String expression = resultSet.getString( "templatemessage" ); - expression = expression.replaceAll( "{patient-name}", "{attributeid=" + uid + "}" ); - executeSql( "UPDATE patientreminder SET templatemessage='" + expression + "' WHERE patientreminderid=" - + id ); + expression = expression.replaceAll( "\\{patient-name\\}", "\\{attributeid=" + uid + "\\}" ); + executeSql( "UPDATE patientreminder SET templatemessage='" + expression + "' WHERE patientreminderid=" + id ); } } catch ( Exception ex ) === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java 2013-11-13 04:19:10 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java 2014-01-24 08:41:50 +0000 @@ -874,9 +874,7 @@ i18nMatcher.appendTail( sb ); - String result = sb.toString(); - - result.replaceAll( "", "" ); + String result = sb.toString().replaceAll( "", "" ); return result; } === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramExpressionService.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramExpressionService.java 2014-01-08 02:53:44 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramExpressionService.java 2014-01-24 08:41:50 +0000 @@ -52,10 +52,10 @@ public class DefaultProgramExpressionService implements ProgramExpressionService { - private final String regExp = "\\[" + OBJECT_PROGRAM_STAGE_DATAELEMENT + SEPARATOR_OBJECT + "([a-zA-Z0-9\\- ]+[" + private static final String regExp = "\\[" + OBJECT_PROGRAM_STAGE_DATAELEMENT + SEPARATOR_OBJECT + "([a-zA-Z0-9\\- ]+[" + SEPARATOR_ID + "[a-zA-Z0-9\\- ]+]*)" + "\\]"; - private final String INVALID_CONDITION = "Invalid condition"; + private static final String INVALID_CONDITION = "Invalid condition"; // ------------------------------------------------------------------------- // Dependencies === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/ProgramStageSectionDeletionHandler.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/ProgramStageSectionDeletionHandler.java 2014-01-09 10:55:02 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/ProgramStageSectionDeletionHandler.java 2014-01-24 08:41:50 +0000 @@ -35,22 +35,10 @@ * * @version ProgramStageSectionDeletionHandler.java 3:14:59 PM Oct 1, 2012 $ */ -@SuppressWarnings("unused") public class ProgramStageSectionDeletionHandler extends DeletionHandler { // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private ProgramStageService programStageService; - - public void setProgramStageService( ProgramStageService programStageService ) - { - this.programStageService = programStageService; - } - - // ------------------------------------------------------------------------- // DeletionHandler implementation // ------------------------------------------------------------------------- === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStore.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStore.java 2013-12-29 17:27:07 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStore.java 2014-01-24 08:41:50 +0000 @@ -102,8 +102,7 @@ for ( Program program : getAll() ) { - if ( userRoles.contains( UserAuthorityGroup.AUTHORITY_ALL ) - || CollectionUtils.intersection( program.getUserRoles(), userRoles ).size() > 0 ) + if ( CollectionUtils.intersection( program.getUserRoles(), userRoles ).size() > 0 ) { programs.add( program ); } @@ -129,8 +128,7 @@ for ( Program program : getByType( type ) ) { - if ( userRoles.contains( UserAuthorityGroup.AUTHORITY_ALL ) - || CollectionUtils.intersection( program.getUserRoles(), userRoles ).size() > 0 ) + if ( CollectionUtils.intersection( program.getUserRoles(), userRoles ).size() > 0 ) { programs.add( program ); } === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml 2014-01-23 14:18:27 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml 2014-01-24 08:41:50 +0000 @@ -452,7 +452,6 @@ -