org.keycloak.exportimport.singlefile

## Class SingleFileImportProvider

- java.lang.Object
- - org.keycloak.exportimport.singlefile.SingleFileImportProvider

- All Implemented Interfaces:
    ImportProvider, Provider

      public class SingleFileImportProvider
      extends Object
      implements ImportProvider

  Author:
    Marek Posolda

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Map<String,RealmRepresentation>` | `realmReps`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SingleFileImportProvider(File file)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `checkRealmReps()`
    `void` | `close()`
    `void` | `importModel(KeycloakSessionFactory factory, Strategy strategy)`
    `void` | `importRealm(KeycloakSessionFactory factory, String realmName, Strategy strategy)`
    `boolean` | `isMasterRealmExported()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### realmReps

          protected Map<String,RealmRepresentation> realmReps

  - ### Constructor Detail

    - #### SingleFileImportProvider

          public SingleFileImportProvider(File file)

  - ### Method Detail

    - #### importModel

          public void importModel(KeycloakSessionFactory factory,
                                  Strategy strategy)
                           throws IOException

      Specified by:
        `importModel` in interface `ImportProvider`
      Throws:
        `IOException`

    - #### isMasterRealmExported

          public boolean isMasterRealmExported()
                                        throws IOException

      Specified by:
        `isMasterRealmExported` in interface `ImportProvider`
      Returns:
        true if master realm was previously exported and is available in the data to be imported
      Throws:
        `IOException`

    - #### checkRealmReps

          protected void checkRealmReps()
                                 throws IOException

      Throws:
        `IOException`

    - #### importRealm

          public void importRealm(KeycloakSessionFactory factory,
                                  String realmName,
                                  Strategy strategy)
                           throws IOException

      Specified by:
        `importRealm` in interface `ImportProvider`
      Throws:
        `IOException`

    - #### close

          public void close()

      Specified by:
        `close` in interface `Provider`

Copyright © 2021 JBoss by Red Hat. All rights reserved.