dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #27347
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13603: Reverted r 13599
------------------------------------------------------------
revno: 13603
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-01-07 11:08:24 +0100
message:
Reverted r 13599
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCommand.java
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/sms/hibernate/SMSCommand.hbm.xml
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/SMSCommandAction.java
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/webapp/dhis-web-maintenance-mobile/smscommand/edit-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
--
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/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<SMSCode> 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<SMSCode> codes, String codeSeparator, String defaultMessage, UserGroup userGroup, String receivedMessage,
- Set<SMSSpecialCharacter> specialCharacters )
+ Set<SMSCode> codes, String codeSeparator, String defaultMessage, UserGroup userGroup, String receivedMessage, Set<SMSSpecialCharacter> specialCharacters )
{
super();
this.name = name;
@@ -135,15 +129,6 @@
this.codes = codes;
}
- public SMSCommand( String name, String parser, String separator, Program program, Set<SMSCode> 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<SMSCode> 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 @@
<property name="currentPeriodUsedForReporting" type="boolean" />
<many-to-one name="dataset" class="org.hisp.dhis.dataset.DataSet" column="datasetid" foreign-key="fk_dataset_datasetid" />
-
- <many-to-one name="program" class="org.hisp.dhis.program.Program" column="programid" foreign-key="fk_program_programid" />
<set name="codes" table="smscommandcodes">
<key column="id" />
=== 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<DataElement>( d.getDataElements() );
Collections.sort( dataElements, new DataElementSortOrderComparator() );
return dataElements;
}
- else if ( program != null )
- {
- dataElements = new ArrayList<DataElement>( 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 @@
<property name="smsCommandService" ref="smsCommandService" />
<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
<property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
- <property name="programService" ref="org.hisp.dhis.program.ProgramService" />
</bean>
<bean id="org.hisp.dhis.mobile.action.smscommand.DeleteSMSCommandAction"
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/edit-sms-command.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/edit-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/edit-sms-command.vm 2014-01-07 10:08:24 +0000
@@ -127,7 +127,7 @@
<td>#if($smsCommand.parserType) $smsCommand.parserType #end</td>
</tr>
- #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' )
<tr>
<td>$i18n.getString( "dataset" )</td>
<td>#if($smsCommand.dataset.name) $smsCommand.dataset.name #end</td>
@@ -170,7 +170,7 @@
</br>
</br>
- #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' )
<table id="codes">
<col style="width:350px"/><col/>
<thead>
=== 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 @@
<tr>
<td>$i18n.getString( "program" )</td>
<td>
- <select name="selectedProgramId" >
+ <select name="programId" >
#foreach( $anonymousProgram in $anonymousProgramList )
- <option value="$anonymousProgram.id">$anonymousProgram.name</option>
+ <option value="$userGroup.id">$anonymousProgram.name</option>
#end
</select>
</td>