org.keycloak.models.utils

## Class ModelToRepresentation

- java.lang.Object
- - org.keycloak.models.utils.ModelToRepresentation

-     public class ModelToRepresentation
      extends Object

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Set<String>` | `REALM_EXCLUDED_ATTRIBUTES`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ModelToRepresentation()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `buildGroupPath(GroupModel group)`
    `static void` | `buildGroupPath(StringBuilder sb, GroupModel group)`
    `static void` | `exportAuthenticationFlows(RealmModel realm, RealmRepresentation rep)`
    `static void` | `exportGroups(RealmModel realm, RealmRepresentation rep)`
    `static void` | `exportRequiredActions(RealmModel realm, RealmRepresentation rep)`
    `static Stream<GroupRepresentation>` | `searchForGroupByName(RealmModel realm, boolean full, String search, Integer first, Integer max)`
    `static Stream<GroupRepresentation>` | `searchForGroupByName(UserModel user, boolean full, String search, Integer first, Integer max)`
    `static Map<String,String>` | `stripRealmAttributesIncludedAsFields(Map<String,String> attributes)`
    `static RoleRepresentation` | `toBriefRepresentation(RoleModel role)`
    `static UserRepresentation` | `toBriefRepresentation(UserModel user)`
    `static RealmEventsConfigRepresentation` | `toEventsConfigReprensetation(RealmModel realm)`
    `static GroupRepresentation` | `toGroupHierarchy(GroupModel group, boolean full)`
    `static Stream<GroupRepresentation>` | `toGroupHierarchy(RealmModel realm, boolean full)`
    `static Stream<GroupRepresentation>` | `toGroupHierarchy(RealmModel realm, boolean full, Integer first, Integer max)`
    `static Stream<GroupRepresentation>` | `toGroupHierarchy(UserModel user, boolean full)`
    `static Stream<GroupRepresentation>` | `toGroupHierarchy(UserModel user, boolean full, Integer first, Integer max)`
    `static AdminEventRepresentation` | `toRepresentation(AdminEvent adminEvent)`
    `static AuthDetailsRepresentation` | `toRepresentation(AuthDetails authDetails)`
    `static AuthenticatorConfigRepresentation` | `toRepresentation(AuthenticatorConfigModel model)`
    `static ClientRepresentation` | `toRepresentation(ClientModel clientModel, KeycloakSession session)`
    `static ClientScopeRepresentation` | `toRepresentation(ClientScopeModel clientScopeModel)`
    `static CredentialRepresentation` | `toRepresentation(CredentialModel cred)`
    `static EventRepresentation` | `toRepresentation(Event event)`
    `static FederatedIdentityRepresentation` | `toRepresentation(FederatedIdentityModel socialLink)`
    `static GroupRepresentation` | `toRepresentation(GroupModel group, boolean full)`
    `static IdentityProviderMapperRepresentation` | `toRepresentation(IdentityProviderMapperModel model)`
    `static ComponentRepresentation` | `toRepresentation(KeycloakSession session, ComponentModel component, boolean internal)`
    `static UserRepresentation` | `toRepresentation(KeycloakSession session, RealmModel realm, UserModel user)`
    `static List<ConfigPropertyRepresentation>` | `toRepresentation(List<ProviderConfigProperty> configProperties)`
    `static PermissionTicketRepresentation` | `toRepresentation(PermissionTicket ticket, AuthorizationProvider authorization)`
    `static PermissionTicketRepresentation` | `toRepresentation(PermissionTicket ticket, AuthorizationProvider authorization, boolean returnNames)`
    `static <R extends AbstractPolicyRepresentation> R` | `toRepresentation(Policy policy, AuthorizationProvider authorization)`
    `static <R extends AbstractPolicyRepresentation> R` | `toRepresentation(Policy policy, AuthorizationProvider authorization, boolean genericRepresentation, boolean export)`
    `static <R extends AbstractPolicyRepresentation> R` | `toRepresentation(Policy policy, AuthorizationProvider authorization, boolean genericRepresentation, boolean export, boolean allFields)`
    `static ProtocolMapperRepresentation` | `toRepresentation(ProtocolMapperModel model)`
    `static ConfigPropertyRepresentation` | `toRepresentation(ProviderConfigProperty prop)`
    `static AuthenticationExecutionExportRepresentation` | `toRepresentation(RealmModel realm, AuthenticationExecutionModel model)`
    `static AuthenticationFlowRepresentation` | `toRepresentation(RealmModel realm, AuthenticationFlowModel model)`
    `static RealmRepresentation` | `toRepresentation(RealmModel realm, boolean internal)`
    `static IdentityProviderRepresentation` | `toRepresentation(RealmModel realm, IdentityProviderModel identityProviderModel)`
    `static RequiredActionProviderRepresentation` | `toRepresentation(RequiredActionProviderModel model)`
    `static ResourceServerRepresentation` | `toRepresentation(ResourceServer model, ClientModel client)`
    `static ResourceRepresentation` | `toRepresentation(Resource model, String resourceServer, AuthorizationProvider authorization)`
    `static ResourceRepresentation` | `toRepresentation(Resource model, String resourceServer, AuthorizationProvider authorization, Boolean deep)`
    `static RoleRepresentation` | `toRepresentation(RoleModel role)`
    `static ScopeRepresentation` | `toRepresentation(Scope model)`
    `static UserConsentRepresentation` | `toRepresentation(UserConsentModel model)`
    `static CredentialRepresentation` | `toRepresentation(UserCredentialModel cred)`
    `static UserSessionRepresentation` | `toRepresentation(UserSessionModel session)`
    `static ComponentRepresentation` | `toRepresentationWithoutConfig(ComponentModel component)`

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

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

- - ### Field Detail

    - #### REALM_EXCLUDED_ATTRIBUTES

          public static Set<String> REALM_EXCLUDED_ATTRIBUTES

  - ### Constructor Detail

    - #### ModelToRepresentation

          public ModelToRepresentation()

  - ### Method Detail

    - #### buildGroupPath

          public static void buildGroupPath(StringBuilder sb,
                                            GroupModel group)

    - #### buildGroupPath

          public static String buildGroupPath(GroupModel group)

    - #### toRepresentation

          public static GroupRepresentation toRepresentation(GroupModel group,
                                                             boolean full)

    - #### searchForGroupByName

          public static Stream<GroupRepresentation> searchForGroupByName(RealmModel realm,
                                                                         boolean full,
                                                                         String search,
                                                                         Integer first,
                                                                         Integer max)

    - #### searchForGroupByName

          public static Stream<GroupRepresentation> searchForGroupByName(UserModel user,
                                                                         boolean full,
                                                                         String search,
                                                                         Integer first,
                                                                         Integer max)

    - #### toGroupHierarchy

          public static Stream<GroupRepresentation> toGroupHierarchy(RealmModel realm,
                                                                     boolean full,
                                                                     Integer first,
                                                                     Integer max)

    - #### toGroupHierarchy

          public static Stream<GroupRepresentation> toGroupHierarchy(UserModel user,
                                                                     boolean full,
                                                                     Integer first,
                                                                     Integer max)

    - #### toGroupHierarchy

          public static Stream<GroupRepresentation> toGroupHierarchy(RealmModel realm,
                                                                     boolean full)

    - #### toGroupHierarchy

          public static Stream<GroupRepresentation> toGroupHierarchy(UserModel user,
                                                                     boolean full)

    - #### toGroupHierarchy

          public static GroupRepresentation toGroupHierarchy(GroupModel group,
                                                             boolean full)

    - #### toRepresentation

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

    - #### toBriefRepresentation

          public static UserRepresentation toBriefRepresentation(UserModel user)

    - #### toRepresentation

          public static EventRepresentation toRepresentation(Event event)

    - #### toRepresentation

          public static AdminEventRepresentation toRepresentation(AdminEvent adminEvent)

    - #### toRepresentation

          public static AuthDetailsRepresentation toRepresentation(AuthDetails authDetails)

    - #### toRepresentation

          public static RoleRepresentation toRepresentation(RoleModel role)

    - #### toBriefRepresentation

          public static RoleRepresentation toBriefRepresentation(RoleModel role)

    - #### toRepresentation

          public static RealmRepresentation toRepresentation(RealmModel realm,
                                                             boolean internal)

    - #### stripRealmAttributesIncludedAsFields

          public static Map<String,String> stripRealmAttributesIncludedAsFields(Map<String,String> attributes)

    - #### exportGroups

          public static void exportGroups(RealmModel realm,
                                          RealmRepresentation rep)

    - #### exportAuthenticationFlows

          public static void exportAuthenticationFlows(RealmModel realm,
                                                       RealmRepresentation rep)

    - #### exportRequiredActions

          public static void exportRequiredActions(RealmModel realm,
                                                   RealmRepresentation rep)

    - #### toEventsConfigReprensetation

          public static RealmEventsConfigRepresentation toEventsConfigReprensetation(RealmModel realm)

    - #### toRepresentation

          public static CredentialRepresentation toRepresentation(UserCredentialModel cred)

    - #### toRepresentation

          public static CredentialRepresentation toRepresentation(CredentialModel cred)

    - #### toRepresentation

          public static FederatedIdentityRepresentation toRepresentation(FederatedIdentityModel socialLink)

    - #### toRepresentation

          public static UserSessionRepresentation toRepresentation(UserSessionModel session)

    - #### toRepresentation

          public static ClientScopeRepresentation toRepresentation(ClientScopeModel clientScopeModel)

    - #### toRepresentation

          public static ClientRepresentation toRepresentation(ClientModel clientModel,
                                                              KeycloakSession session)

    - #### toRepresentation

          public static IdentityProviderRepresentation toRepresentation(RealmModel realm,
                                                                        IdentityProviderModel identityProviderModel)

    - #### toRepresentation

          public static ProtocolMapperRepresentation toRepresentation(ProtocolMapperModel model)

    - #### toRepresentation

          public static IdentityProviderMapperRepresentation toRepresentation(IdentityProviderMapperModel model)

    - #### toRepresentation

          public static UserConsentRepresentation toRepresentation(UserConsentModel model)

    - #### toRepresentation

          public static AuthenticationFlowRepresentation toRepresentation(RealmModel realm,
                                                                          AuthenticationFlowModel model)

    - #### toRepresentation

          public static AuthenticationExecutionExportRepresentation toRepresentation(RealmModel realm,
                                                                                     AuthenticationExecutionModel model)

    - #### toRepresentation

          public static AuthenticatorConfigRepresentation toRepresentation(AuthenticatorConfigModel model)

    - #### toRepresentation

          public static RequiredActionProviderRepresentation toRepresentation(RequiredActionProviderModel model)

    - #### toRepresentation

          public static List<ConfigPropertyRepresentation> toRepresentation(List<ProviderConfigProperty> configProperties)

    - #### toRepresentation

          public static ConfigPropertyRepresentation toRepresentation(ProviderConfigProperty prop)

    - #### toRepresentation

          public static ComponentRepresentation toRepresentation(KeycloakSession session,
                                                                 ComponentModel component,
                                                                 boolean internal)

    - #### toRepresentationWithoutConfig

          public static ComponentRepresentation toRepresentationWithoutConfig(ComponentModel component)

    - #### toRepresentation

          public static ScopeRepresentation toRepresentation(Scope model)

    - #### toRepresentation

          public static ResourceServerRepresentation toRepresentation(ResourceServer model,
                                                                      ClientModel client)

    - #### toRepresentation

          public static <R extends AbstractPolicyRepresentation> R toRepresentation(Policy policy,
                                                                                    AuthorizationProvider authorization)

    - #### toRepresentation

          public static <R extends AbstractPolicyRepresentation> R toRepresentation(Policy policy,
                                                                                    AuthorizationProvider authorization,
                                                                                    boolean genericRepresentation,
                                                                                    boolean export)

    - #### toRepresentation

          public static <R extends AbstractPolicyRepresentation> R toRepresentation(Policy policy,
                                                                                    AuthorizationProvider authorization,
                                                                                    boolean genericRepresentation,
                                                                                    boolean export,
                                                                                    boolean allFields)

    - #### toRepresentation

          public static ResourceRepresentation toRepresentation(Resource model,
                                                                String resourceServer,
                                                                AuthorizationProvider authorization)

    - #### toRepresentation

          public static ResourceRepresentation toRepresentation(Resource model,
                                                                String resourceServer,
                                                                AuthorizationProvider authorization,
                                                                Boolean deep)

    - #### toRepresentation

          public static PermissionTicketRepresentation toRepresentation(PermissionTicket ticket,
                                                                        AuthorizationProvider authorization)

    - #### toRepresentation

          public static PermissionTicketRepresentation toRepresentation(PermissionTicket ticket,
                                                                        AuthorizationProvider authorization,
                                                                        boolean returnNames)

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