Skip to content

Commit 2a39c98

Browse files
Merge branch 'master' into release
2 parents 79b9182 + 37ccc8c commit 2a39c98

File tree

11 files changed

+874
-9
lines changed

11 files changed

+874
-9
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ This repository contains Aspose.Words Cloud SDK for Java source code. This SDK a
1313
* Watermarks and protection
1414
* Full read & write access to Document Object Model, including sections, paragraphs, text, images, tables, headers/footers and many others
1515

16+
## Enhancements in Version 24.4
17+
18+
- Added the 'MergeWithNext' method to merge a section with the next one.
19+
- Added the 'LockAspectRatio' propperty for DrawingObjectInsert and DrawingObjectUpdate methods.
20+
21+
1622
## Enhancements in Version 24.3
1723

1824
- Added support for 'RemoveEmptyCells' option for the 'Cleanup' parameter in the insert 'MailMerge' API method.
@@ -333,7 +339,7 @@ Add this dependency to your project's POM:
333339
<dependency>
334340
<groupId>com.aspose</groupId>
335341
<artifactId>aspose-words-cloud</artifactId>
336-
<version>24.3.0</version>
342+
<version>24.4.0</version>
337343
</dependency>
338344
</dependencies>
339345
```

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<artifactId>aspose-words-cloud</artifactId>
55
<packaging>jar</packaging>
66
<name>AsposeWordsCloud</name>
7-
<version>24.3.0</version>
7+
<version>24.4.0</version>
88
<url>https://www.aspose.cloud/</url>
99
<description>Aspose Words Java SDK</description>
1010
<scm>

src/main/java/com/aspose/words/cloud/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public class ApiClient {
5959
private String apiVersion = "v4.0";
6060
private String baseUrl = "https://api.aspose.cloud";
6161
private String basePath = baseUrl + "/" + apiVersion;
62-
private String clientVersion = "24.3";
62+
private String clientVersion = "24.4";
6363
private boolean debugging = false;
6464
private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
6565
private String tempFolderPath = null;

src/main/java/com/aspose/words/cloud/api/WordsApi.java

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18551,6 +18551,149 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
1855118551
return call;
1855218552
}
1855318553

18554+
@SuppressWarnings("rawtypes")
18555+
private com.squareup.okhttp.Call mergeWithNextValidateBeforeCall(MergeWithNextRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
18556+
return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
18557+
}
18558+
18559+
/**
18560+
* Merge the section with the next one.
18561+
* @param request Request object
18562+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
18563+
* @throws IOException If fail to serialize the request body object
18564+
*/
18565+
public void mergeWithNext(MergeWithNextRequest request) throws ApiException, MessagingException, IOException {
18566+
try {
18567+
mergeWithNextWithHttpInfo(request);
18568+
}
18569+
catch (ApiException ex) {
18570+
if (ex.getCode() == apiClient.getNotAuthCode()) {
18571+
apiClient.requestToken();
18572+
mergeWithNextWithHttpInfo(request);
18573+
}
18574+
throw ex;
18575+
}
18576+
}
18577+
18578+
/**
18579+
* Merge the section with the next one.
18580+
* @param request Request object
18581+
* @return ApiResponse< void >;
18582+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
18583+
* @throws IOException If fail to serialize the request body object
18584+
*/
18585+
private ApiResponse< Void > mergeWithNextWithHttpInfo(MergeWithNextRequest request) throws ApiException, MessagingException, IOException {
18586+
com.squareup.okhttp.Call call = mergeWithNextValidateBeforeCall(request, null, null);
18587+
return apiClient.execute(call, request);
18588+
}
18589+
18590+
/**
18591+
* Merge the section with the next one. (asynchronously)
18592+
* @param request Request object
18593+
* @param callback The callback to be executed when the API call finishes
18594+
* @return The request call
18595+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
18596+
* @throws IOException If fail to serialize the request body object
18597+
*/
18598+
public com.squareup.okhttp.Call mergeWithNextAsync(MergeWithNextRequest request, final ApiCallback< Void > callback) throws ApiException, MessagingException, IOException {
18599+
18600+
ProgressResponseBody.ProgressListener progressListener = null;
18601+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
18602+
18603+
if (callback != null) {
18604+
progressListener = new ProgressResponseBody.ProgressListener() {
18605+
@Override
18606+
public void update(long bytesRead, long contentLength, boolean done) {
18607+
callback.onDownloadProgress(bytesRead, contentLength, done);
18608+
}
18609+
};
18610+
18611+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
18612+
@Override
18613+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
18614+
callback.onUploadProgress(bytesWritten, contentLength, done);
18615+
}
18616+
};
18617+
}
18618+
18619+
com.squareup.okhttp.Call call = mergeWithNextValidateBeforeCall(request, progressListener, progressRequestListener);
18620+
apiClient.executeAsync(call, request, callback);
18621+
return call;
18622+
}
18623+
18624+
@SuppressWarnings("rawtypes")
18625+
private com.squareup.okhttp.Call mergeWithNextOnlineValidateBeforeCall(MergeWithNextOnlineRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
18626+
return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
18627+
}
18628+
18629+
/**
18630+
* Merge the section with the next one.
18631+
* @param request Request object
18632+
* @return Map<String, byte[]>
18633+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
18634+
* @throws IOException If fail to serialize the request body object
18635+
*/
18636+
public Map<String, byte[]> mergeWithNextOnline(MergeWithNextOnlineRequest request) throws ApiException, MessagingException, IOException {
18637+
try {
18638+
ApiResponse< Map<String, byte[]> > resp = mergeWithNextOnlineWithHttpInfo(request);
18639+
return resp.getData();
18640+
}
18641+
catch (ApiException ex) {
18642+
if (ex.getCode() == apiClient.getNotAuthCode()) {
18643+
apiClient.requestToken();
18644+
ApiResponse< Map<String, byte[]> > resp = mergeWithNextOnlineWithHttpInfo(request);
18645+
return resp.getData();
18646+
}
18647+
throw ex;
18648+
}
18649+
}
18650+
18651+
/**
18652+
* Merge the section with the next one.
18653+
* @param request Request object
18654+
* @return ApiResponse< Map<String, byte[]> >;
18655+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
18656+
* @throws IOException If fail to serialize the request body object
18657+
*/
18658+
private ApiResponse< Map<String, byte[]> > mergeWithNextOnlineWithHttpInfo(MergeWithNextOnlineRequest request) throws ApiException, MessagingException, IOException {
18659+
com.squareup.okhttp.Call call = mergeWithNextOnlineValidateBeforeCall(request, null, null);
18660+
return apiClient.execute(call, request);
18661+
}
18662+
18663+
/**
18664+
* Merge the section with the next one. (asynchronously)
18665+
* @param request Request object
18666+
* @param callback The callback to be executed when the API call finishes
18667+
* @return The request call
18668+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
18669+
* @throws IOException If fail to serialize the request body object
18670+
*/
18671+
public com.squareup.okhttp.Call mergeWithNextOnlineAsync(MergeWithNextOnlineRequest request, final ApiCallback< Map<String, byte[]> > callback) throws ApiException, MessagingException, IOException {
18672+
18673+
ProgressResponseBody.ProgressListener progressListener = null;
18674+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
18675+
18676+
if (callback != null) {
18677+
progressListener = new ProgressResponseBody.ProgressListener() {
18678+
@Override
18679+
public void update(long bytesRead, long contentLength, boolean done) {
18680+
callback.onDownloadProgress(bytesRead, contentLength, done);
18681+
}
18682+
};
18683+
18684+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
18685+
@Override
18686+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
18687+
callback.onUploadProgress(bytesWritten, contentLength, done);
18688+
}
18689+
};
18690+
}
18691+
18692+
com.squareup.okhttp.Call call = mergeWithNextOnlineValidateBeforeCall(request, progressListener, progressRequestListener);
18693+
apiClient.executeAsync(call, request, callback);
18694+
return call;
18695+
}
18696+
1855418697
@SuppressWarnings("rawtypes")
1855518698
private com.squareup.okhttp.Call moveFileValidateBeforeCall(MoveFileRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
1855618699
return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));

src/main/java/com/aspose/words/cloud/model/DrawingObjectInsert.java

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ public WrapTypeEnum read(final JsonReader jsonReader) throws IOException {
228228

229229
@SerializedName("WrapType")
230230
protected WrapTypeEnum wrapType;
231+
232+
@SerializedName("AspectRatioLocked")
233+
protected Boolean aspectRatioLocked;
231234
/**
232235
* Gets or sets the position, where the DrawingObject will be inserted.
233236
* @return position
@@ -380,6 +383,25 @@ public void setWrapType(WrapTypeEnum wrapType) {
380383
}
381384

382385

386+
/**
387+
* Gets or sets a value indicating whether AspectRatioLocked option on or off.
388+
* @return aspectRatioLocked
389+
**/
390+
@ApiModelProperty(value = "Gets or sets a value indicating whether AspectRatioLocked option on or off.")
391+
public Boolean getAspectRatioLocked() {
392+
return aspectRatioLocked;
393+
}
394+
395+
public DrawingObjectInsert aspectRatioLocked(Boolean aspectRatioLocked) {
396+
this.aspectRatioLocked = aspectRatioLocked;
397+
return this;
398+
}
399+
400+
public void setAspectRatioLocked(Boolean aspectRatioLocked) {
401+
this.aspectRatioLocked = aspectRatioLocked;
402+
}
403+
404+
383405
public DrawingObjectInsert() {
384406
this.position = null;
385407
this.relativeHorizontalPosition = null;
@@ -389,6 +411,7 @@ public DrawingObjectInsert() {
389411
this.width = null;
390412
this.height = null;
391413
this.wrapType = null;
414+
this.aspectRatioLocked = null;
392415
}
393416

394417
/*
@@ -440,6 +463,7 @@ public void validate() throws ApiException {
440463

441464

442465

466+
443467
}
444468

445469
@Override
@@ -460,12 +484,13 @@ public boolean equals(java.lang.Object o) {
460484
Objects.equals(this.top, drawingObjectInsert.top) &&
461485
Objects.equals(this.width, drawingObjectInsert.width) &&
462486
Objects.equals(this.height, drawingObjectInsert.height) &&
463-
Objects.equals(this.wrapType, drawingObjectInsert.wrapType);
487+
Objects.equals(this.wrapType, drawingObjectInsert.wrapType) &&
488+
Objects.equals(this.aspectRatioLocked, drawingObjectInsert.aspectRatioLocked);
464489
}
465490

466491
@Override
467492
public int hashCode() {
468-
return Objects.hash(position, relativeHorizontalPosition, left, relativeVerticalPosition, top, width, height, wrapType);
493+
return Objects.hash(position, relativeHorizontalPosition, left, relativeVerticalPosition, top, width, height, wrapType, aspectRatioLocked);
469494
}
470495

471496
@Override
@@ -480,6 +505,7 @@ public String toString() {
480505
sb.append(" width: ").append(toIndentedString(getWidth())).append("\n");
481506
sb.append(" height: ").append(toIndentedString(getHeight())).append("\n");
482507
sb.append(" wrapType: ").append(toIndentedString(getWrapType())).append("\n");
508+
sb.append(" aspectRatioLocked: ").append(toIndentedString(getAspectRatioLocked())).append("\n");
483509
sb.append("}");
484510
return sb.toString();
485511
}

src/main/java/com/aspose/words/cloud/model/DrawingObjectUpdate.java

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ public WrapTypeEnum read(final JsonReader jsonReader) throws IOException {
225225

226226
@SerializedName("WrapType")
227227
protected WrapTypeEnum wrapType;
228+
229+
@SerializedName("AspectRatioLocked")
230+
protected Boolean aspectRatioLocked;
228231
/**
229232
* Gets or sets the relative horizontal position, from which the distance to the image is measured.
230233
* @return relativeHorizontalPosition
@@ -358,6 +361,25 @@ public void setWrapType(WrapTypeEnum wrapType) {
358361
}
359362

360363

364+
/**
365+
* Gets or sets a value indicating whether AspectRatioLocked option on or off.
366+
* @return aspectRatioLocked
367+
**/
368+
@ApiModelProperty(value = "Gets or sets a value indicating whether AspectRatioLocked option on or off.")
369+
public Boolean getAspectRatioLocked() {
370+
return aspectRatioLocked;
371+
}
372+
373+
public DrawingObjectUpdate aspectRatioLocked(Boolean aspectRatioLocked) {
374+
this.aspectRatioLocked = aspectRatioLocked;
375+
return this;
376+
}
377+
378+
public void setAspectRatioLocked(Boolean aspectRatioLocked) {
379+
this.aspectRatioLocked = aspectRatioLocked;
380+
}
381+
382+
361383
public DrawingObjectUpdate() {
362384
this.relativeHorizontalPosition = null;
363385
this.left = null;
@@ -366,6 +388,7 @@ public DrawingObjectUpdate() {
366388
this.width = null;
367389
this.height = null;
368390
this.wrapType = null;
391+
this.aspectRatioLocked = null;
369392
}
370393

371394
/*
@@ -403,12 +426,13 @@ public boolean equals(java.lang.Object o) {
403426
Objects.equals(this.top, drawingObjectUpdate.top) &&
404427
Objects.equals(this.width, drawingObjectUpdate.width) &&
405428
Objects.equals(this.height, drawingObjectUpdate.height) &&
406-
Objects.equals(this.wrapType, drawingObjectUpdate.wrapType);
429+
Objects.equals(this.wrapType, drawingObjectUpdate.wrapType) &&
430+
Objects.equals(this.aspectRatioLocked, drawingObjectUpdate.aspectRatioLocked);
407431
}
408432

409433
@Override
410434
public int hashCode() {
411-
return Objects.hash(relativeHorizontalPosition, left, relativeVerticalPosition, top, width, height, wrapType);
435+
return Objects.hash(relativeHorizontalPosition, left, relativeVerticalPosition, top, width, height, wrapType, aspectRatioLocked);
412436
}
413437

414438
@Override
@@ -422,6 +446,7 @@ public String toString() {
422446
sb.append(" width: ").append(toIndentedString(getWidth())).append("\n");
423447
sb.append(" height: ").append(toIndentedString(getHeight())).append("\n");
424448
sb.append(" wrapType: ").append(toIndentedString(getWrapType())).append("\n");
449+
sb.append(" aspectRatioLocked: ").append(toIndentedString(getAspectRatioLocked())).append("\n");
425450
sb.append("}");
426451
return sb.toString();
427452
}

src/main/java/com/aspose/words/cloud/model/StructuredDocumentTagBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public abstract class StructuredDocumentTagBase extends NodeLink {
5353
*/
5454
@JsonAdapter(AppearanceEnum.Adapter.class)
5555
public enum AppearanceEnum {
56-
DEFAULT("Default"),
5756
BOUNDINGBOX("BoundingBox"),
57+
DEFAULT("Default"),
5858
TAGS("Tags"),
5959
HIDDEN("Hidden");
6060

src/main/java/com/aspose/words/cloud/model/TableProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,8 @@ public StyleOptionsEnum read(final JsonReader jsonReader) throws IOException {
576576
*/
577577
@JsonAdapter(TextWrappingEnum.Adapter.class)
578578
public enum TextWrappingEnum {
579-
DEFAULT("Default"),
580579
NONE("None"),
580+
DEFAULT("Default"),
581581
AROUND("Around");
582582

583583
private String value;

0 commit comments

Comments
 (0)