Skip to content

Commit 18b4882

Browse files
committed
ISSUE-CELLSCLOUD-13605: Build Aspose.Cells Cloud SDK 25.12.
1 parent 350c647 commit 18b4882

File tree

3 files changed

+351
-3
lines changed

3 files changed

+351
-3
lines changed

src/main/java/com/aspose/cloud/cells/api/CellsApi.java

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public CellsApi(String clientId, String clientSecret) throws ApiException {
5454
String accesstoken = apiClient.getAccessToken("client_credentials", clientId, clientSecret, "v3.0");
5555
apiClient.addDefaultHeader("Authorization", "Bearer " + accesstoken);
5656
apiClient.addDefaultHeader("x-aspose-client", "java sdk");
57-
apiClient.addDefaultHeader("x-aspose-client-version", "25.11");
57+
apiClient.addDefaultHeader("x-aspose-client-version", "25.12");
5858
this.apiClient = apiClient;
5959
}
6060

@@ -70,7 +70,7 @@ public CellsApi(String clientId, String clientSecret, String Version, String bas
7070
apiClient.addDefaultHeader("Authorization", "Bearer " + accesstoken);
7171
}
7272
apiClient.addDefaultHeader("x-aspose-client", "java sdk");
73-
apiClient.addDefaultHeader("x-aspose-client-version", "25.11");
73+
apiClient.addDefaultHeader("x-aspose-client-version", "25.12");
7474
this.apiClient = apiClient;
7575
}
7676

@@ -2019,6 +2019,62 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
20192019
}
20202020

20212021

2022+
@SuppressWarnings("rawtypes")
2023+
private com.squareup.okhttp.Call splitTableValidateBeforeCall(SplitTableRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
2024+
return request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true);
2025+
}
2026+
public void splitTable(SplitTableRequest request, String LocalOutPath) throws ApiException , IOException {
2027+
FileUtil.copyFile(splitTable(request), new File(LocalOutPath));
2028+
}
2029+
public File splitTable(SplitTableRequest request) throws ApiException, IOException {
2030+
try {
2031+
ApiResponse< File > resp = splitTableWithHttpInfo(request);
2032+
return resp.getData();
2033+
}
2034+
catch (ApiException ex) {
2035+
if (ex.getCode() == apiClient.getNotAuthCode()) {
2036+
apiClient.requestToken();
2037+
ApiResponse< File > resp = splitTableWithHttpInfo(request);
2038+
return resp.getData();
2039+
}
2040+
throw ex;
2041+
}
2042+
}
2043+
2044+
private ApiResponse< File > splitTableWithHttpInfo(SplitTableRequest request) throws ApiException, IOException {
2045+
com.squareup.okhttp.Call call = splitTableValidateBeforeCall(request, null, null);
2046+
Type localVarReturnType = new TypeToken< File >(){}.getType();
2047+
return apiClient.execute(call, localVarReturnType);
2048+
}
2049+
2050+
public com.squareup.okhttp.Call splitTableAsync( SplitTableRequest request, final ApiCallback< HashMap<String,File> > callback) throws ApiException, IOException {
2051+
2052+
ProgressResponseBody.ProgressListener progressListener = null;
2053+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
2054+
2055+
if (callback != null) {
2056+
progressListener = new ProgressResponseBody.ProgressListener() {
2057+
@Override
2058+
public void update(long bytesRead, long contentLength, boolean done) {
2059+
callback.onDownloadProgress(bytesRead, contentLength, done);
2060+
}
2061+
};
2062+
2063+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
2064+
@Override
2065+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
2066+
callback.onUploadProgress(bytesWritten, contentLength, done);
2067+
}
2068+
};
2069+
}
2070+
2071+
com.squareup.okhttp.Call call = splitTableValidateBeforeCall(request, progressListener, progressRequestListener);
2072+
Type localVarReturnType = new TypeToken< HashMap<String,File> >(){}.getType();
2073+
apiClient.executeAsync(call, localVarReturnType, callback);
2074+
return call;
2075+
}
2076+
2077+
20222078
@SuppressWarnings("rawtypes")
20232079
private com.squareup.okhttp.Call splitRemoteSpreadsheetValidateBeforeCall(SplitRemoteSpreadsheetRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
20242080
return request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true);

src/main/java/com/aspose/cloud/cells/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public ApiClient() {
188188
this.lenientDatetimeFormat = true;
189189

190190
// Set default User-Agent.
191-
setUserAgent("CellsCloud-SDK/25.11/java");
191+
setUserAgent("CellsCloud-SDK/25.12/java");
192192

193193
// Setup authentications (key: authentication name, value:
194194
// authentication).
Lines changed: 292 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,292 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="SplitTableRequest.java">
4+
* Copyright (c) 2025 Aspose.Cells Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
package com.aspose.cloud.cells.request;
28+
import com.aspose.cloud.cells.client.*;
29+
import com.aspose.cloud.cells.model.*;
30+
import com.squareup.okhttp.*;
31+
import java.io.*;
32+
import java.lang.reflect.Type;
33+
import java.util.*;
34+
35+
public class SplitTableRequest implements IRequestModel {
36+
private HashMap<String,String> extendQueryParameterMap;
37+
public HashMap<String,String> getExtendQueryParameterMap() {
38+
return this.extendQueryParameterMap;
39+
}
40+
41+
public void setExtendQueryParameterMap( HashMap<String,String> extendQueryParameterMap) {
42+
this.extendQueryParameterMap = extendQueryParameterMap;
43+
}
44+
private String worksheet;
45+
private String tableName;
46+
private String splitColumnName;
47+
private Boolean saveSplitColumn;
48+
private Boolean toNewWorkbook;
49+
private Boolean toMultipleFiles;
50+
private String outPath;
51+
private String outStorageName;
52+
private String fontsLocation;
53+
private String region;
54+
private String password;
55+
56+
57+
58+
private String spreadsheet;
59+
public SplitTableRequest()
60+
{
61+
}
62+
public SplitTableRequest( String spreadsheet , String worksheet , String tableName , String splitColumnName , Boolean saveSplitColumn , Boolean toNewWorkbook , Boolean toMultipleFiles , String outPath , String outStorageName , String fontsLocation , String region , String password ) {
63+
this.spreadsheet = spreadsheet;
64+
this.worksheet = worksheet;
65+
this.tableName = tableName;
66+
this.splitColumnName = splitColumnName;
67+
this.saveSplitColumn = saveSplitColumn;
68+
this.toNewWorkbook = toNewWorkbook;
69+
this.toMultipleFiles = toMultipleFiles;
70+
this.outPath = outPath;
71+
this.outStorageName = outStorageName;
72+
this.fontsLocation = fontsLocation;
73+
this.region = region;
74+
this.password = password;
75+
}
76+
77+
public String getWorksheet() {
78+
return this.worksheet;
79+
}
80+
81+
public void setWorksheet(String worksheet) {
82+
this.worksheet = worksheet;
83+
}
84+
85+
86+
public String getTableName() {
87+
return this.tableName;
88+
}
89+
90+
public void setTableName(String tableName) {
91+
this.tableName = tableName;
92+
}
93+
94+
95+
public String getSplitColumnName() {
96+
return this.splitColumnName;
97+
}
98+
99+
public void setSplitColumnName(String splitColumnName) {
100+
this.splitColumnName = splitColumnName;
101+
}
102+
103+
104+
public Boolean getSaveSplitColumn() {
105+
return this.saveSplitColumn;
106+
}
107+
108+
public void setSaveSplitColumn(Boolean saveSplitColumn) {
109+
this.saveSplitColumn = saveSplitColumn;
110+
}
111+
112+
113+
public Boolean getToNewWorkbook() {
114+
return this.toNewWorkbook;
115+
}
116+
117+
public void setToNewWorkbook(Boolean toNewWorkbook) {
118+
this.toNewWorkbook = toNewWorkbook;
119+
}
120+
121+
122+
public Boolean getToMultipleFiles() {
123+
return this.toMultipleFiles;
124+
}
125+
126+
public void setToMultipleFiles(Boolean toMultipleFiles) {
127+
this.toMultipleFiles = toMultipleFiles;
128+
}
129+
130+
131+
public String getOutPath() {
132+
return this.outPath;
133+
}
134+
135+
public void setOutPath(String outPath) {
136+
this.outPath = outPath;
137+
}
138+
139+
140+
public String getOutStorageName() {
141+
return this.outStorageName;
142+
}
143+
144+
public void setOutStorageName(String outStorageName) {
145+
this.outStorageName = outStorageName;
146+
}
147+
148+
149+
public String getFontsLocation() {
150+
return this.fontsLocation;
151+
}
152+
153+
public void setFontsLocation(String fontsLocation) {
154+
this.fontsLocation = fontsLocation;
155+
}
156+
157+
158+
public String getRegion() {
159+
return this.region;
160+
}
161+
162+
public void setRegion(String region) {
163+
this.region = region;
164+
}
165+
166+
167+
public String getPassword() {
168+
return this.password;
169+
}
170+
171+
public void setPassword(String password) {
172+
this.password = password;
173+
}
174+
175+
176+
177+
public String getSpreadsheet() {
178+
return this.spreadsheet;
179+
}
180+
public void setSpreadsheet(String spreadsheet) {
181+
this.spreadsheet = spreadsheet;
182+
}
183+
184+
185+
@Override
186+
public Call buildHttpRequest(ApiClient apiClient, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener, Boolean addAuthHeaders) throws ApiException {
187+
188+
189+
if ( getSpreadsheet() == null ) {
190+
throw new ApiException("Missing the required parameter 'Spreadsheet' when calling SplitTable");
191+
}
192+
193+
if (getWorksheet() == null) {
194+
throw new ApiException("Missing the required parameter 'Worksheet' when calling SplitTable");
195+
}
196+
197+
if (getTableName() == null) {
198+
throw new ApiException("Missing the required parameter 'TableName' when calling SplitTable");
199+
}
200+
201+
if (getSplitColumnName() == null) {
202+
throw new ApiException("Missing the required parameter 'SplitColumnName' when calling SplitTable");
203+
}
204+
205+
if (getSaveSplitColumn() == null) {
206+
throw new ApiException("Missing the required parameter 'SaveSplitColumn' when calling SplitTable");
207+
}
208+
209+
if (getToNewWorkbook() == null) {
210+
throw new ApiException("Missing the required parameter 'ToNewWorkbook' when calling SplitTable");
211+
}
212+
213+
if (getToMultipleFiles() == null) {
214+
throw new ApiException("Missing the required parameter 'ToMultipleFiles' when calling SplitTable");
215+
}
216+
String localVarPath = "v4.0/cells/split/table";
217+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
218+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
219+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
220+
if (getWorksheet() != null){
221+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "worksheet", getWorksheet()));
222+
}
223+
if (getTableName() != null){
224+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "tableName", getTableName()));
225+
}
226+
if (getSplitColumnName() != null){
227+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "splitColumnName", getSplitColumnName()));
228+
}
229+
if (getSaveSplitColumn() != null){
230+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "saveSplitColumn", getSaveSplitColumn()));
231+
}
232+
if (getToNewWorkbook() != null){
233+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "toNewWorkbook", getToNewWorkbook()));
234+
}
235+
if (getToMultipleFiles() != null){
236+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "toMultipleFiles", getToMultipleFiles()));
237+
}
238+
if (getOutPath() != null){
239+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "outPath", getOutPath()));
240+
}
241+
if (getOutStorageName() != null){
242+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "outStorageName", getOutStorageName()));
243+
}
244+
if (getFontsLocation() != null){
245+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "fontsLocation", getFontsLocation()));
246+
}
247+
if (getRegion() != null){
248+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "region", getRegion()));
249+
}
250+
if (getPassword() != null){
251+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", getPassword()));
252+
}
253+
if(this.extendQueryParameterMap !=null){
254+
for (String key :this.extendQueryParameterMap.keySet()) {
255+
localVarQueryParams.addAll(apiClient.parameterToPairs("", key, this.extendQueryParameterMap.get(key)));
256+
}
257+
}
258+
259+
File SpreadsheetToUpload = new File(getSpreadsheet());
260+
if (SpreadsheetToUpload.exists()) {
261+
localVarFormParams.put(SpreadsheetToUpload.getName(), SpreadsheetToUpload);
262+
}
263+
264+
Object localVarPostBody = null;
265+
final String[] localVarAccepts = {
266+
"application/json"
267+
};
268+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
269+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
270+
271+
final String[] localVarContentTypes = { "multipart/form-data" };
272+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
273+
localVarHeaderParams.put("Content-Type", localVarContentType);
274+
275+
if(progressListener != null) {
276+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
277+
@Override
278+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
279+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
280+
return originalResponse.newBuilder()
281+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
282+
.build();
283+
}
284+
});
285+
}
286+
287+
String[] localVarAuthNames = new String[] { };
288+
return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
289+
290+
}
291+
}
292+

0 commit comments

Comments
 (0)