dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18174
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7558: Minor fixed in sms-web-api-mobile module
------------------------------------------------------------
revno: 7558
committer: Lai <lai.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-07-10 16:24:04 +0700
message:
Minor fixed in sms-web-api-mobile module
modified:
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/OrgUnits.java
dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/action/UpdateClientAction.java
--
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-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 2012-07-02 06:43:56 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/MobileOrgUnitLinks.java 2012-07-10 09:24:04 +0000
@@ -60,7 +60,7 @@
private String searchUrl;
public static double currentVersion = 2.9;
-
+
private String updateNewVersionUrl;
@XmlAttribute
@@ -179,22 +179,22 @@
throws IOException
{
+ dataOutputStream.writeInt( this.id );
+ dataOutputStream.writeUTF( this.name );
+ dataOutputStream.writeUTF( this.downloadAllUrl );
+ dataOutputStream.writeUTF( this.updateActivityPlanUrl );
+ dataOutputStream.writeUTF( this.uploadFacilityReportUrl );
+ dataOutputStream.writeUTF( this.uploadActivityReportUrl );
+ dataOutputStream.writeUTF( this.updateDataSetUrl );
+ dataOutputStream.writeUTF( this.changeUpdateDataSetLangUrl );
+ dataOutputStream.writeUTF( this.searchUrl );
dataOutputStream.writeUTF( this.updateNewVersionUrl );
- dataOutputStream.writeInt( this.id );
- dataOutputStream.writeUTF( this.name );
- dataOutputStream.writeUTF( this.downloadAllUrl );
- dataOutputStream.writeUTF( this.updateActivityPlanUrl );
- dataOutputStream.writeUTF( this.uploadFacilityReportUrl );
- dataOutputStream.writeUTF( this.uploadActivityReportUrl );
- dataOutputStream.writeUTF( this.updateDataSetUrl );
- dataOutputStream.writeUTF( this.changeUpdateDataSetLangUrl );
- dataOutputStream.writeUTF( this.searchUrl );
+
}
public void deSerialize( DataInputStream dataInputStream )
throws IOException
{
- this.updateNewVersionUrl = dataInputStream.readUTF();
this.id = dataInputStream.readInt();
this.name = dataInputStream.readUTF();
this.downloadAllUrl = dataInputStream.readUTF();
@@ -204,13 +204,7 @@
this.updateDataSetUrl = dataInputStream.readUTF();
this.changeUpdateDataSetLangUrl = dataInputStream.readUTF();
this.searchUrl = dataInputStream.readUTF();
- }
-
- public void sendVersion( DataOutputStream dataOutputStream )
- throws IOException
- {
- dataOutputStream.writeDouble( this.currentVersion );
- System.out.println("welcome send Version method");
+ this.updateNewVersionUrl = dataInputStream.readUTF();
}
@Override
=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/OrgUnits.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/OrgUnits.java 2012-07-02 09:47:16 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/OrgUnits.java 2012-07-10 09:24:04 +0000
@@ -87,7 +87,6 @@
{
unit.serialize( dataOutputStream );
}
-
}
@Override
@@ -95,7 +94,7 @@
throws IOException
{
orgUnits = new ArrayList<MobileOrgUnitLinks>();
- double version = dataInputStream.readDouble();
+ //double version = dataInputStream.readDouble();
int size = dataInputStream.readInt();
for ( int i = 0; i < size; i++ )
=== modified file 'dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/action/UpdateClientAction.java'
--- dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/action/UpdateClientAction.java 2012-07-02 09:47:16 +0000
+++ dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/action/UpdateClientAction.java 2012-07-10 09:24:04 +0000
@@ -49,9 +49,8 @@
// -------------------------------------------------------------------------
private String fileName = "DHISMobile-Aggregate.jar";
-
+ //private String fileName = "../webapps/dhis/dhis-web-commons/DHISMobile-Aggregate.jar";
private InputStream inputStream;
-
public String getFileName()
{
return fileName;
@@ -76,9 +75,10 @@
public String execute()
throws Exception
{
-
- File fileToDownload = new File( System.getenv("dhis2_home"), fileName );
-
+// File fileToDownload = new File( System.getenv("dhis2_home"), fileName );
+ File dir1 = new File(".");
+ System.out.println("Current dir: " + dir1.getCanonicalPath());
+ File fileToDownload = new File( fileName );
if ( fileToDownload != null )
inputStream = new BufferedInputStream( new FileInputStream( fileToDownload ) );