Skip to content

Commit ec76a07

Browse files
committed
new version
1 parent afc4ddc commit ec76a07

15 files changed

+2571
-64
lines changed

src/main/java/org/databunker/DatabunkerproApi.java

Lines changed: 563 additions & 64 deletions
Large diffs are not rendered by default.
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
package org.databunker.options;
2+
3+
/**
4+
* Agreement accept options class for accepting agreements
5+
*/
6+
public class AgreementAcceptOptions {
7+
private final String agreementmethod;
8+
private final String referencecode;
9+
private final String starttime;
10+
private final String finaltime;
11+
private final String status;
12+
private final String lastmodifiedby;
13+
14+
private AgreementAcceptOptions(Builder builder) {
15+
this.agreementmethod = builder.agreementmethod;
16+
this.referencecode = builder.referencecode;
17+
this.starttime = builder.starttime;
18+
this.finaltime = builder.finaltime;
19+
this.status = builder.status;
20+
this.lastmodifiedby = builder.lastmodifiedby;
21+
}
22+
23+
/**
24+
* Method of agreement (e.g., 'web-form', 'checkbox', 'signature')
25+
* @return The agreement method
26+
*/
27+
public String getAgreementmethod() {
28+
return agreementmethod;
29+
}
30+
31+
/**
32+
* External reference code or identifier for this acceptance
33+
* @return The reference code
34+
*/
35+
public String getReferencecode() {
36+
return referencecode;
37+
}
38+
39+
/**
40+
* Start time of the agreement validity (ISO 8601 format)
41+
* @return The start time
42+
*/
43+
public String getStarttime() {
44+
return starttime;
45+
}
46+
47+
/**
48+
* End time of the agreement validity (ISO 8601 format)
49+
* @return The final time
50+
*/
51+
public String getFinaltime() {
52+
return finaltime;
53+
}
54+
55+
/**
56+
* Status of the agreement (e.g., 'pending', 'active', 'expired')
57+
* @return The status
58+
*/
59+
public String getStatus() {
60+
return status;
61+
}
62+
63+
/**
64+
* Identifier of the person/system that last modified this agreement
65+
* @return The last modified by identifier
66+
*/
67+
public String getLastmodifiedby() {
68+
return lastmodifiedby;
69+
}
70+
71+
/**
72+
* Builder class for AgreementAcceptOptions
73+
*/
74+
public static class Builder {
75+
private String agreementmethod;
76+
private String referencecode;
77+
private String starttime;
78+
private String finaltime;
79+
private String status;
80+
private String lastmodifiedby;
81+
82+
public Builder agreementmethod(String agreementmethod) {
83+
this.agreementmethod = agreementmethod;
84+
return this;
85+
}
86+
87+
public Builder referencecode(String referencecode) {
88+
this.referencecode = referencecode;
89+
return this;
90+
}
91+
92+
public Builder starttime(String starttime) {
93+
this.starttime = starttime;
94+
return this;
95+
}
96+
97+
public Builder finaltime(String finaltime) {
98+
this.finaltime = finaltime;
99+
return this;
100+
}
101+
102+
public Builder status(String status) {
103+
this.status = status;
104+
return this;
105+
}
106+
107+
public Builder lastmodifiedby(String lastmodifiedby) {
108+
this.lastmodifiedby = lastmodifiedby;
109+
return this;
110+
}
111+
112+
public AgreementAcceptOptions build() {
113+
return new AgreementAcceptOptions(this);
114+
}
115+
}
116+
117+
/**
118+
* Creates a new builder for AgreementAcceptOptions
119+
* @return A new builder instance
120+
*/
121+
public static Builder builder() {
122+
return new Builder();
123+
}
124+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
package org.databunker.options;
2+
3+
/**
4+
* Basic options class for time-based operations
5+
*/
6+
public class BasicOptions {
7+
private final String finaltime;
8+
private final String slidingtime;
9+
10+
private BasicOptions(Builder builder) {
11+
this.finaltime = builder.finaltime;
12+
this.slidingtime = builder.slidingtime;
13+
}
14+
15+
/**
16+
* Absolute expiration time for the operation
17+
* @return The final time as a string (e.g., "100d", "1h")
18+
*/
19+
public String getFinaltime() {
20+
return finaltime;
21+
}
22+
23+
/**
24+
* Sliding time period for the operation
25+
* @return The sliding time as a string (e.g., "30d", "1h")
26+
*/
27+
public String getSlidingtime() {
28+
return slidingtime;
29+
}
30+
31+
/**
32+
* Builder class for BasicOptions
33+
*/
34+
public static class Builder {
35+
private String finaltime;
36+
private String slidingtime;
37+
38+
public Builder finaltime(String finaltime) {
39+
this.finaltime = finaltime;
40+
return this;
41+
}
42+
43+
public Builder slidingtime(String slidingtime) {
44+
this.slidingtime = slidingtime;
45+
return this;
46+
}
47+
48+
public BasicOptions build() {
49+
return new BasicOptions(this);
50+
}
51+
}
52+
53+
/**
54+
* Creates a new builder for BasicOptions
55+
* @return A new builder instance
56+
*/
57+
public static Builder builder() {
58+
return new Builder();
59+
}
60+
}
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
package org.databunker.options;
2+
3+
/**
4+
* Connector options class for connector configuration
5+
*/
6+
public class ConnectorOptions {
7+
private final Object connectorid; // Can be String or Number
8+
private final String connectorname;
9+
private final String connectortype;
10+
private final String apikey;
11+
private final String username;
12+
private final String connectordesc;
13+
private final String dbhost;
14+
private final Integer dbport;
15+
private final String dbname;
16+
private final String tablename;
17+
private final String status;
18+
19+
private ConnectorOptions(Builder builder) {
20+
this.connectorid = builder.connectorid;
21+
this.connectorname = builder.connectorname;
22+
this.connectortype = builder.connectortype;
23+
this.apikey = builder.apikey;
24+
this.username = builder.username;
25+
this.connectordesc = builder.connectordesc;
26+
this.dbhost = builder.dbhost;
27+
this.dbport = builder.dbport;
28+
this.dbname = builder.dbname;
29+
this.tablename = builder.tablename;
30+
this.status = builder.status;
31+
}
32+
33+
/**
34+
* Connector ID
35+
* @return The connector ID (String or Number)
36+
*/
37+
public Object getConnectorid() {
38+
return connectorid;
39+
}
40+
41+
/**
42+
* Connector name
43+
* @return The connector name
44+
*/
45+
public String getConnectorname() {
46+
return connectorname;
47+
}
48+
49+
/**
50+
* Connector type
51+
* @return The connector type
52+
*/
53+
public String getConnectortype() {
54+
return connectortype;
55+
}
56+
57+
/**
58+
* API key for the connector
59+
* @return The API key
60+
*/
61+
public String getApikey() {
62+
return apikey;
63+
}
64+
65+
/**
66+
* Username for the connector
67+
* @return The username
68+
*/
69+
public String getUsername() {
70+
return username;
71+
}
72+
73+
/**
74+
* Connector description
75+
* @return The connector description
76+
*/
77+
public String getConnectordesc() {
78+
return connectordesc;
79+
}
80+
81+
/**
82+
* Database host
83+
* @return The database host
84+
*/
85+
public String getDbhost() {
86+
return dbhost;
87+
}
88+
89+
/**
90+
* Database port
91+
* @return The database port
92+
*/
93+
public Integer getDbport() {
94+
return dbport;
95+
}
96+
97+
/**
98+
* Database name
99+
* @return The database name
100+
*/
101+
public String getDbname() {
102+
return dbname;
103+
}
104+
105+
/**
106+
* Table name
107+
* @return The table name
108+
*/
109+
public String getTablename() {
110+
return tablename;
111+
}
112+
113+
/**
114+
* Status of the connector
115+
* @return The status
116+
*/
117+
public String getStatus() {
118+
return status;
119+
}
120+
121+
/**
122+
* Builder class for ConnectorOptions
123+
*/
124+
public static class Builder {
125+
private Object connectorid;
126+
private String connectorname;
127+
private String connectortype;
128+
private String apikey;
129+
private String username;
130+
private String connectordesc;
131+
private String dbhost;
132+
private Integer dbport;
133+
private String dbname;
134+
private String tablename;
135+
private String status;
136+
137+
public Builder connectorid(String connectorid) {
138+
this.connectorid = connectorid;
139+
return this;
140+
}
141+
142+
public Builder connectorid(Integer connectorid) {
143+
this.connectorid = connectorid;
144+
return this;
145+
}
146+
147+
public Builder connectorname(String connectorname) {
148+
this.connectorname = connectorname;
149+
return this;
150+
}
151+
152+
public Builder connectortype(String connectortype) {
153+
this.connectortype = connectortype;
154+
return this;
155+
}
156+
157+
public Builder apikey(String apikey) {
158+
this.apikey = apikey;
159+
return this;
160+
}
161+
162+
public Builder username(String username) {
163+
this.username = username;
164+
return this;
165+
}
166+
167+
public Builder connectordesc(String connectordesc) {
168+
this.connectordesc = connectordesc;
169+
return this;
170+
}
171+
172+
public Builder dbhost(String dbhost) {
173+
this.dbhost = dbhost;
174+
return this;
175+
}
176+
177+
public Builder dbport(Integer dbport) {
178+
this.dbport = dbport;
179+
return this;
180+
}
181+
182+
public Builder dbname(String dbname) {
183+
this.dbname = dbname;
184+
return this;
185+
}
186+
187+
public Builder tablename(String tablename) {
188+
this.tablename = tablename;
189+
return this;
190+
}
191+
192+
public Builder status(String status) {
193+
this.status = status;
194+
return this;
195+
}
196+
197+
public ConnectorOptions build() {
198+
return new ConnectorOptions(this);
199+
}
200+
}
201+
202+
/**
203+
* Creates a new builder for ConnectorOptions
204+
* @return A new builder instance
205+
*/
206+
public static Builder builder() {
207+
return new Builder();
208+
}
209+
}

0 commit comments

Comments
 (0)