Skip to content

Commit 9b112d4

Browse files
SDK regenerated by CI server [ci skip]
1 parent 89f0caf commit 9b112d4

File tree

310 files changed

+43
-4943
lines changed

Some content is hidden

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

310 files changed

+43
-4943
lines changed

src/main/java/com/aspose/words/cloud/ApiClient.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@
3737
import org.threeten.bp.LocalDate;
3838
import org.threeten.bp.OffsetDateTime;
3939

40+
import javax.crypto.BadPaddingException;
4041
import javax.crypto.Cipher;
42+
import javax.crypto.IllegalBlockSizeException;
4143
import javax.crypto.NoSuchPaddingException;
4244
import javax.mail.BodyPart;
4345
import javax.mail.MessagingException;
@@ -48,6 +50,7 @@
4850
import java.math.BigInteger;
4951
import java.net.URLConnection;
5052
import java.net.URLEncoder;
53+
import java.nio.charset.StandardCharsets;
5154
import java.security.InvalidKeyException;
5255
import java.security.KeyFactory;
5356
import java.security.NoSuchAlgorithmException;
@@ -1190,7 +1193,18 @@ public void setRsaKey(String modulus, String exponent) throws NoSuchAlgorithmExc
11901193
* AddParameterToQuery
11911194
*/
11921195
public void addParameterToQuery(List<Pair> queryParams, String paramName, Object paramValue) {
1193-
queryParams.addAll(parameterToPair(paramName, paramValue));
1196+
if (paramName.equals("password") && !paramValue.toString().isEmpty()) {
1197+
try {
1198+
queryParams.addAll(parameterToPair("encryptedPassword", Base64.getEncoder().encode(this.key.doFinal(paramValue.toString().getBytes(StandardCharsets.UTF_8)))));
1199+
}
1200+
catch (IllegalBlockSizeException e) {
1201+
}
1202+
catch (BadPaddingException e) {
1203+
}
1204+
}
1205+
else {
1206+
queryParams.addAll(parameterToPair(paramName, paramValue));
1207+
}
11941208
}
11951209

11961210
/**

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

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,20 @@ public WordsApi(ApiClient apiClient) {
5858
this.apiClient = apiClient;
5959
try {
6060
this.checkRsaKey();
61-
} catch (ApiException e) {
62-
} catch (MessagingException e) {
63-
} catch (IOException e) {
64-
} catch (InvalidKeySpecException e) {
65-
} catch (NoSuchAlgorithmException e) {
66-
} catch (NoSuchPaddingException e) {
67-
} catch (InvalidKeyException e) {
61+
}
62+
catch (ApiException e) {
63+
}
64+
catch (MessagingException e) {
65+
}
66+
catch (IOException e) {
67+
}
68+
catch (InvalidKeySpecException e) {
69+
}
70+
catch (NoSuchAlgorithmException e) {
71+
}
72+
catch (NoSuchPaddingException e) {
73+
}
74+
catch (InvalidKeyException e) {
6875
}
6976
}
7077

@@ -76,13 +83,20 @@ public void setApiClient(ApiClient apiClient) {
7683
this.apiClient = apiClient;
7784
try {
7885
this.checkRsaKey();
79-
} catch (ApiException e) {
80-
} catch (MessagingException e) {
81-
} catch (IOException e) {
82-
} catch (InvalidKeySpecException e) {
83-
} catch (NoSuchAlgorithmException e) {
84-
} catch (NoSuchPaddingException e) {
85-
} catch (InvalidKeyException e) {
86+
}
87+
catch (ApiException e) {
88+
}
89+
catch (MessagingException e) {
90+
}
91+
catch (IOException e) {
92+
}
93+
catch (InvalidKeySpecException e) {
94+
}
95+
catch (NoSuchAlgorithmException e) {
96+
}
97+
catch (NoSuchPaddingException e) {
98+
}
99+
catch (InvalidKeyException e) {
86100
}
87101
}
88102

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,10 @@
3131
import com.aspose.words.cloud.model.*;
3232
import com.aspose.words.cloud.model.responses.*;
3333
import com.squareup.okhttp.*;
34-
import javax.crypto.BadPaddingException;
35-
import javax.crypto.IllegalBlockSizeException;
3634
import javax.mail.MessagingException;
3735
import javax.mail.internet.MimeMultipart;
3836
import java.io.*;
3937
import java.lang.reflect.Type;
40-
import java.nio.charset.StandardCharsets;
4138
import java.util.*;
4239

4340
/*
@@ -160,19 +157,6 @@ public Request buildHttpRequest(ApiClient apiClient, final ProgressResponseBody.
160157
apiClient.addParameterToQuery(localVarQueryParams, "loadEncoding", getLoadEncoding());
161158
apiClient.addParameterToQuery(localVarQueryParams, "password", getPassword());
162159
apiClient.addParameterToQuery(localVarQueryParams, "destFileName", getDestFileName());
163-
int index = 0;
164-
for (int i = 0; i < localVarQueryParams.size(); i++) {
165-
if (localVarQueryParams.get(i).getName().equals("password")) {
166-
index = i;
167-
try {
168-
apiClient.addParameterToQuery(localVarQueryParams, "encryptedPassword", Base64.getEncoder().encode(apiClient.getKey().doFinal(this.password.getBytes(StandardCharsets.UTF_8))));
169-
} catch (IllegalBlockSizeException e) {
170-
} catch (BadPaddingException e) {
171-
}
172-
}
173-
}
174-
175-
localVarQueryParams.remove(index);
176160

177161
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
178162

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,10 @@
3131
import com.aspose.words.cloud.model.*;
3232
import com.aspose.words.cloud.model.responses.*;
3333
import com.squareup.okhttp.*;
34-
import javax.crypto.BadPaddingException;
35-
import javax.crypto.IllegalBlockSizeException;
3634
import javax.mail.MessagingException;
3735
import javax.mail.internet.MimeMultipart;
3836
import java.io.*;
3937
import java.lang.reflect.Type;
40-
import java.nio.charset.StandardCharsets;
4138
import java.util.*;
4239

4340
/*
@@ -205,19 +202,6 @@ public Request buildHttpRequest(ApiClient apiClient, final ProgressResponseBody.
205202
apiClient.addParameterToQuery(localVarQueryParams, "loadEncoding", getLoadEncoding());
206203
apiClient.addParameterToQuery(localVarQueryParams, "password", getPassword());
207204
apiClient.addParameterToQuery(localVarQueryParams, "destFileName", getDestFileName());
208-
int index = 0;
209-
for (int i = 0; i < localVarQueryParams.size(); i++) {
210-
if (localVarQueryParams.get(i).getName().equals("password")) {
211-
index = i;
212-
try {
213-
apiClient.addParameterToQuery(localVarQueryParams, "encryptedPassword", Base64.getEncoder().encode(apiClient.getKey().doFinal(this.password.getBytes(StandardCharsets.UTF_8))));
214-
} catch (IllegalBlockSizeException e) {
215-
} catch (BadPaddingException e) {
216-
}
217-
}
218-
}
219-
220-
localVarQueryParams.remove(index);
221205

222206
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
223207

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,10 @@
3131
import com.aspose.words.cloud.model.*;
3232
import com.aspose.words.cloud.model.responses.*;
3333
import com.squareup.okhttp.*;
34-
import javax.crypto.BadPaddingException;
35-
import javax.crypto.IllegalBlockSizeException;
3634
import javax.mail.MessagingException;
3735
import javax.mail.internet.MimeMultipart;
3836
import java.io.*;
3937
import java.lang.reflect.Type;
40-
import java.nio.charset.StandardCharsets;
4138
import java.util.*;
4239

4340
/*
@@ -230,19 +227,6 @@ public Request buildHttpRequest(ApiClient apiClient, final ProgressResponseBody.
230227
apiClient.addParameterToQuery(localVarQueryParams, "destFileName", getDestFileName());
231228
apiClient.addParameterToQuery(localVarQueryParams, "revisionAuthor", getRevisionAuthor());
232229
apiClient.addParameterToQuery(localVarQueryParams, "revisionDateTime", getRevisionDateTime());
233-
int index = 0;
234-
for (int i = 0; i < localVarQueryParams.size(); i++) {
235-
if (localVarQueryParams.get(i).getName().equals("password")) {
236-
index = i;
237-
try {
238-
apiClient.addParameterToQuery(localVarQueryParams, "encryptedPassword", Base64.getEncoder().encode(apiClient.getKey().doFinal(this.password.getBytes(StandardCharsets.UTF_8))));
239-
} catch (IllegalBlockSizeException e) {
240-
} catch (BadPaddingException e) {
241-
}
242-
}
243-
}
244-
245-
localVarQueryParams.remove(index);
246230

247231
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
248232

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,10 @@
3131
import com.aspose.words.cloud.model.*;
3232
import com.aspose.words.cloud.model.responses.*;
3333
import com.squareup.okhttp.*;
34-
import javax.crypto.BadPaddingException;
35-
import javax.crypto.IllegalBlockSizeException;
3634
import javax.mail.MessagingException;
3735
import javax.mail.internet.MimeMultipart;
3836
import java.io.*;
3937
import java.lang.reflect.Type;
40-
import java.nio.charset.StandardCharsets;
4138
import java.util.*;
4239

4340
/*
@@ -275,19 +272,6 @@ public Request buildHttpRequest(ApiClient apiClient, final ProgressResponseBody.
275272
apiClient.addParameterToQuery(localVarQueryParams, "destFileName", getDestFileName());
276273
apiClient.addParameterToQuery(localVarQueryParams, "revisionAuthor", getRevisionAuthor());
277274
apiClient.addParameterToQuery(localVarQueryParams, "revisionDateTime", getRevisionDateTime());
278-
int index = 0;
279-
for (int i = 0; i < localVarQueryParams.size(); i++) {
280-
if (localVarQueryParams.get(i).getName().equals("password")) {
281-
index = i;
282-
try {
283-
apiClient.addParameterToQuery(localVarQueryParams, "encryptedPassword", Base64.getEncoder().encode(apiClient.getKey().doFinal(this.password.getBytes(StandardCharsets.UTF_8))));
284-
} catch (IllegalBlockSizeException e) {
285-
} catch (BadPaddingException e) {
286-
}
287-
}
288-
}
289-
290-
localVarQueryParams.remove(index);
291275

292276
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
293277

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,10 @@
3131
import com.aspose.words.cloud.model.*;
3232
import com.aspose.words.cloud.model.responses.*;
3333
import com.squareup.okhttp.*;
34-
import javax.crypto.BadPaddingException;
35-
import javax.crypto.IllegalBlockSizeException;
3634
import javax.mail.MessagingException;
3735
import javax.mail.internet.MimeMultipart;
3836
import java.io.*;
3937
import java.lang.reflect.Type;
40-
import java.nio.charset.StandardCharsets;
4138
import java.util.*;
4239

4340
/*
@@ -257,19 +254,6 @@ public Request buildHttpRequest(ApiClient apiClient, final ProgressResponseBody.
257254
apiClient.addParameterToQuery(localVarQueryParams, "destFileName", getDestFileName());
258255
apiClient.addParameterToQuery(localVarQueryParams, "revisionAuthor", getRevisionAuthor());
259256
apiClient.addParameterToQuery(localVarQueryParams, "revisionDateTime", getRevisionDateTime());
260-
int index = 0;
261-
for (int i = 0; i < localVarQueryParams.size(); i++) {
262-
if (localVarQueryParams.get(i).getName().equals("password")) {
263-
index = i;
264-
try {
265-
apiClient.addParameterToQuery(localVarQueryParams, "encryptedPassword", Base64.getEncoder().encode(apiClient.getKey().doFinal(this.password.getBytes(StandardCharsets.UTF_8))));
266-
} catch (IllegalBlockSizeException e) {
267-
} catch (BadPaddingException e) {
268-
}
269-
}
270-
}
271-
272-
localVarQueryParams.remove(index);
273257

274258
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
275259

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,10 @@
3131
import com.aspose.words.cloud.model.*;
3232
import com.aspose.words.cloud.model.responses.*;
3333
import com.squareup.okhttp.*;
34-
import javax.crypto.BadPaddingException;
35-
import javax.crypto.IllegalBlockSizeException;
3634
import javax.mail.MessagingException;
3735
import javax.mail.internet.MimeMultipart;
3836
import java.io.*;
3937
import java.lang.reflect.Type;
40-
import java.nio.charset.StandardCharsets;
4138
import java.util.*;
4239

4340
/*
@@ -302,19 +299,6 @@ public Request buildHttpRequest(ApiClient apiClient, final ProgressResponseBody.
302299
apiClient.addParameterToQuery(localVarQueryParams, "destFileName", getDestFileName());
303300
apiClient.addParameterToQuery(localVarQueryParams, "revisionAuthor", getRevisionAuthor());
304301
apiClient.addParameterToQuery(localVarQueryParams, "revisionDateTime", getRevisionDateTime());
305-
int index = 0;
306-
for (int i = 0; i < localVarQueryParams.size(); i++) {
307-
if (localVarQueryParams.get(i).getName().equals("password")) {
308-
index = i;
309-
try {
310-
apiClient.addParameterToQuery(localVarQueryParams, "encryptedPassword", Base64.getEncoder().encode(apiClient.getKey().doFinal(this.password.getBytes(StandardCharsets.UTF_8))));
311-
} catch (IllegalBlockSizeException e) {
312-
} catch (BadPaddingException e) {
313-
}
314-
}
315-
}
316-
317-
localVarQueryParams.remove(index);
318302

319303
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
320304

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,10 @@
3131
import com.aspose.words.cloud.model.*;
3232
import com.aspose.words.cloud.model.responses.*;
3333
import com.squareup.okhttp.*;
34-
import javax.crypto.BadPaddingException;
35-
import javax.crypto.IllegalBlockSizeException;
3634
import javax.mail.MessagingException;
3735
import javax.mail.internet.MimeMultipart;
3836
import java.io.*;
3937
import java.lang.reflect.Type;
40-
import java.nio.charset.StandardCharsets;
4138
import java.util.*;
4239

4340
/*
@@ -168,19 +165,6 @@ public Request buildHttpRequest(ApiClient apiClient, final ProgressResponseBody.
168165
List<Pair> localVarQueryParams = new ArrayList<Pair>();
169166
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
170167
apiClient.addParameterToQuery(localVarQueryParams, "documentFileName", getDocumentFileName());
171-
int index = 0;
172-
for (int i = 0; i < localVarQueryParams.size(); i++) {
173-
if (localVarQueryParams.get(i).getName().equals("password")) {
174-
index = i;
175-
try {
176-
apiClient.addParameterToQuery(localVarQueryParams, "encryptedPassword", Base64.getEncoder().encode(apiClient.getKey().doFinal(this.password.getBytes(StandardCharsets.UTF_8))));
177-
} catch (IllegalBlockSizeException e) {
178-
} catch (BadPaddingException e) {
179-
}
180-
}
181-
}
182-
183-
localVarQueryParams.remove(index);
184168

185169
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
186170

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,10 @@
3131
import com.aspose.words.cloud.model.*;
3232
import com.aspose.words.cloud.model.responses.*;
3333
import com.squareup.okhttp.*;
34-
import javax.crypto.BadPaddingException;
35-
import javax.crypto.IllegalBlockSizeException;
3634
import javax.mail.MessagingException;
3735
import javax.mail.internet.MimeMultipart;
3836
import java.io.*;
3937
import java.lang.reflect.Type;
40-
import java.nio.charset.StandardCharsets;
4138
import java.util.*;
4239

4340
/*
@@ -257,19 +254,6 @@ public Request buildHttpRequest(ApiClient apiClient, final ProgressResponseBody.
257254
apiClient.addParameterToQuery(localVarQueryParams, "loadEncoding", getLoadEncoding());
258255
apiClient.addParameterToQuery(localVarQueryParams, "password", getPassword());
259256
apiClient.addParameterToQuery(localVarQueryParams, "destFileName", getDestFileName());
260-
int index = 0;
261-
for (int i = 0; i < localVarQueryParams.size(); i++) {
262-
if (localVarQueryParams.get(i).getName().equals("password")) {
263-
index = i;
264-
try {
265-
apiClient.addParameterToQuery(localVarQueryParams, "encryptedPassword", Base64.getEncoder().encode(apiClient.getKey().doFinal(this.password.getBytes(StandardCharsets.UTF_8))));
266-
} catch (IllegalBlockSizeException e) {
267-
} catch (BadPaddingException e) {
268-
}
269-
}
270-
}
271-
272-
localVarQueryParams.remove(index);
273257

274258
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
275259

0 commit comments

Comments
 (0)