Skip to content

Commit d044faa

Browse files
authored
Merge branch 'main' into snyk-upgrade-0465d9ab590d4ae1fa5da79f10860705
2 parents 07f499b + 1c7fb76 commit d044faa

9 files changed

Lines changed: 408 additions & 543 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ Then add the dependency to your `pom.xml`:
9999
- **Wrapping Key Generation**: Generate wrapping keys from Shamir's Secret Sharing keys
100100
- **Typed Patch Operations**: Use structured `PatchOperation` objects for user updates
101101
- **Bulk Token Operations**: Create multiple tokens efficiently with typed options
102+
- **Bulk User Deletion**: Delete multiple users efficiently in a single operation
103+
- **License Key Management**: Set system license keys for enhanced functionality
102104
- **Shared Record Management**: Create and retrieve shared records with partner organizations
103105

104106
### Improved Error Handling
@@ -185,6 +187,10 @@ System.out.println("Generated wrapping key: " + wrappingKey.get("wrappingkey"));
185187
// Get system metrics
186188
Map<String, Object> metrics = api.getSystemMetrics(null);
187189
System.out.println("System metrics: " + metrics);
190+
191+
// Set system license key
192+
Map<String, Object> licenseResult = api.setLicenseKey("your-license-key", null);
193+
System.out.println("License key setting result: " + licenseResult.get("status"));
188194
```
189195

190196
### Token Management

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
<dependency>
2525
<groupId>org.apache.httpcomponents</groupId>
2626
<artifactId>httpclient</artifactId>
27-
<version>4.5.13</version>
27+
<version>4.5.14</version>
2828
</dependency>
2929

3030
<!-- Apache HttpCore -->
3131
<dependency>
3232
<groupId>org.apache.httpcomponents</groupId>
3333
<artifactId>httpcore</artifactId>
34-
<version>4.4.15</version>
34+
<version>4.4.16</version>
3535
</dependency>
3636

3737
<!-- Jackson for JSON processing -->

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

Lines changed: 327 additions & 195 deletions
Large diffs are not rendered by default.

src/main/java/org/databunker/examples/TypedOptionsExample.java

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import org.databunker.options.SharedRecordOptions;
77
import org.databunker.options.LegalBasisOptions;
88
import org.databunker.options.AgreementAcceptOptions;
9-
import org.databunker.options.ConnectorOptions;
109
import org.databunker.options.TenantOptions;
1110
import org.databunker.options.ProcessingActivityOptions;
1211
import org.databunker.options.GroupOptions;
@@ -103,25 +102,8 @@ public static void main(String[] args) {
103102

104103
Map<String, Object> agreement = api.acceptAgreement("email", "user@example.com", "marketing-consent", agreementOptions, null);
105104
System.out.println("Accepted agreement: " + agreement.get("status"));
106-
107-
// Example 7: Create connector with typed ConnectorOptions
108-
ConnectorOptions connectorOptions = ConnectorOptions.builder()
109-
.connectorname("my-connector")
110-
.connectortype("mysql")
111-
.apikey("api-key-123")
112-
.username("dbuser")
113-
.connectordesc("MySQL database connector")
114-
.dbhost("localhost")
115-
.dbport(3306)
116-
.dbname("mydb")
117-
.tablename("users")
118-
.status("active")
119-
.build();
120-
121-
Map<String, Object> connector = api.createConnector(connectorOptions, null);
122-
System.out.println("Created connector: " + connector.get("connectorid"));
123-
124-
// Example 8: Create processing activity with typed ProcessingActivityOptions
105+
106+
// Example 7: Create processing activity with typed ProcessingActivityOptions
125107
ProcessingActivityOptions activityOptions = ProcessingActivityOptions.builder()
126108
.activity("data-processing")
127109
.title("Data Processing Activity")

src/main/java/org/databunker/options/ConnectorOptions.java

Lines changed: 0 additions & 209 deletions
This file was deleted.

src/main/java/org/databunker/options/OptionsConverter.java

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -146,51 +146,6 @@ public static Map<String, Object> toMap(AgreementAcceptOptions options) {
146146
return map;
147147
}
148148

149-
/**
150-
* Converts ConnectorOptions to Map&lt;String, Object&gt;
151-
* @param options The ConnectorOptions object
152-
* @return A Map representation of the options
153-
*/
154-
public static Map<String, Object> toMap(ConnectorOptions options) {
155-
Map<String, Object> map = new HashMap<>();
156-
if (options != null) {
157-
if (options.getConnectorid() != null) {
158-
map.put("connectorid", options.getConnectorid());
159-
}
160-
if (options.getConnectorname() != null) {
161-
map.put("connectorname", options.getConnectorname());
162-
}
163-
if (options.getConnectortype() != null) {
164-
map.put("connectortype", options.getConnectortype());
165-
}
166-
if (options.getApikey() != null) {
167-
map.put("apikey", options.getApikey());
168-
}
169-
if (options.getUsername() != null) {
170-
map.put("username", options.getUsername());
171-
}
172-
if (options.getConnectordesc() != null) {
173-
map.put("connectordesc", options.getConnectordesc());
174-
}
175-
if (options.getDbhost() != null) {
176-
map.put("dbhost", options.getDbhost());
177-
}
178-
if (options.getDbport() != null) {
179-
map.put("dbport", options.getDbport());
180-
}
181-
if (options.getDbname() != null) {
182-
map.put("dbname", options.getDbname());
183-
}
184-
if (options.getTablename() != null) {
185-
map.put("tablename", options.getTablename());
186-
}
187-
if (options.getStatus() != null) {
188-
map.put("status", options.getStatus());
189-
}
190-
}
191-
return map;
192-
}
193-
194149
/**
195150
* Converts TenantOptions to Map&lt;String, Object&gt;
196151
* @param options The TenantOptions object

src/main/java/org/databunker/options/README.md

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -82,24 +82,6 @@ AgreementAcceptOptions options = AgreementAcceptOptions.builder()
8282
.build();
8383
```
8484

85-
### ConnectorOptions
86-
Used for configuring database and API connectors.
87-
88-
```java
89-
ConnectorOptions options = ConnectorOptions.builder()
90-
.connectorname("my-connector")
91-
.connectortype("mysql")
92-
.apikey("api-key-123")
93-
.username("dbuser")
94-
.connectordesc("MySQL database connector")
95-
.dbhost("localhost")
96-
.dbport(3306)
97-
.dbname("mydb")
98-
.tablename("users")
99-
.status("active")
100-
.build();
101-
```
102-
10385
### TenantOptions
10486
Used for creating and managing tenants.
10587

@@ -273,25 +255,6 @@ AgreementAcceptOptions options = AgreementAcceptOptions.builder()
273255
Map<String, Object> agreement = api.acceptAgreement("email", "user@example.com", "marketing-consent", options, null);
274256
```
275257

276-
### Creating Connectors with Typed Options
277-
278-
```java
279-
ConnectorOptions options = ConnectorOptions.builder()
280-
.connectorname("my-connector")
281-
.connectortype("mysql")
282-
.apikey("api-key-123")
283-
.username("dbuser")
284-
.connectordesc("MySQL database connector")
285-
.dbhost("localhost")
286-
.dbport(3306)
287-
.dbname("mydb")
288-
.tablename("users")
289-
.status("active")
290-
.build();
291-
292-
Map<String, Object> connector = api.createConnector(options, null);
293-
```
294-
295258
### Creating Processing Activities with Typed Options
296259

297260
```java
@@ -406,7 +369,6 @@ Map<String, Object> mapOptions = OptionsConverter.toMap(userOptions);
406369
## Future Enhancements
407370

408371
Additional option classes can be added for:
409-
- ConnectorOptions
410372
- LegalBasisOptions
411373
- ProcessingActivityOptions
412374
- TenantOptions

0 commit comments

Comments
 (0)