Skip to content

Commit 128e5ab

Browse files
SDK regenerated by CI server [ci skip]
1 parent 63fd156 commit 128e5ab

File tree

9 files changed

+821
-4
lines changed

9 files changed

+821
-4
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 23.5
17+
18+
- Added InsertSection method.
19+
20+
1621
## Enhancements in Version 23.4
1722

1823
- Added new type of RangeEndIdentifier for RangeApi: document:end
@@ -281,7 +286,7 @@ Add this dependency to your project's POM:
281286
<dependency>
282287
<groupId>com.aspose</groupId>
283288
<artifactId>aspose-words-cloud</artifactId>
284-
<version>23.4.0</version>
289+
<version>23.5.0</version>
285290
</dependency>
286291
</dependencies>
287292
```

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>23.4.0</version>
7+
<version>23.5.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 = "23.4";
62+
private String clientVersion = "23.5";
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
@@ -16919,6 +16919,149 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
1691916919
return call;
1692016920
}
1692116921

16922+
@SuppressWarnings("rawtypes")
16923+
private com.squareup.okhttp.Call insertSectionValidateBeforeCall(InsertSectionRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
16924+
return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
16925+
}
16926+
16927+
/**
16928+
* Inserts a section to the document.
16929+
* @param request Request object
16930+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
16931+
* @throws IOException If fail to serialize the request body object
16932+
*/
16933+
public void insertSection(InsertSectionRequest request) throws ApiException, MessagingException, IOException {
16934+
try {
16935+
insertSectionWithHttpInfo(request);
16936+
}
16937+
catch (ApiException ex) {
16938+
if (ex.getCode() == apiClient.getNotAuthCode()) {
16939+
apiClient.requestToken();
16940+
insertSectionWithHttpInfo(request);
16941+
}
16942+
throw ex;
16943+
}
16944+
}
16945+
16946+
/**
16947+
* Inserts a section to the document.
16948+
* @param request Request object
16949+
* @return ApiResponse< void >;
16950+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
16951+
* @throws IOException If fail to serialize the request body object
16952+
*/
16953+
private ApiResponse< Void > insertSectionWithHttpInfo(InsertSectionRequest request) throws ApiException, MessagingException, IOException {
16954+
com.squareup.okhttp.Call call = insertSectionValidateBeforeCall(request, null, null);
16955+
return apiClient.execute(call, request);
16956+
}
16957+
16958+
/**
16959+
* Inserts a section to the document. (asynchronously)
16960+
* @param request Request object
16961+
* @param callback The callback to be executed when the API call finishes
16962+
* @return The request call
16963+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
16964+
* @throws IOException If fail to serialize the request body object
16965+
*/
16966+
public com.squareup.okhttp.Call insertSectionAsync(InsertSectionRequest request, final ApiCallback< Void > callback) throws ApiException, MessagingException, IOException {
16967+
16968+
ProgressResponseBody.ProgressListener progressListener = null;
16969+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
16970+
16971+
if (callback != null) {
16972+
progressListener = new ProgressResponseBody.ProgressListener() {
16973+
@Override
16974+
public void update(long bytesRead, long contentLength, boolean done) {
16975+
callback.onDownloadProgress(bytesRead, contentLength, done);
16976+
}
16977+
};
16978+
16979+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
16980+
@Override
16981+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
16982+
callback.onUploadProgress(bytesWritten, contentLength, done);
16983+
}
16984+
};
16985+
}
16986+
16987+
com.squareup.okhttp.Call call = insertSectionValidateBeforeCall(request, progressListener, progressRequestListener);
16988+
apiClient.executeAsync(call, request, callback);
16989+
return call;
16990+
}
16991+
16992+
@SuppressWarnings("rawtypes")
16993+
private com.squareup.okhttp.Call insertSectionOnlineValidateBeforeCall(InsertSectionOnlineRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
16994+
return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
16995+
}
16996+
16997+
/**
16998+
* Inserts a section to the document.
16999+
* @param request Request object
17000+
* @return Map<String, byte[]>
17001+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
17002+
* @throws IOException If fail to serialize the request body object
17003+
*/
17004+
public Map<String, byte[]> insertSectionOnline(InsertSectionOnlineRequest request) throws ApiException, MessagingException, IOException {
17005+
try {
17006+
ApiResponse< Map<String, byte[]> > resp = insertSectionOnlineWithHttpInfo(request);
17007+
return resp.getData();
17008+
}
17009+
catch (ApiException ex) {
17010+
if (ex.getCode() == apiClient.getNotAuthCode()) {
17011+
apiClient.requestToken();
17012+
ApiResponse< Map<String, byte[]> > resp = insertSectionOnlineWithHttpInfo(request);
17013+
return resp.getData();
17014+
}
17015+
throw ex;
17016+
}
17017+
}
17018+
17019+
/**
17020+
* Inserts a section to the document.
17021+
* @param request Request object
17022+
* @return ApiResponse< Map<String, byte[]> >;
17023+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
17024+
* @throws IOException If fail to serialize the request body object
17025+
*/
17026+
private ApiResponse< Map<String, byte[]> > insertSectionOnlineWithHttpInfo(InsertSectionOnlineRequest request) throws ApiException, MessagingException, IOException {
17027+
com.squareup.okhttp.Call call = insertSectionOnlineValidateBeforeCall(request, null, null);
17028+
return apiClient.execute(call, request);
17029+
}
17030+
17031+
/**
17032+
* Inserts a section to the document. (asynchronously)
17033+
* @param request Request object
17034+
* @param callback The callback to be executed when the API call finishes
17035+
* @return The request call
17036+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
17037+
* @throws IOException If fail to serialize the request body object
17038+
*/
17039+
public com.squareup.okhttp.Call insertSectionOnlineAsync(InsertSectionOnlineRequest request, final ApiCallback< Map<String, byte[]> > callback) throws ApiException, MessagingException, IOException {
17040+
17041+
ProgressResponseBody.ProgressListener progressListener = null;
17042+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
17043+
17044+
if (callback != null) {
17045+
progressListener = new ProgressResponseBody.ProgressListener() {
17046+
@Override
17047+
public void update(long bytesRead, long contentLength, boolean done) {
17048+
callback.onDownloadProgress(bytesRead, contentLength, done);
17049+
}
17050+
};
17051+
17052+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
17053+
@Override
17054+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
17055+
callback.onUploadProgress(bytesWritten, contentLength, done);
17056+
}
17057+
};
17058+
}
17059+
17060+
com.squareup.okhttp.Call call = insertSectionOnlineValidateBeforeCall(request, progressListener, progressRequestListener);
17061+
apiClient.executeAsync(call, request, callback);
17062+
return call;
17063+
}
17064+
1692217065
@SuppressWarnings("rawtypes")
1692317066
private com.squareup.okhttp.Call insertStructuredDocumentTagValidateBeforeCall(InsertStructuredDocumentTagRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
1692417067
return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
* FromField.
4747
*/
4848
@ApiModel(description = "FromField.")
49-
public class FormField extends NodeLink {
49+
public abstract class FormField extends NodeLink {
5050
@SerializedName("CalculateOnExit")
5151
protected Boolean calculateOnExit;
5252

src/main/java/com/aspose/words/cloud/model/requests/CreateDocumentRequest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ public void setStorage(String value) {
121121
*/
122122
@Override
123123
public Request buildHttpRequest(ApiClient apiClient, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener, Boolean addAuthHeaders) throws ApiException, IOException {
124+
// verify the required parameter 'FileName' is set
125+
if (getFileName() == null) {
126+
throw new ApiException(apiClient.getBadRequestCode(), "Missing the required parameter 'FileName' when calling createDocument");
127+
}
124128

125129
// create path and map variables
126130
String localVarPath = "/words/create";

0 commit comments

Comments
 (0)