public class ImportUtils extends Object
Constructor and Description |
---|
ImportUtils() |
Modifier and Type | Method and Description |
---|---|
static Map<String,RealmRepresentation> |
getRealmsFromStream(com.fasterxml.jackson.databind.ObjectMapper mapper,
InputStream is) |
static void |
importFederatedUsersFromStream(KeycloakSession session,
String realmName,
com.fasterxml.jackson.databind.ObjectMapper mapper,
InputStream is) |
static void |
importFromStream(KeycloakSession session,
com.fasterxml.jackson.databind.ObjectMapper mapper,
InputStream is,
Strategy strategy)
Fully import realm (or more realms from particular stream)
|
static boolean |
importRealm(KeycloakSession session,
RealmRepresentation rep,
Strategy strategy,
boolean skipUserDependent)
Fully import realm from representation, save it to model and return model of newly created realm
|
static void |
importRealms(KeycloakSession session,
Collection<RealmRepresentation> realms,
Strategy strategy) |
static void |
importUsersFromStream(KeycloakSession session,
String realmName,
com.fasterxml.jackson.databind.ObjectMapper mapper,
InputStream is) |
public static void importRealms(KeycloakSession session, Collection<RealmRepresentation> realms, Strategy strategy)
public static boolean importRealm(KeycloakSession session, RealmRepresentation rep, Strategy strategy, boolean skipUserDependent)
session
- rep
- strategy
- specifies whether to overwrite or ignore existing realm or user entriesskipUserDependent
- If true, then import of any models, which needs users already imported in DB, will be skipped. For example authorizationpublic static void importFromStream(KeycloakSession session, com.fasterxml.jackson.databind.ObjectMapper mapper, InputStream is, Strategy strategy) throws IOException
session
- mapper
- is
- strategy
- IOException
public static Map<String,RealmRepresentation> getRealmsFromStream(com.fasterxml.jackson.databind.ObjectMapper mapper, InputStream is) throws IOException
IOException
public static void importUsersFromStream(KeycloakSession session, String realmName, com.fasterxml.jackson.databind.ObjectMapper mapper, InputStream is) throws IOException
IOException
public static void importFederatedUsersFromStream(KeycloakSession session, String realmName, com.fasterxml.jackson.databind.ObjectMapper mapper, InputStream is) throws IOException
IOException
Copyright © 2021 JBoss by Red Hat. All rights reserved.