Skip to content

Commit bef1517

Browse files
committed
Updated sources
1 parent f188e7e commit bef1517

18 files changed

+325
-800
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Add following repository and dependency to your project's POM
2424
<dependency>
2525
<groupId>com.groupdocs</groupId>
2626
<artifactId>groupdocs-conversion-cloud</artifactId>
27-
<version>23.2</version>
27+
<version>23.4</version>
2828
<scope>compile</scope>
2929
</dependency>
3030
```
@@ -43,7 +43,7 @@ repositories {
4343
...
4444
dependencies {
4545
...
46-
implementation 'com.groupdocs:groupdocs-conversion-cloud:23.2'
46+
implementation 'com.groupdocs:groupdocs-conversion-cloud:23.4'
4747
}
4848
```
4949

@@ -100,7 +100,7 @@ mvn package -D maven.test.skip=true
100100

101101
Then manually install the following JARs:
102102

103-
* target/groupdocs-conversion-cloud-23.2.jar
103+
* target/groupdocs-conversion-cloud-23.4.jar
104104
* target/lib/*.jar
105105

106106
## Licensing

pom.xml

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

simplified-pom.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.groupdocs</groupId>
77
<artifactId>groupdocs-conversion-cloud</artifactId>
8-
<version>23.2</version>
8+
<version>23.4</version>
99
<packaging>jar</packaging>
1010

1111
<name>groupdocs-conversion-cloud</name>

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

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

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

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

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

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import com.google.gson.annotations.SerializedName;
3434
import com.google.gson.stream.JsonReader;
3535
import com.google.gson.stream.JsonWriter;
36+
import com.groupdocs.cloud.conversion.model.WatermarkOptions;
3637
import io.swagger.annotations.ApiModel;
3738
import io.swagger.annotations.ApiModelProperty;
3839
import java.io.IOException;
@@ -53,6 +54,9 @@ public class ConvertOptions {
5354
@SerializedName("pages")
5455
private List<Integer> pages = null;
5556

57+
@SerializedName("watermarkOptions")
58+
private WatermarkOptions watermarkOptions = null;
59+
5660
public ConvertOptions fromPage(Integer fromPage) {
5761
this.fromPage = fromPage;
5862
return this;
@@ -115,6 +119,24 @@ public void setPages(List<Integer> pages) {
115119
this.pages = pages;
116120
}
117121

122+
public ConvertOptions watermarkOptions(WatermarkOptions watermarkOptions) {
123+
this.watermarkOptions = watermarkOptions;
124+
return this;
125+
}
126+
127+
/**
128+
* Watermark specific options
129+
* @return watermarkOptions
130+
**/
131+
@ApiModelProperty(value = "Watermark specific options")
132+
public WatermarkOptions getWatermarkOptions() {
133+
return watermarkOptions;
134+
}
135+
136+
public void setWatermarkOptions(WatermarkOptions watermarkOptions) {
137+
this.watermarkOptions = watermarkOptions;
138+
}
139+
118140

119141
@Override
120142
public boolean equals(java.lang.Object o) {
@@ -127,12 +149,13 @@ public boolean equals(java.lang.Object o) {
127149
ConvertOptions convertOptions = (ConvertOptions) o;
128150
return Objects.equals(this.fromPage, convertOptions.fromPage) &&
129151
Objects.equals(this.pagesCount, convertOptions.pagesCount) &&
130-
Objects.equals(this.pages, convertOptions.pages);
152+
Objects.equals(this.pages, convertOptions.pages) &&
153+
Objects.equals(this.watermarkOptions, convertOptions.watermarkOptions);
131154
}
132155

133156
@Override
134157
public int hashCode() {
135-
return Objects.hash(fromPage, pagesCount, pages);
158+
return Objects.hash(fromPage, pagesCount, pages, watermarkOptions);
136159
}
137160

138161

@@ -144,6 +167,7 @@ public String toString() {
144167
sb.append(" fromPage: ").append(toIndentedString(fromPage)).append("\n");
145168
sb.append(" pagesCount: ").append(toIndentedString(pagesCount)).append("\n");
146169
sb.append(" pages: ").append(toIndentedString(pages)).append("\n");
170+
sb.append(" watermarkOptions: ").append(toIndentedString(watermarkOptions)).append("\n");
147171
sb.append("}");
148172
return sb.toString();
149173
}
Lines changed: 262 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,262 @@
1+
/**
2+
* --------------------------------------------------------------------------------------------------------------------
3+
* <copyright company="Aspose Pty Ltd" file="EBookConvertOptions.java">
4+
* Copyright (c) 2003-2023 Aspose Pty Ltd
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------------------------------------------
26+
*/
27+
28+
package com.groupdocs.cloud.conversion.model;
29+
30+
import java.util.Objects;
31+
import com.google.gson.TypeAdapter;
32+
import com.google.gson.annotations.JsonAdapter;
33+
import com.google.gson.annotations.SerializedName;
34+
import com.google.gson.stream.JsonReader;
35+
import com.google.gson.stream.JsonWriter;
36+
import com.groupdocs.cloud.conversion.model.ConvertOptions;
37+
import com.groupdocs.cloud.conversion.model.WatermarkOptions;
38+
import io.swagger.annotations.ApiModel;
39+
import io.swagger.annotations.ApiModelProperty;
40+
import java.io.IOException;
41+
import java.util.List;
42+
43+
/**
44+
* Ebook convert options
45+
*/
46+
@ApiModel(description = "Ebook convert options")
47+
public class EBookConvertOptions extends ConvertOptions {
48+
/**
49+
* Specifies page size
50+
*/
51+
@JsonAdapter(PageSizeEnum.Adapter.class)
52+
public enum PageSizeEnum {
53+
DEFAULT("Default"),
54+
55+
A3("A3"),
56+
57+
STATEMENT("Statement"),
58+
59+
QUARTO("Quarto"),
60+
61+
PAPER11X17("Paper11x17"),
62+
63+
PAPER10X14("Paper10x14"),
64+
65+
LETTER("Letter"),
66+
67+
LEGAL("Legal"),
68+
69+
LEDGER("Ledger"),
70+
71+
FOLIO("Folio"),
72+
73+
EXECUTIVE("Executive"),
74+
75+
ENVELOPEDL("EnvelopeDL"),
76+
77+
CUSTOM("Custom"),
78+
79+
B5("B5"),
80+
81+
B4("B4"),
82+
83+
A5("A5"),
84+
85+
A4("A4"),
86+
87+
TABLOID("Tabloid");
88+
89+
private String value;
90+
91+
PageSizeEnum(String value) {
92+
this.value = value;
93+
}
94+
95+
public String getValue() {
96+
return value;
97+
}
98+
99+
@Override
100+
public String toString() {
101+
return String.valueOf(value);
102+
}
103+
104+
public static PageSizeEnum fromValue(String text) {
105+
for (PageSizeEnum b : PageSizeEnum.values()) {
106+
if (String.valueOf(b.value).equals(text)) {
107+
return b;
108+
}
109+
}
110+
return null;
111+
}
112+
113+
public static class Adapter extends TypeAdapter<PageSizeEnum> {
114+
@Override
115+
public void write(final JsonWriter jsonWriter, final PageSizeEnum enumeration) throws IOException {
116+
jsonWriter.value(enumeration.getValue());
117+
}
118+
119+
@Override
120+
public PageSizeEnum read(final JsonReader jsonReader) throws IOException {
121+
String value = jsonReader.nextString();
122+
return PageSizeEnum.fromValue(String.valueOf(value));
123+
}
124+
}
125+
}
126+
127+
@SerializedName("pageSize")
128+
private PageSizeEnum pageSize = null;
129+
130+
/**
131+
* Specifies page orientation
132+
*/
133+
@JsonAdapter(PageOrientationEnum.Adapter.class)
134+
public enum PageOrientationEnum {
135+
DEFAULT("Default"),
136+
137+
LANDSCAPE("Landscape"),
138+
139+
PORTRAIT("Portrait");
140+
141+
private String value;
142+
143+
PageOrientationEnum(String value) {
144+
this.value = value;
145+
}
146+
147+
public String getValue() {
148+
return value;
149+
}
150+
151+
@Override
152+
public String toString() {
153+
return String.valueOf(value);
154+
}
155+
156+
public static PageOrientationEnum fromValue(String text) {
157+
for (PageOrientationEnum b : PageOrientationEnum.values()) {
158+
if (String.valueOf(b.value).equals(text)) {
159+
return b;
160+
}
161+
}
162+
return null;
163+
}
164+
165+
public static class Adapter extends TypeAdapter<PageOrientationEnum> {
166+
@Override
167+
public void write(final JsonWriter jsonWriter, final PageOrientationEnum enumeration) throws IOException {
168+
jsonWriter.value(enumeration.getValue());
169+
}
170+
171+
@Override
172+
public PageOrientationEnum read(final JsonReader jsonReader) throws IOException {
173+
String value = jsonReader.nextString();
174+
return PageOrientationEnum.fromValue(String.valueOf(value));
175+
}
176+
}
177+
}
178+
179+
@SerializedName("pageOrientation")
180+
private PageOrientationEnum pageOrientation = null;
181+
182+
public EBookConvertOptions pageSize(PageSizeEnum pageSize) {
183+
this.pageSize = pageSize;
184+
return this;
185+
}
186+
187+
/**
188+
* Specifies page size
189+
* @return pageSize
190+
**/
191+
@ApiModelProperty(required = true, value = "Specifies page size")
192+
public PageSizeEnum getPageSize() {
193+
return pageSize;
194+
}
195+
196+
public void setPageSize(PageSizeEnum pageSize) {
197+
this.pageSize = pageSize;
198+
}
199+
200+
public EBookConvertOptions pageOrientation(PageOrientationEnum pageOrientation) {
201+
this.pageOrientation = pageOrientation;
202+
return this;
203+
}
204+
205+
/**
206+
* Specifies page orientation
207+
* @return pageOrientation
208+
**/
209+
@ApiModelProperty(required = true, value = "Specifies page orientation")
210+
public PageOrientationEnum getPageOrientation() {
211+
return pageOrientation;
212+
}
213+
214+
public void setPageOrientation(PageOrientationEnum pageOrientation) {
215+
this.pageOrientation = pageOrientation;
216+
}
217+
218+
219+
@Override
220+
public boolean equals(java.lang.Object o) {
221+
if (this == o) {
222+
return true;
223+
}
224+
if (o == null || getClass() != o.getClass()) {
225+
return false;
226+
}
227+
EBookConvertOptions ebookConvertOptions = (EBookConvertOptions) o;
228+
return Objects.equals(this.pageSize, ebookConvertOptions.pageSize) &&
229+
Objects.equals(this.pageOrientation, ebookConvertOptions.pageOrientation) &&
230+
super.equals(o);
231+
}
232+
233+
@Override
234+
public int hashCode() {
235+
return Objects.hash(pageSize, pageOrientation, super.hashCode());
236+
}
237+
238+
239+
@Override
240+
public String toString() {
241+
StringBuilder sb = new StringBuilder();
242+
sb.append("class EBookConvertOptions {\n");
243+
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
244+
sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n");
245+
sb.append(" pageOrientation: ").append(toIndentedString(pageOrientation)).append("\n");
246+
sb.append("}");
247+
return sb.toString();
248+
}
249+
250+
/**
251+
* Convert the given object to string with each line indented by 4 spaces
252+
* (except the first line).
253+
*/
254+
private String toIndentedString(java.lang.Object o) {
255+
if (o == null) {
256+
return "null";
257+
}
258+
return o.toString().replace("\n", "\n ");
259+
}
260+
261+
}
262+

0 commit comments

Comments
 (0)