Skip to content

Commit da25528

Browse files
Merge branch 'master' into release
2 parents db5d3dd + 270937a commit da25528

File tree

69 files changed

+5884
-189
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+5884
-189
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.8
17+
18+
- Added new api methods to get, insert, update or delete custom xml parts from documents.
19+
- Added parameter 'ResultDocumentFormat' to Compare API
20+
- Added 'ExportLanguageToSpanTag' pdf save option
21+
- Added 'FlatOpcXmlMappingOnly' save option
22+
23+
1624
## Enhancements in Version 21.7
1725

1826
- ImlRenderingMode option introduced witch is used to determine how ink (InkML) objects are rendered
@@ -156,7 +164,7 @@ Add this dependency to your project's POM:
156164
<dependency>
157165
<groupId>com.aspose</groupId>
158166
<artifactId>aspose-words-cloud</artifactId>
159-
<version>21.7.0</version>
167+
<version>21.8.0</version>
160168
</dependency>
161169
</dependencies>
162170
```
Binary file not shown.

examples/AcceptAllRevisions.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@
66
import java.nio.file.Files;
77
import java.nio.file.Paths;
88

9-
String documentsDir = "...";
109
ApiClient apiClient = new ApiClient(/*clientId*/ "####-####-####-####-####", /*clientSecret*/ "##################", null);
1110
WordsApi wordsApi = new WordsApi(apiClient);
1211
String fileName = "test_doc.docx";
1312

1413
// Upload original document to cloud storage.
15-
UploadFileRequest uploadFileRequestRequest = new UploadFileRequest(Files.readAllBytes(Paths.get(documentsDir, fileName).toAbsolutePath()),fileName,null);
16-
wordsApi.uploadFile(uploadFileRequestRequest);
14+
byte[] myVar1 = Files.readAllBytes(Paths.get(fileName).toAbsolutePath());
15+
String myVar2 = fileName;
16+
UploadFileRequest uploadFileRequest = new UploadFileRequest(myVar1, myVar2, null);
17+
wordsApi.uploadFile(uploadFileRequest);
1718

1819
// Calls AcceptAllRevisions method for document in cloud.
19-
AcceptAllRevisionsRequest requestRequest = new AcceptAllRevisionsRequest(fileName,null,null,null,null,null);
20-
wordsApi.acceptAllRevisions(requestRequest);
20+
String myVar3 = fileName;
21+
AcceptAllRevisionsRequest request = new AcceptAllRevisionsRequest(myVar3, null, null, null, null, null);
22+
wordsApi.acceptAllRevisions(request);
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
String documentsDir = "...";
21
ApiClient apiClient = new ApiClient(/*clientId*/ "####-####-####-####-####", /*clientSecret*/ "##################", null);
32
WordsApi wordsApi = new WordsApi(apiClient);
43
String fileName = "test_doc.docx";
54

65
// Calls AcceptAllRevisionsOnline method for document in cloud.
7-
AcceptAllRevisionsOnlineRequest requestRequest = new AcceptAllRevisionsOnlineRequest(Files.readAllBytes(Paths.get(documentsDir, fileName).toAbsolutePath()),null,null,null);
8-
AcceptAllRevisionsOnlineResponse acceptAllRevisionsOnlineResult = wordsApi.acceptAllRevisionsOnline(requestRequest);
6+
byte[] requestDocument = Files.readAllBytes(Paths.get(fileName).toAbsolutePath());
7+
AcceptAllRevisionsOnlineRequest request = new AcceptAllRevisionsOnlineRequest(requestDocument, null, null, null);
8+
AcceptAllRevisionsOnlineResponse acceptAllRevisionsOnlineResult = wordsApi.acceptAllRevisionsOnline(request);
99
Files.write(Paths.get("test_result.docx"), acceptAllRevisionsOnlineResult.getDocument());

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.7.0</version>
7+
<version>21.8.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.7";
59+
private String clientVersion = "21.8";
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/api/WordsApi.java

Lines changed: 906 additions & 16 deletions
Large diffs are not rendered by default.

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

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ public class CompareData {
5858

5959
@SerializedName("DateTime")
6060
private OffsetDateTime dateTime = null;
61+
62+
@SerializedName("ResultDocumentFormat")
63+
private String resultDocumentFormat = null;
6164
public CompareData author(String author) {
6265
this.author = author;
6366
return this;
@@ -130,6 +133,24 @@ public void setDateTime(OffsetDateTime dateTime) {
130133
this.dateTime = dateTime;
131134
}
132135

136+
public CompareData resultDocumentFormat(String resultDocumentFormat) {
137+
this.resultDocumentFormat = resultDocumentFormat;
138+
return this;
139+
}
140+
141+
/**
142+
* Gets or sets the result document format.
143+
* @return resultDocumentFormat
144+
**/
145+
@ApiModelProperty(value = "Gets or sets the result document format.")
146+
public String getResultDocumentFormat() {
147+
return resultDocumentFormat;
148+
}
149+
150+
public void setResultDocumentFormat(String resultDocumentFormat) {
151+
this.resultDocumentFormat = resultDocumentFormat;
152+
}
153+
133154
@Override
134155
public boolean equals(java.lang.Object o) {
135156
if (this == o) {
@@ -144,12 +165,13 @@ public boolean equals(java.lang.Object o) {
144165
Objects.equals(this.author, compareData.author) &&
145166
Objects.equals(this.compareOptions, compareData.compareOptions) &&
146167
Objects.equals(this.comparingWithDocument, compareData.comparingWithDocument) &&
147-
Objects.equals(this.dateTime, compareData.dateTime);
168+
Objects.equals(this.dateTime, compareData.dateTime) &&
169+
Objects.equals(this.resultDocumentFormat, compareData.resultDocumentFormat);
148170
}
149171

150172
@Override
151173
public int hashCode() {
152-
return Objects.hash(author, compareOptions, comparingWithDocument, dateTime);
174+
return Objects.hash(author, compareOptions, comparingWithDocument, dateTime, resultDocumentFormat);
153175
}
154176

155177
@Override
@@ -160,6 +182,7 @@ public String toString() {
160182
sb.append(" compareOptions: ").append(toIndentedString(compareOptions)).append("\n");
161183
sb.append(" comparingWithDocument: ").append(toIndentedString(comparingWithDocument)).append("\n");
162184
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
185+
sb.append(" resultDocumentFormat: ").append(toIndentedString(resultDocumentFormat)).append("\n");
163186
sb.append("}");
164187
return sb.toString();
165188
}
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="CustomXmlPart.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+
* DTO container with a CustomXmlPart.
47+
*/
48+
@ApiModel(description = "DTO container with a CustomXmlPart.")
49+
public class CustomXmlPart extends CustomXmlPartLink {
50+
@SerializedName("Data")
51+
private String data = null;
52+
53+
@SerializedName("Id")
54+
private String id = null;
55+
public CustomXmlPart data(String data) {
56+
this.data = data;
57+
return this;
58+
}
59+
60+
/**
61+
* Gets or sets the custom xml part data.
62+
* @return data
63+
**/
64+
@ApiModelProperty(value = "Gets or sets the custom xml part data.")
65+
public String getData() {
66+
return data;
67+
}
68+
69+
public void setData(String data) {
70+
this.data = data;
71+
}
72+
73+
public CustomXmlPart id(String id) {
74+
this.id = id;
75+
return this;
76+
}
77+
78+
/**
79+
* Gets or sets the custom xml part id.
80+
* @return id
81+
**/
82+
@ApiModelProperty(value = "Gets or sets the custom xml part id.")
83+
public String getId() {
84+
return id;
85+
}
86+
87+
public void setId(String id) {
88+
this.id = id;
89+
}
90+
91+
@Override
92+
public boolean equals(java.lang.Object o) {
93+
if (this == o) {
94+
return true;
95+
}
96+
if (o == null || getClass() != o.getClass()) {
97+
return false;
98+
}
99+
100+
CustomXmlPart customXmlPart = (CustomXmlPart) o;
101+
return
102+
Objects.equals(this.data, customXmlPart.data) &&
103+
Objects.equals(this.id, customXmlPart.id) &&
104+
super.equals(o);
105+
}
106+
107+
@Override
108+
public int hashCode() {
109+
return Objects.hash(data, id, super.hashCode());
110+
}
111+
112+
@Override
113+
public String toString() {
114+
StringBuilder sb = new StringBuilder();
115+
sb.append("class CustomXmlPart {\n");
116+
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
117+
sb.append(" data: ").append(toIndentedString(data)).append("\n");
118+
sb.append(" id: ").append(toIndentedString(id)).append("\n");
119+
sb.append("}");
120+
return sb.toString();
121+
}
122+
123+
/**
124+
* Convert the given object to string with each line indented by 4 spaces
125+
* (except the first line).
126+
*/
127+
private String toIndentedString(java.lang.Object o) {
128+
if (o == null) {
129+
return "null";
130+
}
131+
return o.toString().replace("\n", "\n ");
132+
}
133+
}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="CustomXmlPartInsert.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+
* Custom xml part insert.
47+
*/
48+
@ApiModel(description = "Custom xml part insert.")
49+
public class CustomXmlPartInsert extends CustomXmlPart {
50+
51+
@Override
52+
public boolean equals(java.lang.Object o) {
53+
if (this == o) {
54+
return true;
55+
}
56+
if (o == null || getClass() != o.getClass()) {
57+
return false;
58+
}
59+
60+
return super.equals(o);
61+
}
62+
63+
@Override
64+
public int hashCode() {
65+
return Objects.hash(super.hashCode());
66+
}
67+
68+
@Override
69+
public String toString() {
70+
StringBuilder sb = new StringBuilder();
71+
sb.append("class CustomXmlPartInsert {\n");
72+
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
73+
sb.append("}");
74+
return sb.toString();
75+
}
76+
77+
/**
78+
* Convert the given object to string with each line indented by 4 spaces
79+
* (except the first line).
80+
*/
81+
private String toIndentedString(java.lang.Object o) {
82+
if (o == null) {
83+
return "null";
84+
}
85+
return o.toString().replace("\n", "\n ");
86+
}
87+
}

0 commit comments

Comments
 (0)