diff --git a/README.md b/README.md index d28cf70..1e3898d 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,10 @@ Android Cloud SDK wraps Aspose.Cells Cloud API. The SDK enhances your Android ap - Leverage the power of named ranges. -## Feature & Enhancements in Version 22.5 +## Feature & Enhancements in Version 22.6 -- Add a new API for getting barcode description. +- Improve save as api. +- Improve clear objects api. ## Read & Write Spreadsheet Formats diff --git a/build.gradle b/build.gradle index 85d459d..5fc5262 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ group = 'com.aspose' -project.version = '22.5' +project.version = '22.6' buildscript { repositories { diff --git a/src/androidTest/java/com/aspose/cloud/cells/api/CellsClearObjectsApiTest.java b/src/androidTest/java/com/aspose/cloud/cells/api/CellsClearObjectsApiTest.java index 5128ee8..024f6ff 100644 --- a/src/androidTest/java/com/aspose/cloud/cells/api/CellsClearObjectsApiTest.java +++ b/src/androidTest/java/com/aspose/cloud/cells/api/CellsClearObjectsApiTest.java @@ -74,10 +74,29 @@ public void cellsPostClearObjectsApiTest() throws ApiException { HashMap fileMap = new HashMap(); fileMap.put(AssemblyTestXlsx ,CellsApiUtil.GetFileHolder(AssemblyTestXlsx) ); fileMap.put(DataSourceXlsx ,CellsApiUtil.GetFileHolder(DataSourceXlsx) ); - FilesResult response = api.postClearObjects(fileMap, "chart"); + FilesResult response = api.postClearObjects(fileMap, "chart",null,null); + + // TODO: test validations + } + + @Test + public void cellsPostClearObjectsApiOnlySheetTest() throws ApiException { + + HashMap fileMap = new HashMap(); + fileMap.put(AssemblyTestXlsx ,CellsApiUtil.GetFileHolder(AssemblyTestXlsx) ); + fileMap.put(BOOK1 ,CellsApiUtil.GetFileHolder(BOOK1) ); + FilesResult response = api.postClearObjects(fileMap, "chart","Sheet1",null); + + // TODO: test validations + } + @Test + public void cellsPostClearObjectsApiOutPdfTest() throws ApiException { + + HashMap fileMap = new HashMap(); + fileMap.put(AssemblyTestXlsx ,CellsApiUtil.GetFileHolder(AssemblyTestXlsx) ); + fileMap.put(BOOK1 ,CellsApiUtil.GetFileHolder(BOOK1) ); + FilesResult response = api.postClearObjects(fileMap, "chart","Sheet1","pdf"); // TODO: test validations } - - } diff --git a/src/androidTest/java/com/aspose/cloud/cells/api/CellsSaveAsApiTest.java b/src/androidTest/java/com/aspose/cloud/cells/api/CellsSaveAsApiTest.java index 052afad..10cdd2c 100644 --- a/src/androidTest/java/com/aspose/cloud/cells/api/CellsSaveAsApiTest.java +++ b/src/androidTest/java/com/aspose/cloud/cells/api/CellsSaveAsApiTest.java @@ -79,7 +79,7 @@ public void cellsSaveAsPostDocumentSaveAsTest() throws ApiException { Boolean isAutoFitColumns = false; String folder = TEMPFOLDER; CellsApiUtil.Upload(api, folder , name); - SaveResponse response = api.cellsSaveAsPostDocumentSaveAs(name, saveOptions, folder + "/"+ newfilename, isAutoFitRows, isAutoFitColumns, folder,null,null,null); + SaveResponse response = api.cellsSaveAsPostDocumentSaveAs(name, saveOptions, folder + "/"+ newfilename, isAutoFitRows, isAutoFitColumns, folder,null,null,null,true); // TODO: test validations } @@ -100,7 +100,7 @@ public void cellsSaveAsPostDocumentSaveAsMDTest() throws ApiException { Boolean isAutoFitColumns = false; String folder = TEMPFOLDER; CellsApiUtil.Upload(api, folder , name); - SaveResponse response = api.cellsSaveAsPostDocumentSaveAs(name, saveOptions, folder + "/"+ newfilename, isAutoFitRows, isAutoFitColumns, folder,null,null,null); + SaveResponse response = api.cellsSaveAsPostDocumentSaveAs(name, saveOptions, folder + "/"+ newfilename, isAutoFitRows, isAutoFitColumns, folder,null,null,null,true); // TODO: test validations } diff --git a/src/main/java/com/aspose/cloud/cells/api/CellsApi.java b/src/main/java/com/aspose/cloud/cells/api/CellsApi.java index 40000f6..5e5adb5 100644 --- a/src/main/java/com/aspose/cloud/cells/api/CellsApi.java +++ b/src/main/java/com/aspose/cloud/cells/api/CellsApi.java @@ -15455,23 +15455,6 @@ public CellsCloudResponse cellsPageSetupPostPageSetup(String name, String sheetN return resp.getData(); } - /** - * Update Page Setup information. - * - * @param name (required) - * @param sheetName (required) - * @param pageSetup (optional) - * @param folder (optional) - * @param storageName storage name. (optional) - * @return ApiResponse<CellsCloudResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse cellsPageSetupPostPageSetupWithHttpInfo(String name, String sheetName, PageSetup pageSetup, String folder, String storageName) throws ApiException { - com.squareup.okhttp.Call call = cellsPageSetupPostPageSetupValidateBeforeCall(name, sheetName, pageSetup, folder, storageName, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - /** * Update Page Setup information. (asynchronously) * @@ -15598,6 +15581,96 @@ private com.squareup.okhttp.Call cellsPictureGetExtractBarcodesValidateBeforeCal } + /** + * Get chart area border info. + * + * @param name Workbook name. (required) + * @param sheetName Worksheet name. (required) + * @param pictureIndex The picture index. (required) + * @param folder Workbook folder. (optional) + * @param storageName storage name. (optional) + * @return BarcodeResponseList + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public BarcodeResponseList cellsPictureGetExtractBarcodes(String name, String sheetName, Integer pictureIndex, String folder, String storageName) throws ApiException { + ApiResponse resp = cellsPictureGetExtractBarcodesWithHttpInfo(name, sheetName, pictureIndex, folder, storageName); + return resp.getData(); + } + + /** + * Get chart area border info. + * + * @param name Workbook name. (required) + * @param sheetName Worksheet name. (required) + * @param pictureIndex The picture index. (required) + * @param folder Workbook folder. (optional) + * @param storageName storage name. (optional) + * @return ApiResponse<BarcodeResponseList> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse cellsPictureGetExtractBarcodesWithHttpInfo(String name, String sheetName, Integer pictureIndex, String folder, String storageName) throws ApiException { + com.squareup.okhttp.Call call = cellsPictureGetExtractBarcodesValidateBeforeCall(name, sheetName, pictureIndex, folder, storageName, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get chart area border info. (asynchronously) + * + * @param name Workbook name. (required) + * @param sheetName Worksheet name. (required) + * @param pictureIndex The picture index. (required) + * @param folder Workbook folder. (optional) + * @param storageName storage name. (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call cellsPictureGetExtractBarcodesAsync(String name, String sheetName, Integer pictureIndex, String folder, String storageName, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = cellsPictureGetExtractBarcodesValidateBeforeCall(name, sheetName, pictureIndex, folder, storageName, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + + + /** + * Update Page Setup information. + * + * @param name (required) + * @param sheetName (required) + * @param pageSetup (optional) + * @param folder (optional) + * @param storageName storage name. (optional) + * @return ApiResponse<CellsCloudResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse cellsPageSetupPostPageSetupWithHttpInfo(String name, String sheetName, PageSetup pageSetup, String folder, String storageName) throws ApiException { + com.squareup.okhttp.Call call = cellsPageSetupPostPageSetupValidateBeforeCall(name, sheetName, pageSetup, folder, storageName, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + /** * Build call for cellsPicturesDeleteWorksheetPicture * @param name The workbook name. (required) @@ -27903,7 +27976,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public com.squareup.okhttp.Call cellsSaveAsPostDocumentSaveAsCall(String name, SaveOptions saveOptions, String newfilename, Boolean isAutoFitRows, Boolean isAutoFitColumns, String folder, String storageName, String outStorageName,HashMap extendedQueryParameters, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call cellsSaveAsPostDocumentSaveAsCall(String name, SaveOptions saveOptions, String newfilename, Boolean isAutoFitRows, Boolean isAutoFitColumns, String folder, String storageName, String outStorageName,HashMap extendedQueryParameters, boolean checkExcelRestriction, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = saveOptions; // create path and map variables @@ -27923,6 +27996,9 @@ public com.squareup.okhttp.Call cellsSaveAsPostDocumentSaveAsCall(String name, S localVarQueryParams.addAll(apiClient.parameterToPairs("", "storageName", storageName)); if (outStorageName != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "outStorageName", outStorageName)); + if (!checkExcelRestriction) + localVarQueryParams.addAll(apiClient.parameterToPairs("", "checkExcelRestriction", checkExcelRestriction)); + if(extendedQueryParameters!=null){ for (String key : extendedQueryParameters.keySet()) { localVarQueryParams.addAll(apiClient.parameterToPairs("", key, extendedQueryParameters.get(key))); @@ -27961,7 +28037,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call cellsSaveAsPostDocumentSaveAsValidateBeforeCall(String name, SaveOptions saveOptions, String newfilename, Boolean isAutoFitRows, Boolean isAutoFitColumns, String folder, String storageName, String outStorageName,HashMap extendedQueryParameters, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call cellsSaveAsPostDocumentSaveAsValidateBeforeCall(String name, SaveOptions saveOptions, String newfilename, Boolean isAutoFitRows, Boolean isAutoFitColumns, String folder, String storageName, String outStorageName,HashMap extendedQueryParameters, boolean checkExcelRestriction,final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'name' is set if (name == null) { @@ -27969,7 +28045,7 @@ private com.squareup.okhttp.Call cellsSaveAsPostDocumentSaveAsValidateBeforeCall } - com.squareup.okhttp.Call call = cellsSaveAsPostDocumentSaveAsCall(name, saveOptions, newfilename, isAutoFitRows, isAutoFitColumns, folder, storageName, outStorageName,extendedQueryParameters, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = cellsSaveAsPostDocumentSaveAsCall(name, saveOptions, newfilename, isAutoFitRows, isAutoFitColumns, folder, storageName, outStorageName,extendedQueryParameters,checkExcelRestriction, progressListener, progressRequestListener); return call; @@ -27992,8 +28068,8 @@ private com.squareup.okhttp.Call cellsSaveAsPostDocumentSaveAsValidateBeforeCall * @return SaveResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public SaveResponse cellsSaveAsPostDocumentSaveAs(String name, SaveOptions saveOptions, String newfilename, Boolean isAutoFitRows, Boolean isAutoFitColumns, String folder, String storageName, String outStorageName,HashMap extendedQueryParameters) throws ApiException { - ApiResponse resp = cellsSaveAsPostDocumentSaveAsWithHttpInfo(name, saveOptions, newfilename, isAutoFitRows, isAutoFitColumns, folder, storageName, outStorageName,extendedQueryParameters); + public SaveResponse cellsSaveAsPostDocumentSaveAs(String name, SaveOptions saveOptions, String newfilename, Boolean isAutoFitRows, Boolean isAutoFitColumns, String folder, String storageName, String outStorageName,HashMap extendedQueryParameters,boolean checkExcelRestriction) throws ApiException { + ApiResponse resp = cellsSaveAsPostDocumentSaveAsWithHttpInfo(name, saveOptions, newfilename, isAutoFitRows, isAutoFitColumns, folder, storageName, outStorageName,extendedQueryParameters,checkExcelRestriction); return resp.getData(); } @@ -28011,8 +28087,8 @@ public SaveResponse cellsSaveAsPostDocumentSaveAs(String name, SaveOptions saveO * @return ApiResponse<SaveResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse cellsSaveAsPostDocumentSaveAsWithHttpInfo(String name, SaveOptions saveOptions, String newfilename, Boolean isAutoFitRows, Boolean isAutoFitColumns, String folder, String storageName, String outStorageName,HashMap extendedQueryParameters) throws ApiException { - com.squareup.okhttp.Call call = cellsSaveAsPostDocumentSaveAsValidateBeforeCall(name, saveOptions, newfilename, isAutoFitRows, isAutoFitColumns, folder, storageName, outStorageName,extendedQueryParameters, null, null); + public ApiResponse cellsSaveAsPostDocumentSaveAsWithHttpInfo(String name, SaveOptions saveOptions, String newfilename, Boolean isAutoFitRows, Boolean isAutoFitColumns, String folder, String storageName, String outStorageName,HashMap extendedQueryParameters,boolean checkExcelRestriction) throws ApiException { + com.squareup.okhttp.Call call = cellsSaveAsPostDocumentSaveAsValidateBeforeCall(name, saveOptions, newfilename, isAutoFitRows, isAutoFitColumns, folder, storageName, outStorageName,extendedQueryParameters,checkExcelRestriction, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -28032,7 +28108,7 @@ public ApiResponse cellsSaveAsPostDocumentSaveAsWithHttpInfo(Strin * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public com.squareup.okhttp.Call cellsSaveAsPostDocumentSaveAsAsync(String name, SaveOptions saveOptions, String newfilename, Boolean isAutoFitRows, Boolean isAutoFitColumns, String folder, String storageName, String outStorageName,HashMap extendedQueryParameters, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call cellsSaveAsPostDocumentSaveAsAsync(String name, SaveOptions saveOptions, String newfilename, Boolean isAutoFitRows, Boolean isAutoFitColumns, String folder, String storageName, String outStorageName,HashMap extendedQueryParameters,boolean checkExcelRestriction, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -28053,7 +28129,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = cellsSaveAsPostDocumentSaveAsValidateBeforeCall(name, saveOptions, newfilename, isAutoFitRows, isAutoFitColumns, folder, storageName, outStorageName,extendedQueryParameters, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = cellsSaveAsPostDocumentSaveAsValidateBeforeCall(name, saveOptions, newfilename, isAutoFitRows, isAutoFitColumns, folder, storageName, outStorageName,extendedQueryParameters,checkExcelRestriction, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; diff --git a/src/main/java/com/aspose/cloud/cells/api/LightCellsApi.java b/src/main/java/com/aspose/cloud/cells/api/LightCellsApi.java index a100d78..07f2029 100644 --- a/src/main/java/com/aspose/cloud/cells/api/LightCellsApi.java +++ b/src/main/java/com/aspose/cloud/cells/api/LightCellsApi.java @@ -503,7 +503,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public com.squareup.okhttp.Call postClearObjectsCall(HashMap file, String objecttype, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call postClearObjectsCall(HashMap file, String objecttype, String sheetname, String outFormat, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -511,7 +511,11 @@ public com.squareup.okhttp.Call postClearObjectsCall(HashMap file, List localVarQueryParams = new ArrayList(); if (objecttype != null) - localVarQueryParams.addAll(apiClient.parameterToPairs("", "objecttype", objecttype)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "objecttype", objecttype)); + if (sheetname != null) + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sheetname", sheetname)); + if (outFormat != null) + localVarQueryParams.addAll(apiClient.parameterToPairs("", "outFormat", outFormat)); Map localVarHeaderParams = new HashMap(); @@ -552,7 +556,7 @@ public com.squareup.okhttp.Response intercept(Chain chain) throws IOException { } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call postClearObjectsValidateBeforeCall(HashMap file, String objecttype, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call postClearObjectsValidateBeforeCall(HashMap file, String objecttype, String sheetname, String outFormat, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'file' is set if (file == null) { @@ -565,7 +569,7 @@ private com.squareup.okhttp.Call postClearObjectsValidateBeforeCall(HashMap file, String objecttype) throws ApiException { - ApiResponse resp = postClearObjectsWithHttpInfo(file, objecttype); + public FilesResult postClearObjects(HashMap file, String objecttype, String sheetname, String outFormat) throws ApiException { + ApiResponse resp = postClearObjectsWithHttpInfo(file, objecttype, sheetname, outFormat); return resp.getData(); } @@ -595,8 +599,8 @@ public FilesResult postClearObjects(HashMap file, String objecttype * @return ApiResponse<FilesResult> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse postClearObjectsWithHttpInfo(HashMap file, String objecttype) throws ApiException { - com.squareup.okhttp.Call call = postClearObjectsValidateBeforeCall(file, objecttype, null, null); + public ApiResponse postClearObjectsWithHttpInfo(HashMap file, String objecttype, String sheetname, String outFormat) throws ApiException { + com.squareup.okhttp.Call call = postClearObjectsValidateBeforeCall(file, objecttype, sheetname, outFormat, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -610,7 +614,7 @@ public ApiResponse postClearObjectsWithHttpInfo(HashMap file, String objecttype, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call postClearObjectsAsync(HashMap file, String objecttype, String sheetname, String outFormat, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -631,7 +635,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = postClearObjectsValidateBeforeCall(file, objecttype, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = postClearObjectsValidateBeforeCall(file, objecttype, sheetname, outFormat, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call;