Skip to content

Commit a905be2

Browse files
Merge branch 'master' into release
2 parents 7b8fb08 + 7dffb39 commit a905be2

File tree

7 files changed

+221
-28
lines changed

7 files changed

+221
-28
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ 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 21.4
17+
18+
- Removed obsolete pdf save option 'EscapeUri'
19+
- SaveOptions now contains CustomTimeZoneInfo to set custom timezone when SdtType.Date structured document tag updated from custom XML
20+
- Url of child requests in batch can be full now (earlier it can be only relative)
21+
- Added 'RquestId' header to all responses
22+
23+
1624
## Enhancements in Version 21.3
1725

1826
- Added 'UpdateCreatedTimeProperty' save option
@@ -128,7 +136,7 @@ Add this dependency to your project's POM:
128136
<dependency>
129137
<groupId>com.aspose</groupId>
130138
<artifactId>aspose-words-cloud</artifactId>
131-
<version>21.3.0</version>
139+
<version>21.4.0</version>
132140
</dependency>
133141
</dependencies>
134142
```

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>21.3.0</version>
7+
<version>21.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
@@ -56,7 +56,7 @@ public class ApiClient {
5656
private String apiVersion = "v4.0";
5757
private String baseUrl = "https://api.aspose.cloud";
5858
private String basePath = baseUrl + "/" + apiVersion;
59-
private String clientVersion = "21.3";
59+
private String clientVersion = "21.4";
6060
private boolean debugging = false;
6161
private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
6262
private String tempFolderPath = null;

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

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,6 @@ public HeaderFooterBookmarksExportModeEnum read(final JsonReader jsonReader) thr
119119
@SerializedName("EncryptionDetails")
120120
private PdfEncryptionDetailsData encryptionDetails = null;
121121

122-
@SerializedName("EscapeUri")
123-
private Boolean escapeUri = null;
124-
125122
@SerializedName("ExportDocumentStructure")
126123
private Boolean exportDocumentStructure = null;
127124

@@ -316,24 +313,6 @@ public void setEncryptionDetails(PdfEncryptionDetailsData encryptionDetails) {
316313
this.encryptionDetails = encryptionDetails;
317314
}
318315

319-
public PdfSaveOptionsData escapeUri(Boolean escapeUri) {
320-
this.escapeUri = escapeUri;
321-
return this;
322-
}
323-
324-
/**
325-
* Gets or sets a value indicating whether URI should be escaped before writing.
326-
* @return escapeUri
327-
**/
328-
@ApiModelProperty(value = "Gets or sets a value indicating whether URI should be escaped before writing.")
329-
public Boolean getEscapeUri() {
330-
return escapeUri;
331-
}
332-
333-
public void setEscapeUri(Boolean escapeUri) {
334-
this.escapeUri = escapeUri;
335-
}
336-
337316
public PdfSaveOptionsData exportDocumentStructure(Boolean exportDocumentStructure) {
338317
this.exportDocumentStructure = exportDocumentStructure;
339318
return this;
@@ -642,7 +621,6 @@ public boolean equals(java.lang.Object o) {
642621
Objects.equals(this.downsampleOptions, pdfSaveOptionsData.downsampleOptions) &&
643622
Objects.equals(this.embedFullFonts, pdfSaveOptionsData.embedFullFonts) &&
644623
Objects.equals(this.encryptionDetails, pdfSaveOptionsData.encryptionDetails) &&
645-
Objects.equals(this.escapeUri, pdfSaveOptionsData.escapeUri) &&
646624
Objects.equals(this.exportDocumentStructure, pdfSaveOptionsData.exportDocumentStructure) &&
647625
Objects.equals(this.fontEmbeddingMode, pdfSaveOptionsData.fontEmbeddingMode) &&
648626
Objects.equals(this.headerFooterBookmarksExportMode, pdfSaveOptionsData.headerFooterBookmarksExportMode) &&
@@ -664,7 +642,7 @@ public boolean equals(java.lang.Object o) {
664642

665643
@Override
666644
public int hashCode() {
667-
return Objects.hash(compliance, createNoteHyperlinks, customPropertiesExport, digitalSignatureDetails, displayDocTitle, downsampleOptions, embedFullFonts, encryptionDetails, escapeUri, exportDocumentStructure, fontEmbeddingMode, headerFooterBookmarksExportMode, imageColorSpaceExportMode, imageCompression, interpolateImages, openHyperlinksInNewWindow, outlineOptions, pageMode, preblendImages, preserveFormFields, textCompression, useBookFoldPrintingSettings, useCoreFonts, zoomBehavior, zoomFactor, super.hashCode());
645+
return Objects.hash(compliance, createNoteHyperlinks, customPropertiesExport, digitalSignatureDetails, displayDocTitle, downsampleOptions, embedFullFonts, encryptionDetails, exportDocumentStructure, fontEmbeddingMode, headerFooterBookmarksExportMode, imageColorSpaceExportMode, imageCompression, interpolateImages, openHyperlinksInNewWindow, outlineOptions, pageMode, preblendImages, preserveFormFields, textCompression, useBookFoldPrintingSettings, useCoreFonts, zoomBehavior, zoomFactor, super.hashCode());
668646
}
669647

670648
@Override
@@ -680,7 +658,6 @@ public String toString() {
680658
sb.append(" downsampleOptions: ").append(toIndentedString(downsampleOptions)).append("\n");
681659
sb.append(" embedFullFonts: ").append(toIndentedString(embedFullFonts)).append("\n");
682660
sb.append(" encryptionDetails: ").append(toIndentedString(encryptionDetails)).append("\n");
683-
sb.append(" escapeUri: ").append(toIndentedString(escapeUri)).append("\n");
684661
sb.append(" exportDocumentStructure: ").append(toIndentedString(exportDocumentStructure)).append("\n");
685662
sb.append(" fontEmbeddingMode: ").append(toIndentedString(fontEmbeddingMode)).append("\n");
686663
sb.append(" headerFooterBookmarksExportMode: ").append(toIndentedString(headerFooterBookmarksExportMode)).append("\n");

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

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ public Dml3DEffectsRenderingModeEnum read(final JsonReader jsonReader) throws IO
9696
@SerializedName("AllowEmbeddingPostScriptFonts")
9797
private Boolean allowEmbeddingPostScriptFonts = null;
9898

99+
@SerializedName("CustomTimeZoneInfoData")
100+
private TimeZoneInfoData customTimeZoneInfoData = null;
101+
99102
@SerializedName("Dml3DEffectsRenderingMode")
100103
private Dml3DEffectsRenderingModeEnum dml3DEffectsRenderingMode = null;
101104

@@ -146,6 +149,24 @@ public void setAllowEmbeddingPostScriptFonts(Boolean allowEmbeddingPostScriptFon
146149
this.allowEmbeddingPostScriptFonts = allowEmbeddingPostScriptFonts;
147150
}
148151

152+
public SaveOptionsData customTimeZoneInfoData(TimeZoneInfoData customTimeZoneInfoData) {
153+
this.customTimeZoneInfoData = customTimeZoneInfoData;
154+
return this;
155+
}
156+
157+
/**
158+
* Gets or sets CustomTimeZoneInfo.
159+
* @return customTimeZoneInfoData
160+
**/
161+
@ApiModelProperty(value = "Gets or sets CustomTimeZoneInfo.")
162+
public TimeZoneInfoData getCustomTimeZoneInfoData() {
163+
return customTimeZoneInfoData;
164+
}
165+
166+
public void setCustomTimeZoneInfoData(TimeZoneInfoData customTimeZoneInfoData) {
167+
this.customTimeZoneInfoData = customTimeZoneInfoData;
168+
}
169+
149170
public SaveOptionsData dml3DEffectsRenderingMode(Dml3DEffectsRenderingModeEnum dml3DEffectsRenderingMode) {
150171
this.dml3DEffectsRenderingMode = dml3DEffectsRenderingMode;
151172
return this;
@@ -359,6 +380,7 @@ public boolean equals(java.lang.Object o) {
359380
SaveOptionsData saveOptionsData = (SaveOptionsData) o;
360381
return
361382
Objects.equals(this.allowEmbeddingPostScriptFonts, saveOptionsData.allowEmbeddingPostScriptFonts) &&
383+
Objects.equals(this.customTimeZoneInfoData, saveOptionsData.customTimeZoneInfoData) &&
362384
Objects.equals(this.dml3DEffectsRenderingMode, saveOptionsData.dml3DEffectsRenderingMode) &&
363385
Objects.equals(this.dmlEffectsRenderingMode, saveOptionsData.dmlEffectsRenderingMode) &&
364386
Objects.equals(this.dmlRenderingMode, saveOptionsData.dmlRenderingMode) &&
@@ -374,14 +396,15 @@ public boolean equals(java.lang.Object o) {
374396

375397
@Override
376398
public int hashCode() {
377-
return Objects.hash(allowEmbeddingPostScriptFonts, dml3DEffectsRenderingMode, dmlEffectsRenderingMode, dmlRenderingMode, fileName, saveFormat, updateCreatedTimeProperty, updateFields, updateLastPrintedProperty, updateLastSavedTimeProperty, updateSdtContent, zipOutput);
399+
return Objects.hash(allowEmbeddingPostScriptFonts, customTimeZoneInfoData, dml3DEffectsRenderingMode, dmlEffectsRenderingMode, dmlRenderingMode, fileName, saveFormat, updateCreatedTimeProperty, updateFields, updateLastPrintedProperty, updateLastSavedTimeProperty, updateSdtContent, zipOutput);
378400
}
379401

380402
@Override
381403
public String toString() {
382404
StringBuilder sb = new StringBuilder();
383405
sb.append("class SaveOptionsData {\n");
384406
sb.append(" allowEmbeddingPostScriptFonts: ").append(toIndentedString(allowEmbeddingPostScriptFonts)).append("\n");
407+
sb.append(" customTimeZoneInfoData: ").append(toIndentedString(customTimeZoneInfoData)).append("\n");
385408
sb.append(" dml3DEffectsRenderingMode: ").append(toIndentedString(dml3DEffectsRenderingMode)).append("\n");
386409
sb.append(" dmlEffectsRenderingMode: ").append(toIndentedString(dmlEffectsRenderingMode)).append("\n");
387410
sb.append(" dmlRenderingMode: ").append(toIndentedString(dmlRenderingMode)).append("\n");
Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="TimeZoneInfoData.java">
4+
* Copyright (c) 2021 Aspose.Words for Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
28+
package com.aspose.words.cloud.model;
29+
30+
import java.util.Objects;
31+
import java.util.Arrays;
32+
import java.util.ArrayList;
33+
import java.util.List;
34+
import java.io.IOException;
35+
import org.threeten.bp.OffsetDateTime;
36+
import com.aspose.words.cloud.model.*;
37+
import com.google.gson.TypeAdapter;
38+
import com.google.gson.annotations.JsonAdapter;
39+
import com.google.gson.annotations.SerializedName;
40+
import com.google.gson.stream.JsonReader;
41+
import com.google.gson.stream.JsonWriter;
42+
import io.swagger.annotations.ApiModel;
43+
import io.swagger.annotations.ApiModelProperty;
44+
45+
/**
46+
* Class to specify TimeZoneInfo parameters.
47+
*/
48+
@ApiModel(description = "Class to specify TimeZoneInfo parameters.")
49+
public class TimeZoneInfoData {
50+
@SerializedName("BaseUtcOffset")
51+
private String baseUtcOffset = null;
52+
53+
@SerializedName("DisplayName")
54+
private String displayName = null;
55+
56+
@SerializedName("Id")
57+
private String id = null;
58+
59+
@SerializedName("StandardDisplayName")
60+
private String standardDisplayName = null;
61+
public TimeZoneInfoData baseUtcOffset(String baseUtcOffset) {
62+
this.baseUtcOffset = baseUtcOffset;
63+
return this;
64+
}
65+
66+
/**
67+
* Gets or sets base utc offset in hh:mm:ss format.
68+
* @return baseUtcOffset
69+
**/
70+
@ApiModelProperty(value = "Gets or sets base utc offset in hh:mm:ss format.")
71+
public String getBaseUtcOffset() {
72+
return baseUtcOffset;
73+
}
74+
75+
public void setBaseUtcOffset(String baseUtcOffset) {
76+
this.baseUtcOffset = baseUtcOffset;
77+
}
78+
79+
public TimeZoneInfoData displayName(String displayName) {
80+
this.displayName = displayName;
81+
return this;
82+
}
83+
84+
/**
85+
* Gets or sets display name.
86+
* @return displayName
87+
**/
88+
@ApiModelProperty(value = "Gets or sets display name.")
89+
public String getDisplayName() {
90+
return displayName;
91+
}
92+
93+
public void setDisplayName(String displayName) {
94+
this.displayName = displayName;
95+
}
96+
97+
public TimeZoneInfoData id(String id) {
98+
this.id = id;
99+
return this;
100+
}
101+
102+
/**
103+
* Gets or sets an Id string for CustomTimeZoneInfo.
104+
* @return id
105+
**/
106+
@ApiModelProperty(value = "Gets or sets an Id string for CustomTimeZoneInfo.")
107+
public String getId() {
108+
return id;
109+
}
110+
111+
public void setId(String id) {
112+
this.id = id;
113+
}
114+
115+
public TimeZoneInfoData standardDisplayName(String standardDisplayName) {
116+
this.standardDisplayName = standardDisplayName;
117+
return this;
118+
}
119+
120+
/**
121+
* Gets or sets standard display name.
122+
* @return standardDisplayName
123+
**/
124+
@ApiModelProperty(value = "Gets or sets standard display name.")
125+
public String getStandardDisplayName() {
126+
return standardDisplayName;
127+
}
128+
129+
public void setStandardDisplayName(String standardDisplayName) {
130+
this.standardDisplayName = standardDisplayName;
131+
}
132+
133+
@Override
134+
public boolean equals(java.lang.Object o) {
135+
if (this == o) {
136+
return true;
137+
}
138+
if (o == null || getClass() != o.getClass()) {
139+
return false;
140+
}
141+
142+
TimeZoneInfoData timeZoneInfoData = (TimeZoneInfoData) o;
143+
return
144+
Objects.equals(this.baseUtcOffset, timeZoneInfoData.baseUtcOffset) &&
145+
Objects.equals(this.displayName, timeZoneInfoData.displayName) &&
146+
Objects.equals(this.id, timeZoneInfoData.id) &&
147+
Objects.equals(this.standardDisplayName, timeZoneInfoData.standardDisplayName);
148+
}
149+
150+
@Override
151+
public int hashCode() {
152+
return Objects.hash(baseUtcOffset, displayName, id, standardDisplayName);
153+
}
154+
155+
@Override
156+
public String toString() {
157+
StringBuilder sb = new StringBuilder();
158+
sb.append("class TimeZoneInfoData {\n");
159+
sb.append(" baseUtcOffset: ").append(toIndentedString(baseUtcOffset)).append("\n");
160+
sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n");
161+
sb.append(" id: ").append(toIndentedString(id)).append("\n");
162+
sb.append(" standardDisplayName: ").append(toIndentedString(standardDisplayName)).append("\n");
163+
sb.append("}");
164+
return sb.toString();
165+
}
166+
167+
/**
168+
* Convert the given object to string with each line indented by 4 spaces
169+
* (except the first line).
170+
*/
171+
private String toIndentedString(java.lang.Object o) {
172+
if (o == null) {
173+
return "null";
174+
}
175+
return o.toString().replace("\n", "\n ");
176+
}
177+
}

src/test/java/com/aspose/words/cloud/api/document/TestRevisions.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ public void testAcceptAllRevisionsOnline() throws ApiException, MessagingExcepti
9898

9999
AcceptAllRevisionsOnlineResponse result = TestInitializer.wordsApi.acceptAllRevisionsOnline(request);
100100
assertNotNull(result);
101+
assertNotNull(result.getDocument());
102+
assertNotNull(result.getModel());
103+
assertNotNull(result.getModel().getResult());
104+
assertNotNull(result.getModel().getResult().getDest());
101105
}
102106

103107
/*
@@ -143,5 +147,9 @@ public void testRejectAllRevisionsOnline() throws ApiException, MessagingExcepti
143147

144148
RejectAllRevisionsOnlineResponse result = TestInitializer.wordsApi.rejectAllRevisionsOnline(request);
145149
assertNotNull(result);
150+
assertNotNull(result.getDocument());
151+
assertNotNull(result.getModel());
152+
assertNotNull(result.getModel().getResult());
153+
assertNotNull(result.getModel().getResult().getDest());
146154
}
147155
}

0 commit comments

Comments
 (0)