Package 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 Description static Set<String>
REALM_EXCLUDED_ATTRIBUTES
-
Constructor Summary
Constructors Constructor Description ModelToRepresentation()
-
Method Summary
-
-
-
Method Detail
-
buildGroupPath
public static String buildGroupPath(GroupModel group)
-
groupToBriefRepresentation
public static GroupRepresentation groupToBriefRepresentation(GroupModel g)
-
toRepresentation
public static GroupRepresentation toRepresentation(GroupModel group, boolean full)
-
searchGroupsByAttributes
public static Stream<GroupRepresentation> searchGroupsByAttributes(KeycloakSession session, RealmModel realm, boolean full, Map<String,String> attributes, Integer first, Integer max)
-
searchForGroupByName
@Deprecated public static Stream<GroupRepresentation> searchForGroupByName(RealmModel realm, boolean full, String search, Integer first, Integer max)
Deprecated.
-
searchForGroupByName
public static Stream<GroupRepresentation> searchForGroupByName(KeycloakSession session, RealmModel realm, boolean full, String search, Boolean exact, 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)
-
toGroupHierarchy
@Deprecated public static GroupRepresentation toGroupHierarchy(GroupModel group, boolean full, String search)
Deprecated.
-
toGroupHierarchy
public static GroupRepresentation toGroupHierarchy(GroupModel group, boolean full, String search, Boolean exact)
-
toGroupHierarchy
public static GroupRepresentation toGroupHierarchy(GroupModel group, boolean full, Map<String,String> attributes)
-
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)
-
toBriefRepresentation
public static RealmRepresentation toBriefRepresentation(RealmModel realm)
-
toRepresentation
public static RealmRepresentation toRepresentation(KeycloakSession session, 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)
-
filterValidRepresentations
public static <M,R> Stream<R> filterValidRepresentations(Stream<M> models, Function<M,R> transformer)
Handles exceptions that occur when transforming the model to a representation and will remove all null objects from the stream. Entities that have been removed from the store or where a lazy loading exception occurs will not show up in the output stream.
-
toRepresentation
public static CredentialRepresentation toRepresentation(UserCredentialModel cred)
-
toRepresentation
public static CredentialRepresentation toRepresentation(CredentialModel cred)
-
toRepresentation
public static CredentialMetadataRepresentation toRepresentation(CredentialMetadata credentialMetadata)
-
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, ResourceServer resourceServer, AuthorizationProvider authorization)
-
toRepresentation
public static ResourceRepresentation toRepresentation(Resource model, ResourceServer 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)
-
toResourceServerRepresentation
public static ResourceServerRepresentation toResourceServerRepresentation(KeycloakSession session, ClientModel client)
-
-