=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCommand.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCommand.java 2014-01-07 06:53:01 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCommand.java 2014-01-07 10:08:24 +0000 @@ -29,7 +29,6 @@ */ import org.hisp.dhis.dataset.DataSet; -import org.hisp.dhis.program.Program; import org.hisp.dhis.sms.parse.ParserType; import org.hisp.dhis.user.UserGroup; @@ -49,10 +48,6 @@ private DataSet dataset; - // Support only anonymous program for now - - private Program program; - private Set codes; private String codeSeparator; @@ -68,8 +63,7 @@ private boolean currentPeriodUsedForReporting = false; // default is prev public SMSCommand( String name, String parser, ParserType parserType, String separator, DataSet dataset, - Set codes, String codeSeparator, String defaultMessage, UserGroup userGroup, String receivedMessage, - Set specialCharacters ) + Set codes, String codeSeparator, String defaultMessage, UserGroup userGroup, String receivedMessage, Set specialCharacters ) { super(); this.name = name; @@ -135,15 +129,6 @@ this.codes = codes; } - public SMSCommand( String name, String parser, String separator, Program program, Set codes ) - { - this.name = name; - this.parser = parser; - this.separator = separator; - this.program = program; - this.codes = codes; - } - public SMSCommand( String parser, String name, DataSet dataset, Set codes ) { this.parser = parser; @@ -311,13 +296,4 @@ this.specialCharacters = specialCharacters; } - public Program getProgram() - { - return program; - } - - public void setProgram( Program program ) - { - this.program = program; - } } === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/sms/hibernate/SMSCommand.hbm.xml' --- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/sms/hibernate/SMSCommand.hbm.xml 2014-01-07 06:53:01 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/sms/hibernate/SMSCommand.hbm.xml 2014-01-07 10:08:24 +0000 @@ -28,8 +28,6 @@ - - === 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 2014-01-07 06:53:01 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/smscommand/CreateSMSCommandForm.java 2014-01-07 10:08:24 +0000 @@ -30,8 +30,6 @@ import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.dataset.DataSetService; -import org.hisp.dhis.program.Program; -import org.hisp.dhis.program.ProgramService; import org.hisp.dhis.sms.parse.ParserType; import org.hisp.dhis.smscommand.SMSCommand; import org.hisp.dhis.smscommand.SMSCommandService; @@ -68,12 +66,12 @@ this.userGroupService = userGroupService; } - private ProgramService programService; - - public void setProgramService( ProgramService programService ) - { - this.programService = programService; - } + // private ProgramService programService; + // + // public void setProgramService( ProgramService programService ) + // { + // this.programService = programService; + // } // ------------------------------------------------------------------------- // Input && Output @@ -106,19 +104,7 @@ { this.userGroupID = userGroupID; } - - private Integer selectedProgramId; - - public Integer getSelectedProgramId() - { - return selectedProgramId; - } - public void setSelectedProgramId( Integer selectedProgramId ) - { - this.selectedProgramId = selectedProgramId; - } - // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- @@ -144,8 +130,7 @@ } else if ( parserType.equals( ParserType.ANONYMOUS_PROGRAM_PARSER ) ) { - Program program = programService.getProgram( selectedProgramId ); - command.setProgram(program); + } smsCommandService.save( command ); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/smscommand/SMSCommandAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/smscommand/SMSCommandAction.java 2014-01-07 06:53:01 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/smscommand/SMSCommandAction.java 2014-01-07 10:08:24 +0000 @@ -166,19 +166,12 @@ if ( smsCommand != null ) { DataSet d = smsCommand.getDataset(); - Program program = smsCommand.getProgram(); if ( d != null ) { dataElements = new ArrayList( d.getDataElements() ); Collections.sort( dataElements, new DataElementSortOrderComparator() ); return dataElements; } - else if ( program != null ) - { - dataElements = new ArrayList( program.getAllDataElements() ); - Collections.sort( dataElements, new DataElementSortOrderComparator() ); - return dataElements; - } } return null; } === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/META-INF/dhis/beans.xml 2014-01-07 06:53:01 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/META-INF/dhis/beans.xml 2014-01-07 10:08:24 +0000 @@ -162,7 +162,6 @@ - #if($smsCommand.parserType) $smsCommand.parserType #end - #if( $smsCommand.parserType == 'KEY_VALUE_PARSER' || $smsCommand.parserType == 'J2ME_PARSER' || $smsCommand.parserType == 'ANONYMOUS_PROGRAM_PARSER' ) + #if( $smsCommand.parserType == 'KEY_VALUE_PARSER' || $smsCommand.parserType == 'J2ME_PARSER' ) $i18n.getString( "dataset" ) #if($smsCommand.dataset.name) $smsCommand.dataset.name #end @@ -170,7 +170,7 @@

- #if( $smsCommand.parserType == 'KEY_VALUE_PARSER' || $smsCommand.parserType == 'J2ME_PARSER' || $smsCommand.parserType == 'ANONYMOUS_PROGRAM_PARSER') + #if( $smsCommand.parserType == 'KEY_VALUE_PARSER' || $smsCommand.parserType == 'J2ME_PARSER' ) === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/new-sms-command.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/new-sms-command.vm 2014-01-07 06:53:01 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/new-sms-command.vm 2014-01-07 10:08:24 +0000 @@ -61,9 +61,9 @@
$i18n.getString( "program" ) - #foreach( $anonymousProgram in $anonymousProgramList ) - + #end