=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCommandStore.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCommandStore.java 2012-06-13 08:44:07 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCommandStore.java 2012-06-14 09:41:45 +0000 @@ -3,8 +3,6 @@ import java.util.Collection; import java.util.Set; -import org.hisp.dhis.common.GenericNameableObjectStore; - public interface SMSCommandStore { Collection getSMSCommands(); SMSCommand getSMSCommand(int id); === added directory 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/smscommand' === added file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/smscommand/SMSCode.hbm.xml' --- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/smscommand/SMSCode.hbm.xml 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/smscommand/SMSCode.hbm.xml 2012-06-14 09:41:45 +0000 @@ -0,0 +1,20 @@ + +] + > + + + + + + + + + + + + + \ No newline at end of file === added file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/smscommand/SMSCommand.hbm.xml' --- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/smscommand/SMSCommand.hbm.xml 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/smscommand/SMSCommand.hbm.xml 2012-06-14 09:41:45 +0000 @@ -0,0 +1,26 @@ + +] + > + + + + + + + + + + + + + + + + + + + + \ No newline at end of file === 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 2012-06-13 08:44:07 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/smscommand/SMSCommandAction.java 2012-06-14 09:41:45 +0000 @@ -14,11 +14,9 @@ import com.opensymphony.xwork2.Action; -public class SMSCommandAction - implements Action -{ +public class SMSCommandAction implements Action { + private SMSCommandService smsCommandService; - private DataSetService dataSetService; private int selectedCommandID = -1; @@ -29,82 +27,71 @@ // Action implementation // ------------------------------------------------------------------------- - public String execute() - throws Exception - { - if ( getSMSCommand() != null && getSMSCommand().getCodes() != null ) - { - for ( SMSCode x : getSMSCommand().getCodes() ) - { - codes.put( "" + x.getDataElement().getId() + x.getOptionId(), x.getCode() ); + public String execute() throws Exception { + if (getSMSCommand() != null && getSMSCommand().getCodes() != null) { + for (SMSCode x : getSMSCommand().getCodes()) { + codes.put("" + x.getDataElement().getId() + x.getOptionId(), x.getCode()); } } return SUCCESS; } - public Set getDataSetElements() - { - if ( getSMSCommand() != null ) - { + public Set getDataSetElements() { + if (getSMSCommand() != null) { DataSet d = getSMSCommand().getDataset(); - if ( d != null ) - { + if (d != null) { return d.getDataElements(); } } return null; } - public Collection getDataSets() - { - return dataSetService.getAllDataSets(); + public Collection getDataSets() { + return getDataSetService().getAllDataSets(); } - public Collection getSMSCommands() - { - System.out.println( "get:" + smsCommandService.getSMSCommands() ); + public Collection getSMSCommands() { + System.out.println("get:" + smsCommandService.getSMSCommands()); return smsCommandService.getSMSCommands(); } - public SMSCommand getSMSCommand() - { - if ( selectedCommandID > -1 ) - { - return smsCommandService.getSMSCommand( selectedCommandID ); - } - else - { + public SMSCommand getSMSCommand() { + if (selectedCommandID > -1) { + return smsCommandService.getSMSCommand(selectedCommandID); + } else { return null; } } - public void setSmsCommandService( SMSCommandService smsCommandService ) - { + public SMSCommandService getSmsCommandService() { + return smsCommandService; + } + + public void setSmsCommandService(SMSCommandService smsCommandService) { this.smsCommandService = smsCommandService; } - public int getSelectedCommandID() - { + public int getSelectedCommandID() { return selectedCommandID; } - public void setSelectedCommandID( int selectedCommandID ) - { + public void setSelectedCommandID(int selectedCommandID) { this.selectedCommandID = selectedCommandID; } - public void setDataSetService( DataSetService dataSetService ) - { + public DataSetService getDataSetService() { + return dataSetService; + } + + public void setDataSetService(DataSetService dataSetService) { this.dataSetService = dataSetService; } - public Map getCodes() - { + public Map getCodes() { return codes; } - public void setCodes( Map codes ) - { + public void setCodes(Map codes) { this.codes = codes; } === removed directory 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/incoming'