Skip to content

Commit e28cb6c

Browse files
committed
Updated sources
1 parent e948047 commit e28cb6c

File tree

83 files changed

+1351
-1001
lines changed

Some content is hidden

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

83 files changed

+1351
-1001
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Add following repository and dependency to your project's POM
3737
<dependency>
3838
<groupId>com.groupdocs</groupId>
3939
<artifactId>groupdocs-conversion-cloud</artifactId>
40-
<version>19.3</version>
40+
<version>19.4</version>
4141
<scope>compile</scope>
4242
</dependency>
4343
```
@@ -50,7 +50,7 @@ At first generate the JAR by executing:
5050

5151
Then manually install the following JARs:
5252

53-
* target/groupdocs-conversion-cloud-19.3.jar
53+
* target/groupdocs-conversion-cloud-19.4.jar
5454
* target/lib/*.jar
5555

5656
## Getting Started

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>groupdocs-conversion-cloud</artifactId>
66
<packaging>jar</packaging>
77
<name>groupdocs-conversion-cloud</name>
8-
<version>19.3</version>
8+
<version>19.4</version>
99
<url>https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-java</url>
1010
<description>Java library for communicating with the GroupDocs.Conversion Cloud API</description>
1111
<scm>

src/main/java/com/groupdocs/cloud/conversion/api/ConversionApi.java

Lines changed: 134 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,22 +145,25 @@ private com.squareup.okhttp.Call convertDocumentValidateBeforeCall(ConvertDocume
145145
* Converts specified input document to format specified in the convertSettings with specified options
146146
*
147147
* @param request The request model
148+
* @return List&lt;StoredConvertedResult&gt;
148149
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
149150
*/
150-
public void convertDocument(ConvertDocumentRequest request) throws ApiException {
151-
convertDocumentWithHttpInfo(request);
151+
public List<StoredConvertedResult> convertDocument(ConvertDocumentRequest request) throws ApiException {
152+
ApiResponse<List<StoredConvertedResult>> resp = convertDocumentWithHttpInfo(request);
153+
return resp.getData();
152154
}
153155

154156
/**
155157
* Converts specified input document to format specified in the convertSettings with specified options
156158
*
157159
* @param request The request model
158-
* @return ApiResponse&lt;Void&gt;
160+
* @return ApiResponse&lt;List&lt;StoredConvertedResult&gt;&gt;
159161
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
160162
*/
161-
public ApiResponse<Void> convertDocumentWithHttpInfo(ConvertDocumentRequest request) throws ApiException {
163+
public ApiResponse<List<StoredConvertedResult>> convertDocumentWithHttpInfo(ConvertDocumentRequest request) throws ApiException {
162164
com.squareup.okhttp.Call call = convertDocumentValidateBeforeCall(request, null, null);
163-
return apiClient.execute(call);
165+
Type localVarReturnType = new TypeToken<List<StoredConvertedResult>>(){}.getType();
166+
return apiClient.execute(call, localVarReturnType);
164167
}
165168

166169
/**
@@ -196,6 +199,129 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
196199
apiClient.executeAsync(call, callback);
197200
return call;
198201
}
202+
203+
/**
204+
* Build call for convertDocumentDownload
205+
* @param request The request model
206+
* @param progressListener Progress listener
207+
* @param progressRequestListener Progress request listener
208+
* @return Call to execute
209+
* @throws ApiException If fail to serialize the request body object
210+
*/
211+
public com.squareup.okhttp.Call convertDocumentDownloadCall(ConvertDocumentRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
212+
Object localVarPostBody = request.getconvertSettings();
213+
214+
// create path and map variables
215+
String localVarPath = "/conversion";
216+
217+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
218+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
219+
220+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
221+
222+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
223+
224+
final String[] localVarAccepts = {
225+
"application/json"
226+
};
227+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
228+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
229+
230+
final String[] localVarContentTypes = {
231+
"application/json"
232+
};
233+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
234+
localVarHeaderParams.put("Content-Type", localVarContentType);
235+
236+
if(progressListener != null) {
237+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
238+
@Override
239+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
240+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
241+
return originalResponse.newBuilder()
242+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
243+
.build();
244+
}
245+
});
246+
}
247+
248+
String[] localVarAuthNames = new String[] { "JWT" };
249+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
250+
}
251+
252+
@SuppressWarnings("rawtypes")
253+
private com.squareup.okhttp.Call convertDocumentDownloadValidateBeforeCall(ConvertDocumentRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
254+
255+
// verify the required parameter 'convertSettings' is set
256+
if (request.getconvertSettings() == null) {
257+
throw new ApiException("Missing the required parameter 'convertSettings' when calling convertDocument(Async)");
258+
}
259+
260+
261+
com.squareup.okhttp.Call call = convertDocumentDownloadCall(request, progressListener, progressRequestListener);
262+
return call;
263+
264+
}
265+
266+
/**
267+
* Converts specified input document to format specified in the convertSettings with specified options and download
268+
*
269+
* @param request The request model
270+
* @return File
271+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
272+
*/
273+
public File convertDocumentDownload(ConvertDocumentRequest request) throws ApiException {
274+
ApiResponse<File> resp = convertDocumentDownloadWithHttpInfo(request);
275+
return resp.getData();
276+
}
277+
278+
/**
279+
* Converts specified input document to format specified in the convertSettings with specified options and download
280+
*
281+
* @param request The request model
282+
* @return ApiResponse&lt;File&gt;
283+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
284+
*/
285+
public ApiResponse<File> convertDocumentDownloadWithHttpInfo(ConvertDocumentRequest request) throws ApiException {
286+
com.squareup.okhttp.Call call = convertDocumentDownloadValidateBeforeCall(request, null, null);
287+
Type localVarReturnType = new TypeToken<File>(){}.getType();
288+
return apiClient.execute(call, localVarReturnType);
289+
}
290+
291+
/**
292+
* Converts specified input document to format specified in the convertSettings with specified options (asynchronously) and download
293+
*
294+
* @param request The request model
295+
* @param callback The callback to be executed when the API call finishes
296+
* @return The request call
297+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
298+
*/
299+
public com.squareup.okhttp.Call convertDocumentDownloadAsync(ConvertDocumentRequest request, final ApiCallback<Void> callback) throws ApiException {
300+
301+
ProgressResponseBody.ProgressListener progressListener = null;
302+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
303+
304+
if (callback != null) {
305+
progressListener = new ProgressResponseBody.ProgressListener() {
306+
@Override
307+
public void update(long bytesRead, long contentLength, boolean done) {
308+
callback.onDownloadProgress(bytesRead, contentLength, done);
309+
}
310+
};
311+
312+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
313+
@Override
314+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
315+
callback.onUploadProgress(bytesWritten, contentLength, done);
316+
}
317+
};
318+
}
319+
320+
com.squareup.okhttp.Call call = convertDocumentDownloadValidateBeforeCall(request, progressListener, progressRequestListener);
321+
apiClient.executeAsync(call, callback);
322+
return call;
323+
}
324+
199325
/**
200326
* Build call for getSupportedConversionTypes
201327
* @param request The request model
@@ -214,8 +340,8 @@ public com.squareup.okhttp.Call getSupportedConversionTypesCall(GetSupportedConv
214340
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
215341
if (request.getFilePath() != null)
216342
localVarQueryParams.addAll(apiClient.parameterToPair("filePath", request.getFilePath()));
217-
if (request.getStorage() != null)
218-
localVarQueryParams.addAll(apiClient.parameterToPair("storage", request.getStorage()));
343+
if (request.getStorageName() != null)
344+
localVarQueryParams.addAll(apiClient.parameterToPair("storageName", request.getStorageName()));
219345
if (request.getformat() != null)
220346
localVarQueryParams.addAll(apiClient.parameterToPair("format", request.getformat()));
221347

@@ -319,5 +445,6 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
319445
apiClient.executeAsync(call, localVarReturnType, callback);
320446
return call;
321447
}
448+
322449
}
323450

src/main/java/com/groupdocs/cloud/conversion/api/FileApi.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
210210
apiClient.executeAsync(call, callback);
211211
return call;
212212
}
213+
213214
/**
214215
* Build call for deleteFile
215216
* @param request The request model
@@ -333,6 +334,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
333334
apiClient.executeAsync(call, callback);
334335
return call;
335336
}
337+
336338
/**
337339
* Build call for downloadFile
338340
* @param request The request model
@@ -460,6 +462,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
460462
apiClient.executeAsync(call, localVarReturnType, callback);
461463
return call;
462464
}
465+
463466
/**
464467
* Build call for moveFile
465468
* @param request The request model
@@ -592,6 +595,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
592595
apiClient.executeAsync(call, callback);
593596
return call;
594597
}
598+
595599
/**
596600
* Build call for uploadFile
597601
* @param request The request model
@@ -724,5 +728,6 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
724728
apiClient.executeAsync(call, localVarReturnType, callback);
725729
return call;
726730
}
731+
727732
}
728733

src/main/java/com/groupdocs/cloud/conversion/api/FolderApi.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
208208
apiClient.executeAsync(call, callback);
209209
return call;
210210
}
211+
211212
/**
212213
* Build call for createFolder
213214
* @param request The request model
@@ -329,6 +330,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
329330
apiClient.executeAsync(call, callback);
330331
return call;
331332
}
333+
332334
/**
333335
* Build call for deleteFolder
334336
* @param request The request model
@@ -452,6 +454,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
452454
apiClient.executeAsync(call, callback);
453455
return call;
454456
}
457+
455458
/**
456459
* Build call for getFilesList
457460
* @param request The request model
@@ -577,6 +580,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
577580
apiClient.executeAsync(call, localVarReturnType, callback);
578581
return call;
579582
}
583+
580584
/**
581585
* Build call for moveFolder
582586
* @param request The request model
@@ -707,5 +711,6 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
707711
apiClient.executeAsync(call, callback);
708712
return call;
709713
}
714+
710715
}
711716

src/main/java/com/groupdocs/cloud/conversion/api/StorageApi.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
197197
apiClient.executeAsync(call, localVarReturnType, callback);
198198
return call;
199199
}
200+
200201
/**
201202
* Build call for getFileVersions
202203
* @param request The request model
@@ -322,6 +323,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
322323
apiClient.executeAsync(call, localVarReturnType, callback);
323324
return call;
324325
}
326+
325327
/**
326328
* Build call for objectExists
327329
* @param request The request model
@@ -449,6 +451,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
449451
apiClient.executeAsync(call, localVarReturnType, callback);
450452
return call;
451453
}
454+
452455
/**
453456
* Build call for storageExists
454457
* @param request The request model
@@ -572,5 +575,6 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
572575
apiClient.executeAsync(call, localVarReturnType, callback);
573576
return call;
574577
}
578+
575579
}
576580

src/main/java/com/groupdocs/cloud/conversion/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public ApiClient(Configuration configuration) {
9797
this.json = new JSON();
9898

9999
// Set default User-Agent.
100-
setUserAgent("java-sdk/19.3");
100+
setUserAgent("java-sdk/19.4");
101101

102102
// Set connection timeout
103103
setConnectTimeout(configuration.getTimeout());

src/main/java/com/groupdocs/cloud/conversion/model/BmpConvertOptions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
import java.util.Objects;
3131
import com.groupdocs.cloud.conversion.model.ImageConvertOptions;
32+
import com.groupdocs.cloud.conversion.model.WatermarkOptions;
3233
import io.swagger.annotations.ApiModel;
3334
import java.util.List;
3435

src/main/java/com/groupdocs/cloud/conversion/model/CgmConvertOptions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
import java.util.Objects;
3131
import com.groupdocs.cloud.conversion.model.ImageConvertOptions;
32+
import com.groupdocs.cloud.conversion.model.WatermarkOptions;
3233
import io.swagger.annotations.ApiModel;
3334
import java.util.List;
3435

0 commit comments

Comments
 (0)