Skip to content

Commit 2a60f12

Browse files
Merge branch 'master' into release
2 parents ed8830f + 1112691 commit 2a60f12

File tree

86 files changed

+9430
-7162
lines changed

Some content is hidden

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

86 files changed

+9430
-7162
lines changed

.gitattributes

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# default behavior
2+
* text=auto
3+
4+
# code files
5+
*.java text eol=lf
6+
7+
# test files
8+
*.xml text eol=lf
9+
*.json text eol=lf
10+
11+
# scripts
12+
*.bat text eol=crlf
13+
*.ps1 text eol=crlf
14+
*.sh text eol=lf
15+
16+
17+
18+

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ target
2121
.gradle
2222
build
2323
.idea/
24-
.gitignore
2524
Settings/servercreds.json
2625
.classpath
2726
.project
2827
/aspose-words-cloud.iml
2928
/out.tmp
29+
30+
# VS Code
31+
.vs/*

JenkinsfileRelease

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ node('words-linux') {
4646
sh 'echo "{\\"AppSid\\": \\"$AppSid\\",\\"AppKey\\": \\"$AppKey\\", \\"BaseUrl\\": \\"$testServerUrl\\"}" > Settings/servercreds.json'
4747
}
4848
sh 'cat wordsSettings.xml'
49-
sh "mvn --settings wordsSettings.xml deploy -DcheckModificationExcludeList=wordsSettings.xml,Settings/servercreds.json"
49+
sh "mvn --settings wordsSettings.xml deploy -Dmaven.javadoc.skip=true -DcheckModificationExcludeList=wordsSettings.xml,Settings/servercreds.json"
5050
}
5151
}
5252
}
6.77 MB
Binary file not shown.

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>20.6.0</version>
7+
<version>20.7.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: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public class ApiClient {
5151
private String apiVersion = "v4.0";
5252
private String baseUrl = "https://api.aspose.cloud";
5353
private String basePath = baseUrl + "/" + apiVersion;
54-
private String clientVersion = "20.6";
54+
private String clientVersion = "20.7";
5555
private boolean debugging = false;
5656
private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
5757
private String tempFolderPath = null;
@@ -1047,16 +1047,22 @@ public RequestBody buildRequestBodyFormEncoding(Map<String, Object> formParams)
10471047
*/
10481048
public RequestBody buildRequestBodyMultipart(Map<String, Object> formParams) throws IOException {
10491049
MultipartBuilder mpBuilder = new MultipartBuilder().type(MultipartBuilder.FORM);
1050-
for (Entry<String, Object> param : formParams.entrySet()) {
1051-
if (param.getValue() instanceof byte[]) {
1052-
byte[] file = (byte[]) param.getValue();
1053-
Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"; filename=\"" + param.getKey() + "\"");
1054-
MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file));
1055-
mpBuilder.addPart(partHeaders, RequestBody.create(mediaType, file));
1056-
}
1057-
else {
1058-
Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"");
1059-
mpBuilder.addPart(partHeaders, RequestBody.create(null, parameterToString(param.getValue())));
1050+
if (formParams.isEmpty()) {
1051+
Headers partHeaders = Headers.of("Content-Disposition", "form-data");
1052+
mpBuilder.addPart(partHeaders, RequestBody.create(MediaType.parse("none"), new byte[] {}));
1053+
}
1054+
else {
1055+
for (Entry<String, Object> param : formParams.entrySet()) {
1056+
if (param.getValue() instanceof byte[]) {
1057+
byte[] file = (byte[]) param.getValue();
1058+
Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"; filename=\"" + param.getKey() + "\"");
1059+
MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file));
1060+
mpBuilder.addPart(partHeaders, RequestBody.create(mediaType, file));
1061+
}
1062+
else {
1063+
Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"");
1064+
mpBuilder.addPart(partHeaders, RequestBody.create(null, parameterToString(param.getValue())));
1065+
}
10601066
}
10611067
}
10621068
return mpBuilder.build();

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

Lines changed: 0 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -27484,154 +27484,6 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
2748427484
return call;
2748527485
}
2748627486

27487-
/**
27488-
* Build call for updateParagraphFormatWithoutNodePath
27489-
* @param progressListener Progress listener
27490-
* @param progressRequestListener Progress request listener
27491-
* @return Call to execute
27492-
* @throws ApiException If fail to serialize the request body object
27493-
* @throws IOException If fail to serialize the request body object
27494-
*/
27495-
private com.squareup.okhttp.Call updateParagraphFormatWithoutNodePathCall(UpdateParagraphFormatWithoutNodePathRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
27496-
Object localVarPostBody = request.getDto();
27497-
27498-
// create path and map variables
27499-
String localVarPath = "/words/{name}/paragraphs/{index}/format".replaceAll("\\{" + "name" + "\\}", request.getName().toString()).replaceAll("//", "/")
27500-
.replaceAll("\\{" + "index" + "\\}", request.getIndex().toString()).replaceAll("//", "/");
27501-
27502-
List<Pair> localVarQueryParams = new ArrayList<Pair>();
27503-
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
27504-
localVarPath = addParameterToQuery(localVarQueryParams, localVarPath, "folder", request.getFolder());
27505-
localVarPath = addParameterToQuery(localVarQueryParams, localVarPath, "storage", request.getStorage());
27506-
localVarPath = addParameterToQuery(localVarQueryParams, localVarPath, "loadEncoding", request.getLoadEncoding());
27507-
localVarPath = addParameterToQuery(localVarQueryParams, localVarPath, "password", request.getPassword());
27508-
localVarPath = addParameterToQuery(localVarQueryParams, localVarPath, "destFileName", request.getDestFileName());
27509-
localVarPath = addParameterToQuery(localVarQueryParams, localVarPath, "revisionAuthor", request.getRevisionAuthor());
27510-
localVarPath = addParameterToQuery(localVarQueryParams, localVarPath, "revisionDateTime", request.getRevisionDateTime());
27511-
27512-
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
27513-
27514-
Map<String, Object> localVarFormParams = new LinkedHashMap<String, Object>();
27515-
27516-
final String[] localVarAccepts = {
27517-
"application/xml", "application/json"
27518-
};
27519-
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
27520-
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
27521-
27522-
final String[] localVarContentTypes = {
27523-
"application/xml", "application/json"
27524-
};
27525-
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
27526-
localVarHeaderParams.put("Content-Type", localVarContentType);
27527-
27528-
if (progressListener != null) {
27529-
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
27530-
@Override
27531-
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
27532-
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
27533-
return originalResponse.newBuilder()
27534-
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
27535-
.build();
27536-
}
27537-
});
27538-
}
27539-
27540-
String[] localVarAuthNames = new String[] { "JWT" };
27541-
return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
27542-
}
27543-
27544-
@SuppressWarnings("rawtypes")
27545-
private com.squareup.okhttp.Call updateParagraphFormatWithoutNodePathValidateBeforeCall(UpdateParagraphFormatWithoutNodePathRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
27546-
// verify the required parameter 'Name' is set
27547-
if (request.getName() == null) {
27548-
throw new ApiException(BadRequest, "Missing the required parameter 'Name' when calling updateParagraphFormatWithoutNodePath");
27549-
}
27550-
27551-
// verify the required parameter 'Dto' is set
27552-
if (request.getDto() == null) {
27553-
throw new ApiException(BadRequest, "Missing the required parameter 'Dto' when calling updateParagraphFormatWithoutNodePath");
27554-
}
27555-
27556-
// verify the required parameter 'Index' is set
27557-
if (request.getIndex() == null) {
27558-
throw new ApiException(BadRequest, "Missing the required parameter 'Index' when calling updateParagraphFormatWithoutNodePath");
27559-
}
27560-
27561-
com.squareup.okhttp.Call call = updateParagraphFormatWithoutNodePathCall(request, progressListener, progressRequestListener);
27562-
return call;
27563-
}
27564-
27565-
/**
27566-
* Updates paragraph format properties, returns updated format properties.
27567-
* @param request Request object
27568-
* @return ParagraphFormatResponse
27569-
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
27570-
* @throws IOException If fail to serialize the request body object
27571-
*/
27572-
public ParagraphFormatResponse updateParagraphFormatWithoutNodePath(UpdateParagraphFormatWithoutNodePathRequest request) throws ApiException, IOException {
27573-
try {
27574-
ApiResponse< ParagraphFormatResponse > resp = updateParagraphFormatWithoutNodePathWithHttpInfo(request);
27575-
return resp.getData();
27576-
}
27577-
catch (ApiException ex) {
27578-
if (ex.getCode() == NotAuth) {
27579-
apiClient.requestToken();
27580-
ApiResponse< ParagraphFormatResponse > resp = updateParagraphFormatWithoutNodePathWithHttpInfo(request);
27581-
return resp.getData();
27582-
}
27583-
throw ex;
27584-
}
27585-
}
27586-
27587-
/**
27588-
* Updates paragraph format properties, returns updated format properties.
27589-
* @param request Request object
27590-
* @return ApiResponse< ParagraphFormatResponse >;
27591-
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
27592-
* @throws IOException If fail to serialize the request body object
27593-
*/
27594-
private ApiResponse< ParagraphFormatResponse > updateParagraphFormatWithoutNodePathWithHttpInfo(UpdateParagraphFormatWithoutNodePathRequest request) throws ApiException, IOException {
27595-
com.squareup.okhttp.Call call = updateParagraphFormatWithoutNodePathValidateBeforeCall(request, null, null);
27596-
Type localVarReturnType = new TypeToken< ParagraphFormatResponse >() { }.getType();
27597-
return apiClient.execute(call, localVarReturnType);
27598-
}
27599-
27600-
/**
27601-
* Updates paragraph format properties, returns updated format properties. (asynchronously)
27602-
* @param request Request object
27603-
* @param callback The callback to be executed when the API call finishes
27604-
* @return The request call
27605-
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
27606-
* @throws IOException If fail to serialize the request body object
27607-
*/
27608-
public com.squareup.okhttp.Call updateParagraphFormatWithoutNodePathAsync(UpdateParagraphFormatWithoutNodePathRequest request, final ApiCallback< ParagraphFormatResponse > callback) throws ApiException, IOException {
27609-
27610-
ProgressResponseBody.ProgressListener progressListener = null;
27611-
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
27612-
27613-
if (callback != null) {
27614-
progressListener = new ProgressResponseBody.ProgressListener() {
27615-
@Override
27616-
public void update(long bytesRead, long contentLength, boolean done) {
27617-
callback.onDownloadProgress(bytesRead, contentLength, done);
27618-
}
27619-
};
27620-
27621-
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
27622-
@Override
27623-
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
27624-
callback.onUploadProgress(bytesWritten, contentLength, done);
27625-
}
27626-
};
27627-
}
27628-
27629-
com.squareup.okhttp.Call call = updateParagraphFormatWithoutNodePathValidateBeforeCall(request, progressListener, progressRequestListener);
27630-
Type localVarReturnType = new TypeToken< ParagraphFormatResponse >() { }.getType();
27631-
apiClient.executeAsync(call, localVarReturnType, callback);
27632-
return call;
27633-
}
27634-
2763527487
/**
2763627488
* Build call for updateParagraphListFormat
2763727489
* @param progressListener Progress listener

0 commit comments

Comments
 (0)