42
42
import io .apicurio .registry .storage .error .VersionNotFoundException ;
43
43
import io .apicurio .registry .storage .impexp .EntityInputStream ;
44
44
import io .apicurio .registry .types .RuleType ;
45
- import io .apicurio .registry .utils .impexp .ArtifactEntity ;
46
- import io .apicurio .registry .utils .impexp .ArtifactRuleEntity ;
47
- import io .apicurio .registry .utils .impexp .ArtifactVersionEntity ;
48
- import io .apicurio .registry .utils .impexp .BranchEntity ;
49
- import io .apicurio .registry .utils .impexp .CommentEntity ;
50
- import io .apicurio .registry .utils .impexp .ContentEntity ;
51
45
import io .apicurio .registry .utils .impexp .Entity ;
52
- import io .apicurio .registry .utils .impexp .GlobalRuleEntity ;
53
- import io .apicurio .registry .utils .impexp .GroupEntity ;
54
- import io .apicurio .registry .utils .impexp .GroupRuleEntity ;
46
+ import io .apicurio .registry .utils .impexp .v3 .ArtifactEntity ;
47
+ import io .apicurio .registry .utils .impexp .v3 .ArtifactRuleEntity ;
48
+ import io .apicurio .registry .utils .impexp .v3 .ArtifactVersionEntity ;
49
+ import io .apicurio .registry .utils .impexp .v3 .BranchEntity ;
50
+ import io .apicurio .registry .utils .impexp .v3 .CommentEntity ;
51
+ import io .apicurio .registry .utils .impexp .v3 .ContentEntity ;
52
+ import io .apicurio .registry .utils .impexp .v3 .GlobalRuleEntity ;
53
+ import io .apicurio .registry .utils .impexp .v3 .GroupEntity ;
54
+ import io .apicurio .registry .utils .impexp .v3 .GroupRuleEntity ;
55
55
import org .apache .commons .lang3 .tuple .Pair ;
56
56
57
57
import java .time .Instant ;
@@ -248,7 +248,7 @@ void updateArtifactMetaData(String groupId, String artifactId, EditableArtifactM
248
248
249
249
/**
250
250
* Get all rules configured for a group.
251
- *
251
+ *
252
252
* @param groupId
253
253
* @throws GroupNotFoundException
254
254
* @throws RegistryStorageException
@@ -257,7 +257,7 @@ void updateArtifactMetaData(String groupId, String artifactId, EditableArtifactM
257
257
258
258
/**
259
259
* Create/configure a rule for a group.
260
- *
260
+ *
261
261
* @param groupId
262
262
* @param rule
263
263
* @param config
@@ -270,7 +270,7 @@ void createGroupRule(String groupId, RuleType rule, RuleConfigurationDto config)
270
270
271
271
/**
272
272
* Delete all rules configured for a group.
273
- *
273
+ *
274
274
* @param groupId
275
275
* @throws GroupNotFoundException
276
276
* @throws RegistryStorageException
@@ -279,7 +279,7 @@ void createGroupRule(String groupId, RuleType rule, RuleConfigurationDto config)
279
279
280
280
/**
281
281
* Update the configuration for a specific rule in a group.
282
- *
282
+ *
283
283
* @param groupId
284
284
* @param rule
285
285
* @param config
@@ -292,7 +292,7 @@ void updateGroupRule(String groupId, RuleType rule, RuleConfigurationDto config)
292
292
293
293
/**
294
294
* Delete (unconfigure) a single rule for a group.
295
- *
295
+ *
296
296
* @param groupId
297
297
* @param rule
298
298
* @throws GroupNotFoundException
@@ -304,7 +304,7 @@ void deleteGroupRule(String groupId, RuleType rule)
304
304
305
305
/**
306
306
* Gets the current configuration of a single rule in the group.
307
- *
307
+ *
308
308
* @param groupId
309
309
* @param rule
310
310
* @throws GroupNotFoundException
@@ -625,6 +625,19 @@ void updateGlobalRule(RuleType rule, RuleConfigurationDto config)
625
625
void importData (EntityInputStream entities , boolean preserveGlobalId , boolean preserveContentId )
626
626
throws RegistryStorageException ;
627
627
628
+ /**
629
+ * Called to upgrade and import previously exported data into the registry. It upgrades the data structure
630
+ * from v2 to v3 and imports the data into Registry.
631
+ *
632
+ * @param entities
633
+ * @param preserveGlobalId Preserve global ids. If false, global ids will be set to next id in global id
634
+ * sequence.
635
+ * @param preserveContentId Preserve content id. If false, content ids will be set to the next ids in the
636
+ * content id sequence. Content-Version mapping will be preserved.
637
+ * @throws RegistryStorageException
638
+ */
639
+ void upgradeData (EntityInputStream entities , boolean preserveGlobalId , boolean preserveContentId );
640
+
628
641
/**
629
642
* Counts the total number of artifacts in the registry.
630
643
*
0 commit comments