Package org.keycloak.partialimport
Interface PartialImport<T>
- All Known Implementing Classes:
AbstractPartialImport
,ClientsPartialImport
,GroupsPartialImport
,IdentityProviderMappersPartialImport
,IdentityProvidersPartialImport
,RealmRolesPartialImport
,RolesPartialImport
,UsersPartialImport
public interface PartialImport<T>
Main interface for PartialImport handlers.
- Author:
- Stan Silvert ssilvert@redhat.com (C) 2016 Red Hat Inc.
-
Method Summary
Modifier and TypeMethodDescriptiondoImport
(PartialImportRepresentation rep, RealmModel realm, KeycloakSession session) Create (or re-create) all the imported resources.void
prepare
(PartialImportRepresentation rep, RealmModel realm, KeycloakSession session) Find which resources will need to be skipped or overwritten.void
removeOverwrites
(RealmModel realm, KeycloakSession session) Delete resources that will be overwritten.
-
Method Details
-
prepare
Find which resources will need to be skipped or overwritten. Also, do a preliminary check for errors.- Parameters:
rep
- Everything in the PartialImport request.realm
- Realm to be imported into.session
- The KeycloakSession.
-
removeOverwrites
Delete resources that will be overwritten. This is done separately so that it can be called for all resource types before calling all the doImports. It was found that doing delete/add per resource causes errors because of cascading deletes.- Parameters:
realm
- Realm to be imported into.session
- The KeycloakSession
-
doImport
PartialImportResults doImport(PartialImportRepresentation rep, RealmModel realm, KeycloakSession session) Create (or re-create) all the imported resources.- Parameters:
rep
- Everything in the PartialImport request.realm
- Realm to be imported into.session
- The KeycloakSession.- Returns:
- The final results of the PartialImport request.
-