org.keycloak.exportimport.util

## Class ExportUtils

- java.lang.Object
- - org.keycloak.exportimport.util.ExportUtils

-     public class ExportUtils
      extends Object

  Author:
    Marek Posolda

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExportUtils()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ClientRepresentation` | `exportClient(ClientModel client)` Full export of application including claims and secret
    `static CredentialRepresentation` | `exportCredential(UserCredentialValueModel userCred)`
    `static RealmRepresentation` | `exportRealm(KeycloakSession session, RealmModel realm, boolean includeUsers)`
    `static RoleRepresentation` | `exportRole(RoleModel role)` Full export of role including composite roles
    `static List<RoleRepresentation>` | `exportRoles(Collection<RoleModel> roles)`
    `static FederatedIdentityRepresentation` | `exportSocialLink(FederatedIdentityModel socialLink)`
    `static UserRepresentation` | `exportUser(KeycloakSession session, RealmModel realm, UserModel user)` Full export of user (including role mappings and credentials)
    `static void` | `exportUsersToStream(KeycloakSession session, RealmModel realm, List<UserModel> usersToExport, com.fasterxml.jackson.databind.ObjectMapper mapper, OutputStream os)`
    `static List<String>` | `getRoleNames(Collection<RoleModel> roles)`

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

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

- - ### Constructor Detail

    - #### ExportUtils

          public ExportUtils()

  - ### Method Detail

    - #### exportRealm

          public static RealmRepresentation exportRealm(KeycloakSession session,
                                                        RealmModel realm,
                                                        boolean includeUsers)

    - #### exportClient

          public static ClientRepresentation exportClient(ClientModel client)

      Full export of application including claims and secret
      Parameters:
        `client` -
      Returns:
        full ApplicationRepresentation

    - #### exportRoles

          public static List<RoleRepresentation> exportRoles(Collection<RoleModel> roles)

    - #### getRoleNames

          public static List<String> getRoleNames(Collection<RoleModel> roles)

    - #### exportRole

          public static RoleRepresentation exportRole(RoleModel role)

      Full export of role including composite roles
      Parameters:
        `role` -
      Returns:
        RoleRepresentation with all stuff filled (including composite roles)

    - #### exportUser

          public static UserRepresentation exportUser(KeycloakSession session,
                                                      RealmModel realm,
                                                      UserModel user)

      Full export of user (including role mappings and credentials)
      Parameters:
        `user` -
      Returns:
        fully exported user representation

    - #### exportSocialLink

          public static FederatedIdentityRepresentation exportSocialLink(FederatedIdentityModel socialLink)

    - #### exportCredential

          public static CredentialRepresentation exportCredential(UserCredentialValueModel userCred)

    - #### exportUsersToStream

          public static void exportUsersToStream(KeycloakSession session,
                                                 RealmModel realm,
                                                 List<UserModel> usersToExport,
                                                 com.fasterxml.jackson.databind.ObjectMapper mapper,
                                                 OutputStream os)
                                          throws IOException

      Throws:
        `IOException`

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