Skip to content

Commit 6c8454b

Browse files
committed
Merge branch '1.9.2'
2 parents 8df2557 + 4a32e2d commit 6c8454b

File tree

7 files changed

+66
-15
lines changed

7 files changed

+66
-15
lines changed

client/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ apply plugin: 'com.android.library'
22
apply plugin: 'com.github.dcendents.android-maven'
33

44
description = 'js-android-sdk-client'
5-
version = '1.9.1'
5+
version = '1.9.2'
66

77
ext {
88
PUBLISH_GROUP_ID = group
99
PUBLISH_ARTIFACT_ID = description
10-
PUBLISH_VERSION = '1.9.1'
10+
PUBLISH_VERSION = '1.9.2'
1111
}
1212

1313
android {
@@ -17,7 +17,7 @@ android {
1717
defaultConfig {
1818
minSdkVersion androidMinSdkVersion
1919
targetSdkVersion androidTargetSdkVersion
20-
versionCode 9010910
20+
versionCode 9010920
2121
versionName version
2222
}
2323

client/src/main/java/com/jaspersoft/android/sdk/client/JsServerProfile.java

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424

2525
package com.jaspersoft.android.sdk.client;
2626

27+
import android.os.Parcel;
28+
import android.os.Parcelable;
29+
2730
/**
2831
* The <code>JsServerProfile</code> object represents an instance of a JasperReports Server
2932
* including authentication credentials.
@@ -32,7 +35,7 @@
3235
* @version $Id$
3336
* @since 1.0
3437
*/
35-
public class JsServerProfile {
38+
public class JsServerProfile implements Parcelable {
3639
private long id;
3740
private String alias;
3841
private String serverUrl;
@@ -166,4 +169,39 @@ public int hashCode() {
166169
result = 31 * result + password.hashCode();
167170
return result;
168171
}
172+
173+
174+
@Override
175+
public int describeContents() {
176+
return 0;
177+
}
178+
179+
@Override
180+
public void writeToParcel(Parcel dest, int flags) {
181+
dest.writeLong(this.id);
182+
dest.writeString(this.alias);
183+
dest.writeString(this.serverUrl);
184+
dest.writeString(this.organization);
185+
dest.writeString(this.username);
186+
dest.writeString(this.password);
187+
}
188+
189+
private JsServerProfile(Parcel in) {
190+
this.id = in.readLong();
191+
this.alias = in.readString();
192+
this.serverUrl = in.readString();
193+
this.organization = in.readString();
194+
this.username = in.readString();
195+
this.password = in.readString();
196+
}
197+
198+
public static final Parcelable.Creator<JsServerProfile> CREATOR = new Parcelable.Creator<JsServerProfile>() {
199+
public JsServerProfile createFromParcel(Parcel source) {
200+
return new JsServerProfile(source);
201+
}
202+
203+
public JsServerProfile[] newArray(int size) {
204+
return new JsServerProfile[size];
205+
}
206+
};
169207
}

client/src/main/java/com/jaspersoft/android/sdk/client/oxm/report/ReportExecutionResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,6 @@ public void setTotalPages(int totalPages) {
107107
}
108108

109109
public ReportStatus getReportStatus() {
110-
return ReportStatus.valueOf(status.toUpperCase());
110+
return ReportStatus.valueOf(status);
111111
}
112112
}

client/src/main/java/com/jaspersoft/android/sdk/client/oxm/report/ReportStatus.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
* @since 1.9
66
*/
77
public enum ReportStatus {
8-
QUEUED, READY, FAILED, EXECUTION
8+
execution, ready, cancelled, failed, queued
99
}

client/src/main/java/com/jaspersoft/android/sdk/client/oxm/report/ReportStatusResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public ReportStatusResponse(String status) {
3030
}
3131

3232
public ReportStatus getReportStatus() {
33-
return ReportStatus.valueOf(mStatus.toUpperCase());
33+
return ReportStatus.valueOf(mStatus);
3434
}
3535

3636
public String getStatus() {

unitTests/src/test/java/com/jaspersoft/android/sdk/client/test/oxm/server/ReportExecutionResponseTest.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,31 @@ public void setUp() {
2626
@Test
2727
public void test_getReportStatus_for_queued() {
2828
reportExecutionResponse.setStatus("queued");
29-
assertThat(reportExecutionResponse.getReportStatus(), is(ReportStatus.QUEUED));
29+
assertThat(reportExecutionResponse.getReportStatus(), is(ReportStatus.queued));
3030
}
3131

3232
@Test
3333
public void test_getReportStatus_for_ready() {
3434
reportExecutionResponse.setStatus("ready");
35-
assertThat(reportExecutionResponse.getReportStatus(), is(ReportStatus.READY));
35+
assertThat(reportExecutionResponse.getReportStatus(), is(ReportStatus.ready));
3636
}
3737

3838
@Test
3939
public void test_getReportStatus_for_failed() {
4040
reportExecutionResponse.setStatus("failed");
41-
assertThat(reportExecutionResponse.getReportStatus(), is(ReportStatus.FAILED));
41+
assertThat(reportExecutionResponse.getReportStatus(), is(ReportStatus.failed));
4242
}
4343

4444
@Test
4545
public void test_getReportStatus_for_execution() {
4646
reportExecutionResponse.setStatus("execution");
47-
assertThat(reportExecutionResponse.getReportStatus(), is(ReportStatus.EXECUTION));
47+
assertThat(reportExecutionResponse.getReportStatus(), is(ReportStatus.execution));
48+
}
49+
50+
@Test
51+
public void test_getReportStatus_for_cancelled() {
52+
reportExecutionResponse.setStatus("cancelled");
53+
assertThat(reportExecutionResponse.getReportStatus(), is(ReportStatus.cancelled));
4854
}
4955

5056
}

unitTests/src/test/java/com/jaspersoft/android/sdk/client/test/oxm/server/ReportStatusResponseTest.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,31 @@ public void setUp() {
2626
@Test
2727
public void test_getReportStatus_for_queued() {
2828
reportStatusResponse.setStatus("queued");
29-
assertThat(reportStatusResponse.getReportStatus(), is(ReportStatus.QUEUED));
29+
assertThat(reportStatusResponse.getReportStatus(), is(ReportStatus.queued));
3030
}
3131

3232
@Test
3333
public void test_getReportStatus_for_ready() {
3434
reportStatusResponse.setStatus("ready");
35-
assertThat(reportStatusResponse.getReportStatus(), is(ReportStatus.READY));
35+
assertThat(reportStatusResponse.getReportStatus(), is(ReportStatus.ready));
3636
}
3737

3838
@Test
3939
public void test_getReportStatus_for_failed() {
4040
reportStatusResponse.setStatus("failed");
41-
assertThat(reportStatusResponse.getReportStatus(), is(ReportStatus.FAILED));
41+
assertThat(reportStatusResponse.getReportStatus(), is(ReportStatus.failed));
4242
}
4343

4444
@Test
4545
public void test_getReportStatus_for_execution() {
4646
reportStatusResponse.setStatus("execution");
47-
assertThat(reportStatusResponse.getReportStatus(), is(ReportStatus.EXECUTION));
47+
assertThat(reportStatusResponse.getReportStatus(), is(ReportStatus.execution));
4848
}
49+
50+
@Test
51+
public void test_getReportStatus_for_cancelled() {
52+
reportStatusResponse.setStatus("cancelled");
53+
assertThat(reportStatusResponse.getReportStatus(), is(ReportStatus.cancelled));
54+
}
55+
4956
}

0 commit comments

Comments
 (0)