Skip to content

Commit 84997ed

Browse files
Merge branch 'master' into release
2 parents 46d2ba9 + deedbcc commit 84997ed

File tree

11 files changed

+774
-16
lines changed

11 files changed

+774
-16
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ 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.2
17+
18+
- Added delete all comments method
19+
20+
1621
## Enhancements in Version 21.1
1722

1823
- Added online version for all API methods
@@ -117,7 +122,7 @@ Add this dependency to your project's POM:
117122
<dependency>
118123
<groupId>com.aspose</groupId>
119124
<artifactId>aspose-words-cloud</artifactId>
120-
<version>21.1.0</version>
125+
<version>21.2.0</version>
121126
</dependency>
122127
</dependencies>
123128
```

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.1.0</version>
7+
<version>21.2.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.1";
59+
private String clientVersion = "21.2";
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: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2292,6 +2292,151 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
22922292
return call;
22932293
}
22942294

2295+
@SuppressWarnings("rawtypes")
2296+
private com.squareup.okhttp.Call deleteCommentsValidateBeforeCall(DeleteCommentsRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
2297+
return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
2298+
}
2299+
2300+
/**
2301+
* Removes all comments from the document.
2302+
* @param request Request object
2303+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
2304+
* @throws IOException If fail to serialize the request body object
2305+
*/
2306+
public void deleteComments(DeleteCommentsRequest request) throws ApiException, MessagingException, IOException {
2307+
try {
2308+
deleteCommentsWithHttpInfo(request);
2309+
}
2310+
catch (ApiException ex) {
2311+
if (ex.getCode() == apiClient.getNotAuthCode()) {
2312+
apiClient.requestToken();
2313+
deleteCommentsWithHttpInfo(request);
2314+
}
2315+
throw ex;
2316+
}
2317+
}
2318+
2319+
/**
2320+
* Removes all comments from the document.
2321+
* @param request Request object
2322+
* @return ApiResponse< void >;
2323+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
2324+
* @throws IOException If fail to serialize the request body object
2325+
*/
2326+
private ApiResponse< Void > deleteCommentsWithHttpInfo(DeleteCommentsRequest request) throws ApiException, MessagingException, IOException {
2327+
com.squareup.okhttp.Call call = deleteCommentsValidateBeforeCall(request, null, null);
2328+
return apiClient.execute(call);
2329+
}
2330+
2331+
/**
2332+
* Removes all comments from the document. (asynchronously)
2333+
* @param request Request object
2334+
* @param callback The callback to be executed when the API call finishes
2335+
* @return The request call
2336+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
2337+
* @throws IOException If fail to serialize the request body object
2338+
*/
2339+
public com.squareup.okhttp.Call deleteCommentsAsync(DeleteCommentsRequest request, final ApiCallback< Void > callback) throws ApiException, MessagingException, IOException {
2340+
2341+
ProgressResponseBody.ProgressListener progressListener = null;
2342+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
2343+
2344+
if (callback != null) {
2345+
progressListener = new ProgressResponseBody.ProgressListener() {
2346+
@Override
2347+
public void update(long bytesRead, long contentLength, boolean done) {
2348+
callback.onDownloadProgress(bytesRead, contentLength, done);
2349+
}
2350+
};
2351+
2352+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
2353+
@Override
2354+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
2355+
callback.onUploadProgress(bytesWritten, contentLength, done);
2356+
}
2357+
};
2358+
}
2359+
2360+
com.squareup.okhttp.Call call = deleteCommentsValidateBeforeCall(request, progressListener, progressRequestListener);
2361+
apiClient.executeAsync(call, callback);
2362+
return call;
2363+
}
2364+
2365+
@SuppressWarnings("rawtypes")
2366+
private com.squareup.okhttp.Call deleteCommentsOnlineValidateBeforeCall(DeleteCommentsOnlineRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
2367+
return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
2368+
}
2369+
2370+
/**
2371+
* Removes all comments from the document.
2372+
* @param request Request object
2373+
* @return File
2374+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
2375+
* @throws IOException If fail to serialize the request body object
2376+
*/
2377+
public File deleteCommentsOnline(DeleteCommentsOnlineRequest request) throws ApiException, MessagingException, IOException {
2378+
try {
2379+
ApiResponse< File > resp = deleteCommentsOnlineWithHttpInfo(request);
2380+
return resp.getData();
2381+
}
2382+
catch (ApiException ex) {
2383+
if (ex.getCode() == apiClient.getNotAuthCode()) {
2384+
apiClient.requestToken();
2385+
ApiResponse< File > resp = deleteCommentsOnlineWithHttpInfo(request);
2386+
return resp.getData();
2387+
}
2388+
throw ex;
2389+
}
2390+
}
2391+
2392+
/**
2393+
* Removes all comments from the document.
2394+
* @param request Request object
2395+
* @return ApiResponse< File >;
2396+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
2397+
* @throws IOException If fail to serialize the request body object
2398+
*/
2399+
private ApiResponse< File > deleteCommentsOnlineWithHttpInfo(DeleteCommentsOnlineRequest request) throws ApiException, MessagingException, IOException {
2400+
com.squareup.okhttp.Call call = deleteCommentsOnlineValidateBeforeCall(request, null, null);
2401+
Response response = call.execute();
2402+
File data = request.deserializeResponse(apiClient, response);
2403+
return new ApiResponse< File >(response.code(), response.headers().toMultimap(), data);
2404+
}
2405+
2406+
/**
2407+
* Removes all comments from the document. (asynchronously)
2408+
* @param request Request object
2409+
* @param callback The callback to be executed when the API call finishes
2410+
* @return The request call
2411+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
2412+
* @throws IOException If fail to serialize the request body object
2413+
*/
2414+
public com.squareup.okhttp.Call deleteCommentsOnlineAsync(DeleteCommentsOnlineRequest request, final ApiCallback< File > callback) throws ApiException, MessagingException, IOException {
2415+
2416+
ProgressResponseBody.ProgressListener progressListener = null;
2417+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
2418+
2419+
if (callback != null) {
2420+
progressListener = new ProgressResponseBody.ProgressListener() {
2421+
@Override
2422+
public void update(long bytesRead, long contentLength, boolean done) {
2423+
callback.onDownloadProgress(bytesRead, contentLength, done);
2424+
}
2425+
};
2426+
2427+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
2428+
@Override
2429+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
2430+
callback.onUploadProgress(bytesWritten, contentLength, done);
2431+
}
2432+
};
2433+
}
2434+
2435+
com.squareup.okhttp.Call call = deleteCommentsOnlineValidateBeforeCall(request, progressListener, progressRequestListener);
2436+
apiClient.executeAsync(call, request.getResponseType(), callback);
2437+
return call;
2438+
}
2439+
22952440
@SuppressWarnings("rawtypes")
22962441
private com.squareup.okhttp.Call deleteDocumentPropertyValidateBeforeCall(DeleteDocumentPropertyRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
22972442
return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));

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

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ public Dml3DEffectsRenderingModeEnum read(final JsonReader jsonReader) throws IO
9393
}
9494
}
9595

96+
@SerializedName("AllowEmbeddingPostScriptFonts")
97+
private Boolean allowEmbeddingPostScriptFonts = null;
98+
9699
@SerializedName("Dml3DEffectsRenderingMode")
97100
private Dml3DEffectsRenderingModeEnum dml3DEffectsRenderingMode = null;
98101

@@ -122,6 +125,24 @@ public Dml3DEffectsRenderingModeEnum read(final JsonReader jsonReader) throws IO
122125

123126
@SerializedName("ZipOutput")
124127
private Boolean zipOutput = null;
128+
public SaveOptionsData allowEmbeddingPostScriptFonts(Boolean allowEmbeddingPostScriptFonts) {
129+
this.allowEmbeddingPostScriptFonts = allowEmbeddingPostScriptFonts;
130+
return this;
131+
}
132+
133+
/**
134+
* Gets or sets a boolean value indicating whether to allow embedding fonts with PostScript outlines when embedding TrueType fonts in a document upon it is saved. The default value is false..
135+
* @return allowEmbeddingPostScriptFonts
136+
**/
137+
@ApiModelProperty(value = "Gets or sets a boolean value indicating whether to allow embedding fonts with PostScript outlines when embedding TrueType fonts in a document upon it is saved. The default value is false..")
138+
public Boolean getAllowEmbeddingPostScriptFonts() {
139+
return allowEmbeddingPostScriptFonts;
140+
}
141+
142+
public void setAllowEmbeddingPostScriptFonts(Boolean allowEmbeddingPostScriptFonts) {
143+
this.allowEmbeddingPostScriptFonts = allowEmbeddingPostScriptFonts;
144+
}
145+
125146
public SaveOptionsData dml3DEffectsRenderingMode(Dml3DEffectsRenderingModeEnum dml3DEffectsRenderingMode) {
126147
this.dml3DEffectsRenderingMode = dml3DEffectsRenderingMode;
127148
return this;
@@ -315,6 +336,7 @@ public boolean equals(java.lang.Object o) {
315336

316337
SaveOptionsData saveOptionsData = (SaveOptionsData) o;
317338
return
339+
Objects.equals(this.allowEmbeddingPostScriptFonts, saveOptionsData.allowEmbeddingPostScriptFonts) &&
318340
Objects.equals(this.dml3DEffectsRenderingMode, saveOptionsData.dml3DEffectsRenderingMode) &&
319341
Objects.equals(this.dmlEffectsRenderingMode, saveOptionsData.dmlEffectsRenderingMode) &&
320342
Objects.equals(this.dmlRenderingMode, saveOptionsData.dmlRenderingMode) &&
@@ -329,13 +351,14 @@ public boolean equals(java.lang.Object o) {
329351

330352
@Override
331353
public int hashCode() {
332-
return Objects.hash(dml3DEffectsRenderingMode, dmlEffectsRenderingMode, dmlRenderingMode, fileName, saveFormat, updateFields, updateLastPrintedProperty, updateLastSavedTimeProperty, updateSdtContent, zipOutput);
354+
return Objects.hash(allowEmbeddingPostScriptFonts, dml3DEffectsRenderingMode, dmlEffectsRenderingMode, dmlRenderingMode, fileName, saveFormat, updateFields, updateLastPrintedProperty, updateLastSavedTimeProperty, updateSdtContent, zipOutput);
333355
}
334356

335357
@Override
336358
public String toString() {
337359
StringBuilder sb = new StringBuilder();
338360
sb.append("class SaveOptionsData {\n");
361+
sb.append(" allowEmbeddingPostScriptFonts: ").append(toIndentedString(allowEmbeddingPostScriptFonts)).append("\n");
339362
sb.append(" dml3DEffectsRenderingMode: ").append(toIndentedString(dml3DEffectsRenderingMode)).append("\n");
340363
sb.append(" dmlEffectsRenderingMode: ").append(toIndentedString(dmlEffectsRenderingMode)).append("\n");
341364
sb.append(" dmlRenderingMode: ").append(toIndentedString(dmlRenderingMode)).append("\n");

0 commit comments

Comments
 (0)