> getHeaders() {
67 | return headers;
68 | }
69 |
70 | public T getData() {
71 | return data;
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/StringUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud;
29 |
30 | public class StringUtil {
31 | /**
32 | * Check if the given array contains the given value (with case-insensitive comparison).
33 | *
34 | * @param array The array
35 | * @param value The value to search
36 | * @return true if the array contains the value
37 | */
38 | public static boolean containsIgnoreCase(String[] array, String value) {
39 | for (String str : array) {
40 | if (value == null && str == null) return true;
41 | if (value != null && value.equalsIgnoreCase(str)) return true;
42 | }
43 | return false;
44 | }
45 |
46 | /**
47 | * Join an array of strings with the given separator.
48 | *
49 | * Note: This might be replaced by utility method from commons-lang or guava someday
50 | * if one of those libraries is added as dependency.
51 | *
52 | *
53 | * @param array The array of strings
54 | * @param separator The separator
55 | * @return the resulting string
56 | */
57 | public static String join(String[] array, String separator) {
58 | int len = array.length;
59 | if (len == 0) return "";
60 |
61 | StringBuilder out = new StringBuilder();
62 | out.append(array[0]);
63 | for (int i = 1; i < len; i++) {
64 | out.append(separator).append(array[i]);
65 | }
66 | return out.toString();
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/src/test/java/com/aspose/words/cloud/api/document/TestPasswordEncryption.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.api.document;
29 |
30 | import com.aspose.words.cloud.*;
31 | import com.aspose.words.cloud.model.*;
32 | import com.aspose.words.cloud.model.requests.*;
33 | import com.aspose.words.cloud.model.responses.*;
34 | import junit.framework.TestCase;
35 | import org.junit.Test;
36 | import org.threeten.bp.*;
37 | import java.io.IOException;
38 | import jakarta.mail.MessagingException;
39 | import java.nio.file.*;
40 | import java.util.*;
41 |
42 | /*
43 | * Example of how to handle an encrypted document.
44 | */
45 | public class TestPasswordEncryption extends TestCase
46 | {
47 | private String remoteDataFolder = TestInitializer.RemoteTestFolder + "/DocumentActions/PasswordEncryption";
48 | private String localFile = "Common/test_multi_pages.docx";
49 |
50 |
51 | @Override
52 | protected void setUp() throws Exception {
53 | super.setUp();
54 | TestInitializer.Initialize();
55 | }
56 |
57 | /*
58 | * Test for getting a public key for password encryption.
59 | */
60 | @Test
61 | public void testGetPublicKey() throws ApiException, MessagingException, IOException
62 | {
63 | GetPublicKeyRequest request = new GetPublicKeyRequest(
64 | );
65 |
66 | PublicKeyResponse result = TestInitializer.wordsApi.getPublicKey(request);
67 | assertNotNull(result);
68 | assertNotNull(result.getExponent());
69 | assertNotNull(result.getModulus());
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/src/test/java/com/aspose/words/cloud/api/font/TestFont.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.api.font;
29 |
30 | import com.aspose.words.cloud.*;
31 | import com.aspose.words.cloud.model.*;
32 | import com.aspose.words.cloud.model.requests.*;
33 | import com.aspose.words.cloud.model.responses.*;
34 | import junit.framework.TestCase;
35 | import org.junit.Test;
36 | import org.threeten.bp.*;
37 | import java.io.IOException;
38 | import jakarta.mail.MessagingException;
39 | import java.nio.file.*;
40 | import java.util.*;
41 |
42 | /*
43 | * Example of how to work with font.
44 | */
45 | public class TestFont extends TestCase
46 | {
47 |
48 | @Override
49 | protected void setUp() throws Exception {
50 | super.setUp();
51 | TestInitializer.Initialize();
52 | }
53 |
54 | /*
55 | * Test for reseting cache.
56 | */
57 | @Test
58 | public void testResetCache() throws ApiException, MessagingException, IOException
59 | {
60 | ResetCacheRequest request = new ResetCacheRequest(
61 | );
62 |
63 | TestInitializer.wordsApi.resetCache(request);
64 | }
65 |
66 | /*
67 | * Test for GetAvailableFonts resource.
68 | */
69 | @Test
70 | public void testGetAvailableFonts() throws ApiException, MessagingException, IOException
71 | {
72 | GetAvailableFontsRequest request = new GetAvailableFontsRequest(
73 | null
74 | );
75 |
76 | AvailableFontsResponse result = TestInitializer.wordsApi.getAvailableFonts(request);
77 | assertNotNull(result);
78 | assertNotNull(result.getSystemFonts());
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/Jenkinsfile:
--------------------------------------------------------------------------------
1 | properties([
2 | gitLabConnection('gitlab'),
3 | [$class: 'ParametersDefinitionProperty',
4 | parameterDefinitions: [
5 | [$class: 'StringParameterDefinition', name: 'branch', defaultValue: 'master', description: 'the branch to build'],
6 | [$class: 'StringParameterDefinition', name: 'apiUrl', defaultValue: 'https://api-qa.aspose.cloud', description: 'api url'],
7 | [$class: 'BooleanParameterDefinition', name: 'debugMode', defaultValue: 'false', description: 'debug mode'],
8 | [$class: 'BooleanParameterDefinition', name: 'ignoreCiSkip', defaultValue: false, description: 'ignore CI Skip'],
9 | [$class: 'StringParameterDefinition', name: 'credentialsId', defaultValue: '6839cbe8-39fa-40c0-86ce-90706f0bae5d', description: 'credentials id'],
10 | ]
11 | ]
12 | ])
13 |
14 | def needToBuild = false
15 |
16 | def runtests(directory)
17 | {
18 | dir(directory){
19 | try {
20 | stage('checkout'){
21 | checkout([$class: 'GitSCM', branches: [[name: params.branch]], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '361885ba-9425-4230-950e-0af201d90547', url: 'https://git.auckland.dynabic.com/words-cloud/words-cloud-java.git']]])
22 |
23 | sh 'git show -s HEAD > gitMessage'
24 | def commitMessage = readFile('gitMessage').trim()
25 | echo commitMessage
26 | needToBuild = params.ignoreCiSkip || !commitMessage.contains('[ci skip]')
27 | sh 'git clean -fdx'
28 |
29 | if (needToBuild) {
30 | withCredentials([usernamePassword(credentialsId: params.credentialsId, passwordVariable: 'ClientSecret', usernameVariable: 'ClientId')]) {
31 | sh 'mkdir -p Settings'
32 | sh 'echo "{\\"ClientId\\": \\"$ClientId\\",\\"ClientSecret\\": \\"$ClientSecret\\", \\"BaseUrl\\": \\"$apiUrl\\", \\"Debug\\" : \\"$debugMode\\" }}" > Settings/servercreds.json'
33 | }
34 | }
35 | }
36 |
37 | if (needToBuild) {
38 | docker.image('maven').inside{
39 | stage('build'){
40 | sh "mvn compile"
41 | }
42 |
43 | stage('tests'){
44 | try{
45 | sh "mvn test"
46 | } finally{
47 | junit 'target/surefire-reports/*.xml'
48 | }
49 | }
50 |
51 | stage('bdd-tests'){
52 |
53 | }
54 |
55 | stage('clean-compiled'){
56 | sh "rm -rf %s"
57 | }
58 | }
59 | }
60 | } finally {
61 | deleteDir()
62 | }
63 | }
64 | }
65 |
66 | node('words-linux') {
67 | cleanWs()
68 | if (!params.branch.contains("release")) {
69 | runtests("java-sdk")
70 | }
71 |
72 | }
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/ApiCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud;
29 |
30 | import java.util.Map;
31 | import java.util.List;
32 |
33 | /**
34 | * Callback for asynchronous API call.
35 | *
36 | * @param The return type
37 | */
38 | public interface ApiCallback {
39 | /**
40 | * This is called when the API call fails.
41 | *
42 | * @param e The exception causing the failure
43 | * @param statusCode Status code of the response if available, otherwise it would be 0
44 | * @param responseHeaders Headers of the response if available, otherwise it would be null
45 | */
46 | void onFailure(ApiException e, int statusCode, Map> responseHeaders);
47 |
48 | /**
49 | * This is called when the API call succeeded.
50 | *
51 | * @param result The result deserialized from response
52 | * @param statusCode Status code of the response
53 | * @param responseHeaders Headers of the response
54 | */
55 | void onSuccess(T result, int statusCode, Map> responseHeaders);
56 |
57 | /**
58 | * This is called when the API upload processing.
59 | *
60 | * @param bytesWritten bytes Written
61 | * @param contentLength content length of request body
62 | * @param done write end
63 | */
64 | void onUploadProgress(long bytesWritten, long contentLength, boolean done);
65 |
66 | /**
67 | * This is called when the API downlond processing.
68 | *
69 | * @param bytesRead bytes Read
70 | * @param contentLength content lenngth of the response
71 | * @param done Read end
72 | */
73 | void onDownloadProgress(long bytesRead, long contentLength, boolean done);
74 | }
75 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/auth/ApiKeyAuth.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.auth;
29 |
30 | import com.aspose.words.cloud.Pair;
31 |
32 | import java.util.Map;
33 | import java.util.List;
34 |
35 |
36 | public class ApiKeyAuth implements Authentication {
37 | private final String location;
38 | private final String paramName;
39 |
40 | private String clientSecret;
41 | private String clientSecretPrefix;
42 |
43 | public ApiKeyAuth(String location, String paramName) {
44 | this.location = location;
45 | this.paramName = paramName;
46 | }
47 |
48 | public String getLocation() {
49 | return location;
50 | }
51 |
52 | public String getParamName() {
53 | return paramName;
54 | }
55 |
56 | public String getClientSecret() {
57 | return clientSecret;
58 | }
59 |
60 | public void setClientSecret(String clientSecret) {
61 | this.clientSecret = clientSecret;
62 | }
63 |
64 | public String getClientSecretPrefix() {
65 | return clientSecretPrefix;
66 | }
67 |
68 | public void setClientSecretPrefix(String clientSecretPrefix) {
69 | this.clientSecretPrefix = clientSecretPrefix;
70 | }
71 |
72 | @Override
73 | public void applyToParams(List queryParams, Map headerParams) {
74 | if (clientSecret == null) {
75 | return;
76 | }
77 | String value;
78 | if (clientSecretPrefix != null) {
79 | value = clientSecretPrefix + " " + clientSecret;
80 | }
81 | else {
82 | value = clientSecret;
83 | }
84 | if ("query".equals(location)) {
85 | queryParams.add(new Pair(paramName, value));
86 | }
87 | else if ("header".equals(location)) {
88 | headerParams.put(paramName, value);
89 | }
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/SaveAsOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for saveAsOnline operation.
35 | */
36 | public class SaveAsOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a save result.
39 | */
40 | private SaveResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the SaveAsOnlineResponse class.
49 | */
50 | public SaveAsOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the SaveAsOnlineResponse class.
57 | */
58 | public SaveAsOnlineResponse(SaveResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a save result.
65 | */
66 | public SaveResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a save result.
72 | */
73 | public void setModel(SaveResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/SaveAsTiffOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for saveAsTiffOnline operation.
35 | */
36 | public class SaveAsTiffOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a save result.
39 | */
40 | private SaveResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the SaveAsTiffOnlineResponse class.
49 | */
50 | public SaveAsTiffOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the SaveAsTiffOnlineResponse class.
57 | */
58 | public SaveAsTiffOnlineResponse(SaveResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a save result.
65 | */
66 | public SaveResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a save result.
72 | */
73 | public void setModel(SaveResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/LoadWebDocumentOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for loadWebDocumentOnline operation.
35 | */
36 | public class LoadWebDocumentOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a save result.
39 | */
40 | private SaveResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the LoadWebDocumentOnlineResponse class.
49 | */
50 | public LoadWebDocumentOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the LoadWebDocumentOnlineResponse class.
57 | */
58 | public LoadWebDocumentOnlineResponse(SaveResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a save result.
65 | */
66 | public SaveResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a save result.
72 | */
73 | public void setModel(SaveResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/RemoveRangeOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for removeRangeOnline operation.
35 | */
36 | public class RemoveRangeOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a document description.
39 | */
40 | private DocumentResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the RemoveRangeOnlineResponse class.
49 | */
50 | public RemoveRangeOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the RemoveRangeOnlineResponse class.
57 | */
58 | public RemoveRangeOnlineResponse(DocumentResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a document description.
65 | */
66 | public DocumentResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a document description.
72 | */
73 | public void setModel(DocumentResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/SaveAsRangeOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for saveAsRangeOnline operation.
35 | */
36 | public class SaveAsRangeOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a document description.
39 | */
40 | private DocumentResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the SaveAsRangeOnlineResponse class.
49 | */
50 | public SaveAsRangeOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the SaveAsRangeOnlineResponse class.
57 | */
58 | public SaveAsRangeOnlineResponse(DocumentResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a document description.
65 | */
66 | public DocumentResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a document description.
72 | */
73 | public void setModel(DocumentResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/UpdateFieldsOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for updateFieldsOnline operation.
35 | */
36 | public class UpdateFieldsOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a document description.
39 | */
40 | private DocumentResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the UpdateFieldsOnlineResponse class.
49 | */
50 | public UpdateFieldsOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the UpdateFieldsOnlineResponse class.
57 | */
58 | public UpdateFieldsOnlineResponse(DocumentResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a document description.
65 | */
66 | public DocumentResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a document description.
72 | */
73 | public void setModel(DocumentResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/AppendDocumentOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for appendDocumentOnline operation.
35 | */
36 | public class AppendDocumentOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a document description.
39 | */
40 | private DocumentResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the AppendDocumentOnlineResponse class.
49 | */
50 | public AppendDocumentOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the AppendDocumentOnlineResponse class.
57 | */
58 | public AppendDocumentOnlineResponse(DocumentResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a document description.
65 | */
66 | public DocumentResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a document description.
72 | */
73 | public void setModel(DocumentResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/requests/BatchPartRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.requests;
29 |
30 | import com.aspose.words.cloud.*;
31 | import com.squareup.okhttp.Request;
32 |
33 | import java.io.*;
34 |
35 | /*
36 | * A batch part request wrapper to add batch part features.
37 | */
38 | public class BatchPartRequest {
39 | private RequestIfc request;
40 |
41 | private String requestId;
42 |
43 | private String parentRequestId;
44 |
45 | /*
46 | * Initializes a new instance of the BatchPartRequest class.
47 | *
48 | * @param request RequestIfc inner request
49 | */
50 | public BatchPartRequest(RequestIfc request) {
51 | this.request = request;
52 | this.requestId = java.util.UUID.randomUUID().toString();
53 | this.parentRequestId = null;
54 | }
55 |
56 | /*
57 | * Get request object.
58 | */
59 | public RequestIfc getRequest() {
60 | return this.request;
61 | }
62 |
63 | /*
64 | * Get request ID.
65 | */
66 | public String getRequestId() {
67 | return this.requestId;
68 | }
69 |
70 | /*
71 | * Get parent request ID.
72 | */
73 | public String getParentRequestId() {
74 | return this.parentRequestId;
75 | }
76 |
77 | /*
78 | * Set parent request.
79 | *
80 | * @param parentRequest BatchPartRequest a parent request.
81 | */
82 | public BatchPartRequest dependsOn(BatchPartRequest parentRequest) {
83 | this.parentRequestId = parentRequest.getRequestId();
84 | return this;
85 | }
86 |
87 | /*
88 | * Use a binary response of the request as an input for another request.
89 | */
90 | public byte[] resultOf() throws UnsupportedEncodingException {
91 | return ("resultOf(" + this.requestId + ")").getBytes("UTF8");
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/CompressDocumentOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for compressDocumentOnline operation.
35 | */
36 | public class CompressDocumentOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response of compressed document.
39 | */
40 | private CompressResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the CompressDocumentOnlineResponse class.
49 | */
50 | public CompressDocumentOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the CompressDocumentOnlineResponse class.
57 | */
58 | public CompressDocumentOnlineResponse(CompressResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response of compressed document.
65 | */
66 | public CompressResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response of compressed document.
72 | */
73 | public void setModel(CompressResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/CompareDocumentOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for compareDocumentOnline operation.
35 | */
36 | public class CompareDocumentOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a document description.
39 | */
40 | private DocumentResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the CompareDocumentOnlineResponse class.
49 | */
50 | public CompareDocumentOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the CompareDocumentOnlineResponse class.
57 | */
58 | public CompareDocumentOnlineResponse(DocumentResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a document description.
65 | */
66 | public DocumentResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a document description.
72 | */
73 | public void setModel(DocumentResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/DeleteWatermarkOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for deleteWatermarkOnline operation.
35 | */
36 | public class DeleteWatermarkOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a document description.
39 | */
40 | private DocumentResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the DeleteWatermarkOnlineResponse class.
49 | */
50 | public DeleteWatermarkOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the DeleteWatermarkOnlineResponse class.
57 | */
58 | public DeleteWatermarkOnlineResponse(DocumentResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a document description.
65 | */
66 | public DocumentResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a document description.
72 | */
73 | public void setModel(DocumentResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/InsertWatermarkOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for insertWatermarkOnline operation.
35 | */
36 | public class InsertWatermarkOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a document description.
39 | */
40 | private DocumentResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the InsertWatermarkOnlineResponse class.
49 | */
50 | public InsertWatermarkOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the InsertWatermarkOnlineResponse class.
57 | */
58 | public InsertWatermarkOnlineResponse(DocumentResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a document description.
65 | */
66 | public DocumentResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a document description.
72 | */
73 | public void setModel(DocumentResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/ReplaceWithTextOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for replaceWithTextOnline operation.
35 | */
36 | public class ReplaceWithTextOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a document description.
39 | */
40 | private DocumentResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the ReplaceWithTextOnlineResponse class.
49 | */
50 | public ReplaceWithTextOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the ReplaceWithTextOnlineResponse class.
57 | */
58 | public ReplaceWithTextOnlineResponse(DocumentResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a document description.
65 | */
66 | public DocumentResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a document description.
72 | */
73 | public void setModel(DocumentResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/InsertPageNumbersOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for insertPageNumbersOnline operation.
35 | */
36 | public class InsertPageNumbersOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a document description.
39 | */
40 | private DocumentResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the InsertPageNumbersOnlineResponse class.
49 | */
50 | public InsertPageNumbersOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the InsertPageNumbersOnlineResponse class.
57 | */
58 | public InsertPageNumbersOnlineResponse(DocumentResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a document description.
65 | */
66 | public DocumentResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a document description.
72 | */
73 | public void setModel(DocumentResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/InsertDrawingObjectOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for insertDrawingObjectOnline operation.
35 | */
36 | public class InsertDrawingObjectOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a DrawingObject.
39 | */
40 | private DrawingObjectResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the InsertDrawingObjectOnlineResponse class.
49 | */
50 | public InsertDrawingObjectOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the InsertDrawingObjectOnlineResponse class.
57 | */
58 | public InsertDrawingObjectOnlineResponse(DrawingObjectResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a DrawingObject.
65 | */
66 | public DrawingObjectResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a DrawingObject.
72 | */
73 | public void setModel(DrawingObjectResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/InsertWatermarkTextOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for insertWatermarkTextOnline operation.
35 | */
36 | public class InsertWatermarkTextOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a document description.
39 | */
40 | private DocumentResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the InsertWatermarkTextOnlineResponse class.
49 | */
50 | public InsertWatermarkTextOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the InsertWatermarkTextOnlineResponse class.
57 | */
58 | public InsertWatermarkTextOnlineResponse(DocumentResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a document description.
65 | */
66 | public DocumentResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a document description.
72 | */
73 | public void setModel(DocumentResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/UpdateDrawingObjectOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for updateDrawingObjectOnline operation.
35 | */
36 | public class UpdateDrawingObjectOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a DrawingObject.
39 | */
40 | private DrawingObjectResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the UpdateDrawingObjectOnlineResponse class.
49 | */
50 | public UpdateDrawingObjectOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the UpdateDrawingObjectOnlineResponse class.
57 | */
58 | public UpdateDrawingObjectOnlineResponse(DrawingObjectResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a DrawingObject.
65 | */
66 | public DrawingObjectResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a DrawingObject.
72 | */
73 | public void setModel(DrawingObjectResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/InsertWatermarkImageOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for insertWatermarkImageOnline operation.
35 | */
36 | public class InsertWatermarkImageOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a document description.
39 | */
40 | private DocumentResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the InsertWatermarkImageOnlineResponse class.
49 | */
50 | public InsertWatermarkImageOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the InsertWatermarkImageOnlineResponse class.
57 | */
58 | public InsertWatermarkImageOnlineResponse(DocumentResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a document description.
65 | */
66 | public DocumentResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a document description.
72 | */
73 | public void setModel(DocumentResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/ApplyStyleToDocumentElementOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for applyStyleToDocumentElementOnline operation.
35 | */
36 | public class ApplyStyleToDocumentElementOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The base class for all responses.
39 | */
40 | private WordsResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the ApplyStyleToDocumentElementOnlineResponse class.
49 | */
50 | public ApplyStyleToDocumentElementOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the ApplyStyleToDocumentElementOnlineResponse class.
57 | */
58 | public ApplyStyleToDocumentElementOnlineResponse(WordsResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The base class for all responses.
65 | */
66 | public WordsResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The base class for all responses.
72 | */
73 | public void setModel(WordsResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/ProtectDocumentOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for protectDocumentOnline operation.
35 | */
36 | public class ProtectDocumentOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with data on document's protection.
39 | */
40 | private ProtectionDataResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the ProtectDocumentOnlineResponse class.
49 | */
50 | public ProtectDocumentOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the ProtectDocumentOnlineResponse class.
57 | */
58 | public ProtectDocumentOnlineResponse(ProtectionDataResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with data on document's protection.
65 | */
66 | public ProtectionDataResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with data on document's protection.
72 | */
73 | public void setModel(ProtectionDataResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/UnprotectDocumentOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for unprotectDocumentOnline operation.
35 | */
36 | public class UnprotectDocumentOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with data on document's protection.
39 | */
40 | private ProtectionDataResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the UnprotectDocumentOnlineResponse class.
49 | */
50 | public UnprotectDocumentOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the UnprotectDocumentOnlineResponse class.
57 | */
58 | public UnprotectDocumentOnlineResponse(ProtectionDataResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with data on document's protection.
65 | */
66 | public ProtectionDataResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with data on document's protection.
72 | */
73 | public void setModel(ProtectionDataResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/ReplaceTextOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for replaceTextOnline operation.
35 | */
36 | public class ReplaceTextOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a number of occurrences of the captured text in the document.
39 | */
40 | private ReplaceTextResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the ReplaceTextOnlineResponse class.
49 | */
50 | public ReplaceTextOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the ReplaceTextOnlineResponse class.
57 | */
58 | public ReplaceTextOnlineResponse(ReplaceTextResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a number of occurrences of the captured text in the document.
65 | */
66 | public ReplaceTextResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a number of occurrences of the captured text in the document.
72 | */
73 | public void setModel(ReplaceTextResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/test/java/com/aspose/words/cloud/TestUrlEncode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud;
29 |
30 | import com.aspose.words.cloud.ApiException;
31 | import com.aspose.words.cloud.PathUtil;
32 | import com.aspose.words.cloud.TestInitializer;
33 | import com.aspose.words.cloud.model.BookmarkData;
34 | import com.aspose.words.cloud.model.BookmarkResponse;
35 | import com.aspose.words.cloud.model.BookmarksResponse;
36 | import com.aspose.words.cloud.model.requests.GetBookmarkByNameRequest;
37 | import com.aspose.words.cloud.model.requests.GetBookmarksRequest;
38 | import com.aspose.words.cloud.model.requests.UpdateBookmarkRequest;
39 | import junit.framework.TestCase;
40 | import org.junit.Test;
41 |
42 | import java.io.FileNotFoundException;
43 | import java.io.IOException;
44 | import jakarta.mail.MessagingException;
45 |
46 | public class TestUrlEncode extends TestCase {
47 | private String testFolder = "DocumentElements/Bookmarks";
48 |
49 | @Override
50 | protected void setUp() throws Exception {
51 | super.setUp();
52 | TestInitializer.Initialize();
53 | }
54 |
55 | /*
56 | * Test for URL encoding of document name
57 | */
58 | @Test
59 | public void testUrlEncode() throws ApiException, MessagingException, IOException {
60 | String fileName = "test_multi_pages.docx";
61 | String remoteName = "[“Test_Two,_Inc.”]-_83(b)Election([“Bill_Gates”]).docx";
62 | String bookmarkName = "aspose";
63 |
64 | TestInitializer.UploadFile(PathUtil.get(TestInitializer.LocalCommonFolder, fileName), PathUtil.get(TestInitializer.RemoteTestFolder, testFolder, remoteName).replace("\\", "/"));
65 |
66 | GetBookmarkByNameRequest request = new GetBookmarkByNameRequest(remoteName, bookmarkName,
67 | PathUtil.get(TestInitializer.RemoteTestFolder, testFolder),
68 | null, null, null, null, null);
69 |
70 | BookmarkResponse result = TestInitializer.wordsApi.getBookmarkByName(request);
71 | assertNotNull(result);
72 | }
73 | }
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/InsertStructuredDocumentTagOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for insertStructuredDocumentTagOnline operation.
35 | */
36 | public class InsertStructuredDocumentTagOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a StructuredDocumentTag.
39 | */
40 | private StructuredDocumentTagResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the InsertStructuredDocumentTagOnlineResponse class.
49 | */
50 | public InsertStructuredDocumentTagOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the InsertStructuredDocumentTagOnlineResponse class.
57 | */
58 | public InsertStructuredDocumentTagOnlineResponse(StructuredDocumentTagResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a StructuredDocumentTag.
65 | */
66 | public StructuredDocumentTagResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a StructuredDocumentTag.
72 | */
73 | public void setModel(StructuredDocumentTagResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/UpdateStructuredDocumentTagOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for updateStructuredDocumentTagOnline operation.
35 | */
36 | public class UpdateStructuredDocumentTagOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a StructuredDocumentTag.
39 | */
40 | private StructuredDocumentTagResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the UpdateStructuredDocumentTagOnlineResponse class.
49 | */
50 | public UpdateStructuredDocumentTagOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the UpdateStructuredDocumentTagOnlineResponse class.
57 | */
58 | public UpdateStructuredDocumentTagOnlineResponse(StructuredDocumentTagResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a StructuredDocumentTag.
65 | */
66 | public StructuredDocumentTagResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a StructuredDocumentTag.
72 | */
73 | public void setModel(StructuredDocumentTagResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/ProgressRequestBody.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud;
29 |
30 | import com.squareup.okhttp.MediaType;
31 | import com.squareup.okhttp.RequestBody;
32 |
33 | import java.io.IOException;
34 |
35 | import okio.Buffer;
36 | import okio.BufferedSink;
37 | import okio.ForwardingSink;
38 | import okio.Okio;
39 | import okio.Sink;
40 |
41 | public class ProgressRequestBody extends RequestBody {
42 |
43 | public interface ProgressRequestListener {
44 | void onRequestProgress(long bytesWritten, long contentLength, boolean done);
45 | }
46 |
47 | private final RequestBody requestBody;
48 |
49 | private final ProgressRequestListener progressListener;
50 |
51 | public ProgressRequestBody(RequestBody requestBody, ProgressRequestListener progressListener) {
52 | this.requestBody = requestBody;
53 | this.progressListener = progressListener;
54 | }
55 |
56 | @Override
57 | public MediaType contentType() {
58 | return requestBody.contentType();
59 | }
60 |
61 | @Override
62 | public long contentLength() throws IOException {
63 | return requestBody.contentLength();
64 | }
65 |
66 | @Override
67 | public void writeTo(BufferedSink sink) throws IOException {
68 | BufferedSink bufferedSink = Okio.buffer(sink(sink));
69 | requestBody.writeTo(bufferedSink);
70 | bufferedSink.flush();
71 | }
72 |
73 | private Sink sink(Sink sink) {
74 | return new ForwardingSink(sink) {
75 |
76 | long bytesWritten = 0L;
77 | long contentLength = 0L;
78 |
79 | @Override
80 | public void write(Buffer source, long byteCount) throws IOException {
81 | super.write(source, byteCount);
82 | if (contentLength == 0) {
83 | contentLength = contentLength();
84 | }
85 |
86 | bytesWritten += byteCount;
87 | progressListener.onRequestProgress(bytesWritten, contentLength, bytesWritten == contentLength);
88 | }
89 | };
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/InsertBookmarkOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for insertBookmarkOnline operation.
35 | */
36 | public class InsertBookmarkOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a bookmark.
39 | * This response should be returned by the service when handling: GET bookmarks/{bookmarkName}.
40 | */
41 | private BookmarkResponse model;
42 |
43 | /*
44 | * The document after modification.
45 | */
46 | private Map document;
47 |
48 | /*
49 | * Initializes a new instance of the InsertBookmarkOnlineResponse class.
50 | */
51 | public InsertBookmarkOnlineResponse() {
52 | this.model = null;
53 | this.document = null;
54 | }
55 |
56 | /*
57 | * Initializes a new instance of the InsertBookmarkOnlineResponse class.
58 | */
59 | public InsertBookmarkOnlineResponse(BookmarkResponse model, Map document) {
60 | this.model = model;
61 | this.document = document;
62 | }
63 |
64 | /*
65 | * Gets The REST response with a bookmark. This response should be returned by the service when handling: GET bookmarks/{bookmarkName}.
66 | */
67 | public BookmarkResponse getModel() {
68 | return this.model;
69 | }
70 |
71 | /*
72 | * Sets The REST response with a bookmark. This response should be returned by the service when handling: GET bookmarks/{bookmarkName}.
73 | */
74 | public void setModel(BookmarkResponse value) {
75 | this.model = value;
76 | }
77 |
78 | /*
79 | * Gets The document after modification.
80 | */
81 | public Map getDocument() {
82 | return this.document;
83 | }
84 |
85 | /*
86 | * Sets The document after modification.
87 | */
88 | public void setDocument(Map value) {
89 | this.document = value;
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/UpdateBookmarkOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for updateBookmarkOnline operation.
35 | */
36 | public class UpdateBookmarkOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a bookmark.
39 | * This response should be returned by the service when handling: GET bookmarks/{bookmarkName}.
40 | */
41 | private BookmarkResponse model;
42 |
43 | /*
44 | * The document after modification.
45 | */
46 | private Map document;
47 |
48 | /*
49 | * Initializes a new instance of the UpdateBookmarkOnlineResponse class.
50 | */
51 | public UpdateBookmarkOnlineResponse() {
52 | this.model = null;
53 | this.document = null;
54 | }
55 |
56 | /*
57 | * Initializes a new instance of the UpdateBookmarkOnlineResponse class.
58 | */
59 | public UpdateBookmarkOnlineResponse(BookmarkResponse model, Map document) {
60 | this.model = model;
61 | this.document = document;
62 | }
63 |
64 | /*
65 | * Gets The REST response with a bookmark. This response should be returned by the service when handling: GET bookmarks/{bookmarkName}.
66 | */
67 | public BookmarkResponse getModel() {
68 | return this.model;
69 | }
70 |
71 | /*
72 | * Sets The REST response with a bookmark. This response should be returned by the service when handling: GET bookmarks/{bookmarkName}.
73 | */
74 | public void setModel(BookmarkResponse value) {
75 | this.model = value;
76 | }
77 |
78 | /*
79 | * Gets The document after modification.
80 | */
81 | public Map getDocument() {
82 | return this.document;
83 | }
84 |
85 | /*
86 | * Sets The document after modification.
87 | */
88 | public void setDocument(Map value) {
89 | this.document = value;
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/DeleteBorderOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for deleteBorderOnline operation.
35 | */
36 | public class DeleteBorderOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a border.
39 | * This response is returned by the Service when handling "GET {nodeWithBorders}/borders" REST API requests.
40 | */
41 | private BorderResponse model;
42 |
43 | /*
44 | * The document after modification.
45 | */
46 | private Map document;
47 |
48 | /*
49 | * Initializes a new instance of the DeleteBorderOnlineResponse class.
50 | */
51 | public DeleteBorderOnlineResponse() {
52 | this.model = null;
53 | this.document = null;
54 | }
55 |
56 | /*
57 | * Initializes a new instance of the DeleteBorderOnlineResponse class.
58 | */
59 | public DeleteBorderOnlineResponse(BorderResponse model, Map document) {
60 | this.model = model;
61 | this.document = document;
62 | }
63 |
64 | /*
65 | * Gets The REST response with a border. This response is returned by the Service when handling "GET {nodeWithBorders}/borders" REST API requests.
66 | */
67 | public BorderResponse getModel() {
68 | return this.model;
69 | }
70 |
71 | /*
72 | * Sets The REST response with a border. This response is returned by the Service when handling "GET {nodeWithBorders}/borders" REST API requests.
73 | */
74 | public void setModel(BorderResponse value) {
75 | this.model = value;
76 | }
77 |
78 | /*
79 | * Gets The document after modification.
80 | */
81 | public Map getDocument() {
82 | return this.document;
83 | }
84 |
85 | /*
86 | * Sets The document after modification.
87 | */
88 | public void setDocument(Map value) {
89 | this.document = value;
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/UpdateBorderOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for updateBorderOnline operation.
35 | */
36 | public class UpdateBorderOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a border.
39 | * This response is returned by the Service when handling "GET {nodeWithBorders}/borders" REST API requests.
40 | */
41 | private BorderResponse model;
42 |
43 | /*
44 | * The document after modification.
45 | */
46 | private Map document;
47 |
48 | /*
49 | * Initializes a new instance of the UpdateBorderOnlineResponse class.
50 | */
51 | public UpdateBorderOnlineResponse() {
52 | this.model = null;
53 | this.document = null;
54 | }
55 |
56 | /*
57 | * Initializes a new instance of the UpdateBorderOnlineResponse class.
58 | */
59 | public UpdateBorderOnlineResponse(BorderResponse model, Map document) {
60 | this.model = model;
61 | this.document = document;
62 | }
63 |
64 | /*
65 | * Gets The REST response with a border. This response is returned by the Service when handling "GET {nodeWithBorders}/borders" REST API requests.
66 | */
67 | public BorderResponse getModel() {
68 | return this.model;
69 | }
70 |
71 | /*
72 | * Sets The REST response with a border. This response is returned by the Service when handling "GET {nodeWithBorders}/borders" REST API requests.
73 | */
74 | public void setModel(BorderResponse value) {
75 | this.model = value;
76 | }
77 |
78 | /*
79 | * Gets The document after modification.
80 | */
81 | public Map getDocument() {
82 | return this.document;
83 | }
84 |
85 | /*
86 | * Sets The document after modification.
87 | */
88 | public void setDocument(Map value) {
89 | this.document = value;
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/ProgressResponseBody.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud;
29 |
30 | import com.squareup.okhttp.MediaType;
31 | import com.squareup.okhttp.ResponseBody;
32 |
33 | import java.io.IOException;
34 |
35 | import okio.Buffer;
36 | import okio.BufferedSource;
37 | import okio.ForwardingSource;
38 | import okio.Okio;
39 | import okio.Source;
40 |
41 | public class ProgressResponseBody extends ResponseBody {
42 |
43 | public interface ProgressListener {
44 | void update(long bytesRead, long contentLength, boolean done);
45 | }
46 |
47 | private final ResponseBody responseBody;
48 | private final ProgressListener progressListener;
49 | private BufferedSource bufferedSource;
50 |
51 | public ProgressResponseBody(ResponseBody responseBody, ProgressListener progressListener) {
52 | this.responseBody = responseBody;
53 | this.progressListener = progressListener;
54 | }
55 |
56 | @Override
57 | public MediaType contentType() {
58 | return responseBody.contentType();
59 | }
60 |
61 | @Override
62 | public long contentLength() throws IOException {
63 | return responseBody.contentLength();
64 | }
65 |
66 | @Override
67 | public BufferedSource source() throws IOException {
68 | if (bufferedSource == null) {
69 | bufferedSource = Okio.buffer(source(responseBody.source()));
70 | }
71 | return bufferedSource;
72 | }
73 |
74 | private Source source(Source source) {
75 | return new ForwardingSource(source) {
76 | long totalBytesRead = 0L;
77 |
78 | @Override
79 | public long read(Buffer sink, long byteCount) throws IOException {
80 | long bytesRead = super.read(sink, byteCount);
81 | // read() returns the number of bytes read, or -1 if this source is exhausted.
82 | totalBytesRead += bytesRead != -1 ? bytesRead : 0;
83 | progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1);
84 | return bytesRead;
85 | }
86 | };
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/SplitDocumentOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for splitDocumentOnline operation.
35 | */
36 | public class SplitDocumentOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a result of document splitting.
39 | * This response should be returned by the service when handling: POST /{name}/split.
40 | */
41 | private SplitDocumentResponse model;
42 |
43 | /*
44 | * The document after modification.
45 | */
46 | private Map document;
47 |
48 | /*
49 | * Initializes a new instance of the SplitDocumentOnlineResponse class.
50 | */
51 | public SplitDocumentOnlineResponse() {
52 | this.model = null;
53 | this.document = null;
54 | }
55 |
56 | /*
57 | * Initializes a new instance of the SplitDocumentOnlineResponse class.
58 | */
59 | public SplitDocumentOnlineResponse(SplitDocumentResponse model, Map document) {
60 | this.model = model;
61 | this.document = document;
62 | }
63 |
64 | /*
65 | * Gets The REST response with a result of document splitting. This response should be returned by the service when handling: POST /{name}/split.
66 | */
67 | public SplitDocumentResponse getModel() {
68 | return this.model;
69 | }
70 |
71 | /*
72 | * Sets The REST response with a result of document splitting. This response should be returned by the service when handling: POST /{name}/split.
73 | */
74 | public void setModel(SplitDocumentResponse value) {
75 | this.model = value;
76 | }
77 |
78 | /*
79 | * Gets The document after modification.
80 | */
81 | public Map getDocument() {
82 | return this.document;
83 | }
84 |
85 | /*
86 | * Sets The document after modification.
87 | */
88 | public void setDocument(Map value) {
89 | this.document = value;
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/CopyStyleOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for copyStyleOnline operation.
35 | */
36 | public class CopyStyleOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a style.
39 | * This response is returned by the Service when handling "GET https://api.aspose.cloud/v4.0/words/Test.doc/styles/{0}" REST API requests.
40 | */
41 | private StyleResponse model;
42 |
43 | /*
44 | * The document after modification.
45 | */
46 | private Map document;
47 |
48 | /*
49 | * Initializes a new instance of the CopyStyleOnlineResponse class.
50 | */
51 | public CopyStyleOnlineResponse() {
52 | this.model = null;
53 | this.document = null;
54 | }
55 |
56 | /*
57 | * Initializes a new instance of the CopyStyleOnlineResponse class.
58 | */
59 | public CopyStyleOnlineResponse(StyleResponse model, Map document) {
60 | this.model = model;
61 | this.document = document;
62 | }
63 |
64 | /*
65 | * Gets The REST response with a style. This response is returned by the Service when handling "GET https://api.aspose.cloud/v4.0/words/Test.doc/styles/{0}" REST API requests.
66 | */
67 | public StyleResponse getModel() {
68 | return this.model;
69 | }
70 |
71 | /*
72 | * Sets The REST response with a style. This response is returned by the Service when handling "GET https://api.aspose.cloud/v4.0/words/Test.doc/styles/{0}" REST API requests.
73 | */
74 | public void setModel(StyleResponse value) {
75 | this.model = value;
76 | }
77 |
78 | /*
79 | * Gets The document after modification.
80 | */
81 | public Map getDocument() {
82 | return this.document;
83 | }
84 |
85 | /*
86 | * Sets The document after modification.
87 | */
88 | public void setDocument(Map value) {
89 | this.document = value;
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/DeleteBordersOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for deleteBordersOnline operation.
35 | */
36 | public class DeleteBordersOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a collection of borders.
39 | * This response is returned by the Service when handling "GET {nodeWithBorders}/borders" REST API requests.
40 | */
41 | private BordersResponse model;
42 |
43 | /*
44 | * The document after modification.
45 | */
46 | private Map document;
47 |
48 | /*
49 | * Initializes a new instance of the DeleteBordersOnlineResponse class.
50 | */
51 | public DeleteBordersOnlineResponse() {
52 | this.model = null;
53 | this.document = null;
54 | }
55 |
56 | /*
57 | * Initializes a new instance of the DeleteBordersOnlineResponse class.
58 | */
59 | public DeleteBordersOnlineResponse(BordersResponse model, Map document) {
60 | this.model = model;
61 | this.document = document;
62 | }
63 |
64 | /*
65 | * Gets The REST response with a collection of borders. This response is returned by the Service when handling "GET {nodeWithBorders}/borders" REST API requests.
66 | */
67 | public BordersResponse getModel() {
68 | return this.model;
69 | }
70 |
71 | /*
72 | * Sets The REST response with a collection of borders. This response is returned by the Service when handling "GET {nodeWithBorders}/borders" REST API requests.
73 | */
74 | public void setModel(BordersResponse value) {
75 | this.model = value;
76 | }
77 |
78 | /*
79 | * Gets The document after modification.
80 | */
81 | public Map getDocument() {
82 | return this.document;
83 | }
84 |
85 | /*
86 | * Sets The document after modification.
87 | */
88 | public void setDocument(Map value) {
89 | this.document = value;
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/InsertStyleOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for insertStyleOnline operation.
35 | */
36 | public class InsertStyleOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a style.
39 | * This response is returned by the Service when handling "GET https://api.aspose.cloud/v4.0/words/Test.doc/styles/{0}" REST API requests.
40 | */
41 | private StyleResponse model;
42 |
43 | /*
44 | * The document after modification.
45 | */
46 | private Map document;
47 |
48 | /*
49 | * Initializes a new instance of the InsertStyleOnlineResponse class.
50 | */
51 | public InsertStyleOnlineResponse() {
52 | this.model = null;
53 | this.document = null;
54 | }
55 |
56 | /*
57 | * Initializes a new instance of the InsertStyleOnlineResponse class.
58 | */
59 | public InsertStyleOnlineResponse(StyleResponse model, Map document) {
60 | this.model = model;
61 | this.document = document;
62 | }
63 |
64 | /*
65 | * Gets The REST response with a style. This response is returned by the Service when handling "GET https://api.aspose.cloud/v4.0/words/Test.doc/styles/{0}" REST API requests.
66 | */
67 | public StyleResponse getModel() {
68 | return this.model;
69 | }
70 |
71 | /*
72 | * Sets The REST response with a style. This response is returned by the Service when handling "GET https://api.aspose.cloud/v4.0/words/Test.doc/styles/{0}" REST API requests.
73 | */
74 | public void setModel(StyleResponse value) {
75 | this.model = value;
76 | }
77 |
78 | /*
79 | * Gets The document after modification.
80 | */
81 | public Map getDocument() {
82 | return this.document;
83 | }
84 |
85 | /*
86 | * Sets The document after modification.
87 | */
88 | public void setDocument(Map value) {
89 | this.document = value;
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/InsertTableOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for insertTableOnline operation.
35 | */
36 | public class InsertTableOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a table.
39 | * This response is returned by the Service when handling "GET https://api.aspose.cloud/v4.0/words/Test.doc/tables/{0}" REST API requests.
40 | */
41 | private TableResponse model;
42 |
43 | /*
44 | * The document after modification.
45 | */
46 | private Map document;
47 |
48 | /*
49 | * Initializes a new instance of the InsertTableOnlineResponse class.
50 | */
51 | public InsertTableOnlineResponse() {
52 | this.model = null;
53 | this.document = null;
54 | }
55 |
56 | /*
57 | * Initializes a new instance of the InsertTableOnlineResponse class.
58 | */
59 | public InsertTableOnlineResponse(TableResponse model, Map document) {
60 | this.model = model;
61 | this.document = document;
62 | }
63 |
64 | /*
65 | * Gets The REST response with a table. This response is returned by the Service when handling "GET https://api.aspose.cloud/v4.0/words/Test.doc/tables/{0}" REST API requests.
66 | */
67 | public TableResponse getModel() {
68 | return this.model;
69 | }
70 |
71 | /*
72 | * Sets The REST response with a table. This response is returned by the Service when handling "GET https://api.aspose.cloud/v4.0/words/Test.doc/tables/{0}" REST API requests.
73 | */
74 | public void setModel(TableResponse value) {
75 | this.model = value;
76 | }
77 |
78 | /*
79 | * Gets The document after modification.
80 | */
81 | public Map getDocument() {
82 | return this.document;
83 | }
84 |
85 | /*
86 | * Sets The document after modification.
87 | */
88 | public void setDocument(Map value) {
89 | this.document = value;
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/UpdateStyleOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for updateStyleOnline operation.
35 | */
36 | public class UpdateStyleOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a style.
39 | * This response is returned by the Service when handling "GET https://api.aspose.cloud/v4.0/words/Test.doc/styles/{0}" REST API requests.
40 | */
41 | private StyleResponse model;
42 |
43 | /*
44 | * The document after modification.
45 | */
46 | private Map document;
47 |
48 | /*
49 | * Initializes a new instance of the UpdateStyleOnlineResponse class.
50 | */
51 | public UpdateStyleOnlineResponse() {
52 | this.model = null;
53 | this.document = null;
54 | }
55 |
56 | /*
57 | * Initializes a new instance of the UpdateStyleOnlineResponse class.
58 | */
59 | public UpdateStyleOnlineResponse(StyleResponse model, Map document) {
60 | this.model = model;
61 | this.document = document;
62 | }
63 |
64 | /*
65 | * Gets The REST response with a style. This response is returned by the Service when handling "GET https://api.aspose.cloud/v4.0/words/Test.doc/styles/{0}" REST API requests.
66 | */
67 | public StyleResponse getModel() {
68 | return this.model;
69 | }
70 |
71 | /*
72 | * Sets The REST response with a style. This response is returned by the Service when handling "GET https://api.aspose.cloud/v4.0/words/Test.doc/styles/{0}" REST API requests.
73 | */
74 | public void setModel(StyleResponse value) {
75 | this.model = value;
76 | }
77 |
78 | /*
79 | * Gets The document after modification.
80 | */
81 | public Map getDocument() {
82 | return this.document;
83 | }
84 |
85 | /*
86 | * Sets The document after modification.
87 | */
88 | public void setDocument(Map value) {
89 | this.document = value;
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/AcceptAllRevisionsOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for acceptAllRevisionsOnline operation.
35 | */
36 | public class AcceptAllRevisionsOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a result of the modification operations for the revisions collection (now these are acceptAll and rejectAll).
39 | */
40 | private RevisionsModificationResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the AcceptAllRevisionsOnlineResponse class.
49 | */
50 | public AcceptAllRevisionsOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the AcceptAllRevisionsOnlineResponse class.
57 | */
58 | public AcceptAllRevisionsOnlineResponse(RevisionsModificationResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a result of the modification operations for the revisions collection (now these are acceptAll and rejectAll).
65 | */
66 | public RevisionsModificationResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a result of the modification operations for the revisions collection (now these are acceptAll and rejectAll).
72 | */
73 | public void setModel(RevisionsModificationResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/model/responses/RejectAllRevisionsOnlineResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud.model.responses;
29 |
30 | import com.aspose.words.cloud.model.*;
31 | import java.util.Map;
32 |
33 | /*
34 | * Response model for rejectAllRevisionsOnline operation.
35 | */
36 | public class RejectAllRevisionsOnlineResponse implements IMultipartResponse {
37 | /*
38 | * The REST response with a result of the modification operations for the revisions collection (now these are acceptAll and rejectAll).
39 | */
40 | private RevisionsModificationResponse model;
41 |
42 | /*
43 | * The document after modification.
44 | */
45 | private Map document;
46 |
47 | /*
48 | * Initializes a new instance of the RejectAllRevisionsOnlineResponse class.
49 | */
50 | public RejectAllRevisionsOnlineResponse() {
51 | this.model = null;
52 | this.document = null;
53 | }
54 |
55 | /*
56 | * Initializes a new instance of the RejectAllRevisionsOnlineResponse class.
57 | */
58 | public RejectAllRevisionsOnlineResponse(RevisionsModificationResponse model, Map document) {
59 | this.model = model;
60 | this.document = document;
61 | }
62 |
63 | /*
64 | * Gets The REST response with a result of the modification operations for the revisions collection (now these are acceptAll and rejectAll).
65 | */
66 | public RevisionsModificationResponse getModel() {
67 | return this.model;
68 | }
69 |
70 | /*
71 | * Sets The REST response with a result of the modification operations for the revisions collection (now these are acceptAll and rejectAll).
72 | */
73 | public void setModel(RevisionsModificationResponse value) {
74 | this.model = value;
75 | }
76 |
77 | /*
78 | * Gets The document after modification.
79 | */
80 | public Map getDocument() {
81 | return this.document;
82 | }
83 |
84 | /*
85 | * Sets The document after modification.
86 | */
87 | public void setDocument(Map value) {
88 | this.document = value;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/com/aspose/words/cloud/SimpleEncryptorFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * --------------------------------------------------------------------------------
3 | *
4 | * Copyright (c) 2025 Aspose.Words for Cloud
5 | *
6 | *
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 | *
25 | * --------------------------------------------------------------------------------
26 | */
27 |
28 | package com.aspose.words.cloud;
29 |
30 | import java.io.IOException;
31 | import java.math.BigInteger;
32 | import java.security.InvalidKeyException;
33 | import java.security.KeyFactory;
34 | import java.security.NoSuchAlgorithmException;
35 | import java.security.PublicKey;
36 | import java.security.spec.InvalidKeySpecException;
37 | import java.security.spec.RSAPublicKeySpec;
38 | import java.util.Base64;
39 |
40 | import javax.crypto.Cipher;
41 | import javax.crypto.NoSuchPaddingException;
42 |
43 | public class SimpleEncryptorFactory implements EncryptorFactory {
44 |
45 | private String exponent;
46 | private String modulus;
47 |
48 | public SimpleEncryptorFactory(String exponent, String modulus) {
49 | if (exponent == null || exponent.isEmpty()) {
50 | throw new IllegalArgumentException("Exponent must be non empty base64 encoded string");
51 | }
52 |
53 | if (modulus == null || modulus.isEmpty()) {
54 | throw new IllegalArgumentException("Modulus must be non empty base64 encoded string");
55 | }
56 |
57 | this.exponent = exponent;
58 | this.modulus = modulus;
59 | }
60 |
61 | @Override
62 | public Cipher create() throws ApiException, IOException {
63 |
64 | try {
65 | byte[] modulusByte = Base64.getDecoder().decode(this.modulus);
66 | BigInteger modulusInt = new BigInteger(1, modulusByte);
67 | byte[] exponentByte = Base64.getDecoder().decode(this.exponent);
68 | BigInteger exponentInt = new BigInteger(1, exponentByte);
69 | RSAPublicKeySpec spec = new RSAPublicKeySpec(modulusInt, exponentInt);
70 | KeyFactory factory = KeyFactory.getInstance("RSA");
71 | PublicKey key = factory.generatePublic(spec);
72 | Cipher encryptor = Cipher.getInstance("RSA");
73 | encryptor.init(Cipher.ENCRYPT_MODE, key);
74 |
75 | return encryptor;
76 | }
77 | catch (InvalidKeyException | NoSuchAlgorithmException | InvalidKeySpecException | NoSuchPaddingException e) {
78 | throw new ApiException(e);
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------