Interface RealmModel

All Superinterfaces:
RoleContainerModel
All Known Subinterfaces:
CachedRealmModel, StorageProviderRealmModel
All Known Implementing Classes:
RealmAdapter, RealmAdapter, RealmModelDelegate

public interface RealmModel extends RoleContainerModel
Version:
$Revision: 1 $
Author:
Bill Burke
  • Field Details

  • Method Details

    • getId

      String getId()
      Specified by:
      getId in interface RoleContainerModel
    • getName

      String getName()
    • setName

      void setName(String name)
    • getDisplayName

      String getDisplayName()
    • setDisplayName

      void setDisplayName(String displayName)
    • getDisplayNameHtml

      String getDisplayNameHtml()
    • setDisplayNameHtml

      void setDisplayNameHtml(String displayNameHtml)
    • isEnabled

      boolean isEnabled()
    • setEnabled

      void setEnabled(boolean enabled)
    • getSslRequired

      SslRequired getSslRequired()
    • setSslRequired

      void setSslRequired(SslRequired sslRequired)
    • isRegistrationAllowed

      boolean isRegistrationAllowed()
    • setRegistrationAllowed

      void setRegistrationAllowed(boolean registrationAllowed)
    • isRegistrationEmailAsUsername

      boolean isRegistrationEmailAsUsername()
    • setRegistrationEmailAsUsername

      void setRegistrationEmailAsUsername(boolean registrationEmailAsUsername)
    • isRememberMe

      boolean isRememberMe()
    • setRememberMe

      void setRememberMe(boolean rememberMe)
    • isEditUsernameAllowed

      boolean isEditUsernameAllowed()
    • setEditUsernameAllowed

      void setEditUsernameAllowed(boolean editUsernameAllowed)
    • isUserManagedAccessAllowed

      boolean isUserManagedAccessAllowed()
    • setUserManagedAccessAllowed

      void setUserManagedAccessAllowed(boolean userManagedAccessAllowed)
    • isOrganizationsEnabled

      boolean isOrganizationsEnabled()
    • setOrganizationsEnabled

      void setOrganizationsEnabled(boolean organizationsEnabled)
    • setAttribute

      void setAttribute(String name, String value)
    • setAttribute

      default void setAttribute(String name, Boolean value)
    • setAttribute

      default void setAttribute(String name, Integer value)
    • setAttribute

      default void setAttribute(String name, Long value)
    • removeAttribute

      void removeAttribute(String name)
    • getAttribute

      String getAttribute(String name)
    • getAttribute

      default Integer getAttribute(String name, Integer defaultValue)
    • getAttribute

      default Long getAttribute(String name, Long defaultValue)
    • getAttribute

      default Boolean getAttribute(String name, Boolean defaultValue)
    • getAttributes

      Map<String,String> getAttributes()
    • isBruteForceProtected

      boolean isBruteForceProtected()
    • setBruteForceProtected

      void setBruteForceProtected(boolean value)
    • isPermanentLockout

      boolean isPermanentLockout()
    • setPermanentLockout

      void setPermanentLockout(boolean val)
    • getMaxTemporaryLockouts

      int getMaxTemporaryLockouts()
    • setMaxTemporaryLockouts

      void setMaxTemporaryLockouts(int val)
    • getMaxFailureWaitSeconds

      int getMaxFailureWaitSeconds()
    • setMaxFailureWaitSeconds

      void setMaxFailureWaitSeconds(int val)
    • getWaitIncrementSeconds

      int getWaitIncrementSeconds()
    • setWaitIncrementSeconds

      void setWaitIncrementSeconds(int val)
    • getMinimumQuickLoginWaitSeconds

      int getMinimumQuickLoginWaitSeconds()
    • setMinimumQuickLoginWaitSeconds

      void setMinimumQuickLoginWaitSeconds(int val)
    • getQuickLoginCheckMilliSeconds

      long getQuickLoginCheckMilliSeconds()
    • setQuickLoginCheckMilliSeconds

      void setQuickLoginCheckMilliSeconds(long val)
    • getMaxDeltaTimeSeconds

      int getMaxDeltaTimeSeconds()
    • setMaxDeltaTimeSeconds

      void setMaxDeltaTimeSeconds(int val)
    • getFailureFactor

      int getFailureFactor()
    • setFailureFactor

      void setFailureFactor(int failureFactor)
    • isVerifyEmail

      boolean isVerifyEmail()
    • setVerifyEmail

      void setVerifyEmail(boolean verifyEmail)
    • isLoginWithEmailAllowed

      boolean isLoginWithEmailAllowed()
    • setLoginWithEmailAllowed

      void setLoginWithEmailAllowed(boolean loginWithEmailAllowed)
    • isDuplicateEmailsAllowed

      boolean isDuplicateEmailsAllowed()
    • setDuplicateEmailsAllowed

      void setDuplicateEmailsAllowed(boolean duplicateEmailsAllowed)
    • isResetPasswordAllowed

      boolean isResetPasswordAllowed()
    • setResetPasswordAllowed

      void setResetPasswordAllowed(boolean resetPasswordAllowed)
    • getDefaultSignatureAlgorithm

      String getDefaultSignatureAlgorithm()
    • setDefaultSignatureAlgorithm

      void setDefaultSignatureAlgorithm(String defaultSignatureAlgorithm)
    • isRevokeRefreshToken

      boolean isRevokeRefreshToken()
    • setRevokeRefreshToken

      void setRevokeRefreshToken(boolean revokeRefreshToken)
    • getRefreshTokenMaxReuse

      int getRefreshTokenMaxReuse()
    • setRefreshTokenMaxReuse

      void setRefreshTokenMaxReuse(int revokeRefreshTokenCount)
    • getSsoSessionIdleTimeout

      int getSsoSessionIdleTimeout()
    • setSsoSessionIdleTimeout

      void setSsoSessionIdleTimeout(int seconds)
    • getSsoSessionMaxLifespan

      int getSsoSessionMaxLifespan()
    • setSsoSessionMaxLifespan

      void setSsoSessionMaxLifespan(int seconds)
    • getSsoSessionIdleTimeoutRememberMe

      int getSsoSessionIdleTimeoutRememberMe()
    • setSsoSessionIdleTimeoutRememberMe

      void setSsoSessionIdleTimeoutRememberMe(int seconds)
    • getSsoSessionMaxLifespanRememberMe

      int getSsoSessionMaxLifespanRememberMe()
    • setSsoSessionMaxLifespanRememberMe

      void setSsoSessionMaxLifespanRememberMe(int seconds)
    • getOfflineSessionIdleTimeout

      int getOfflineSessionIdleTimeout()
    • setOfflineSessionIdleTimeout

      void setOfflineSessionIdleTimeout(int seconds)
    • getAccessTokenLifespan

      int getAccessTokenLifespan()
    • isOfflineSessionMaxLifespanEnabled

      boolean isOfflineSessionMaxLifespanEnabled()
    • setOfflineSessionMaxLifespanEnabled

      void setOfflineSessionMaxLifespanEnabled(boolean offlineSessionMaxLifespanEnabled)
    • getOfflineSessionMaxLifespan

      int getOfflineSessionMaxLifespan()
    • setOfflineSessionMaxLifespan

      void setOfflineSessionMaxLifespan(int seconds)
    • getClientSessionIdleTimeout

      int getClientSessionIdleTimeout()
    • setClientSessionIdleTimeout

      void setClientSessionIdleTimeout(int seconds)
    • getClientSessionMaxLifespan

      int getClientSessionMaxLifespan()
    • setClientSessionMaxLifespan

      void setClientSessionMaxLifespan(int seconds)
    • getClientOfflineSessionIdleTimeout

      int getClientOfflineSessionIdleTimeout()
    • setClientOfflineSessionIdleTimeout

      void setClientOfflineSessionIdleTimeout(int seconds)
    • getClientOfflineSessionMaxLifespan

      int getClientOfflineSessionMaxLifespan()
    • setClientOfflineSessionMaxLifespan

      void setClientOfflineSessionMaxLifespan(int seconds)
    • setAccessTokenLifespan

      void setAccessTokenLifespan(int seconds)
    • getAccessTokenLifespanForImplicitFlow

      int getAccessTokenLifespanForImplicitFlow()
    • setAccessTokenLifespanForImplicitFlow

      void setAccessTokenLifespanForImplicitFlow(int seconds)
    • getAccessCodeLifespan

      int getAccessCodeLifespan()
    • setAccessCodeLifespan

      void setAccessCodeLifespan(int seconds)
    • getAccessCodeLifespanUserAction

      int getAccessCodeLifespanUserAction()
    • setAccessCodeLifespanUserAction

      void setAccessCodeLifespanUserAction(int seconds)
    • getOAuth2DeviceConfig

      OAuth2DeviceConfig getOAuth2DeviceConfig()
    • getCibaPolicy

      CibaConfig getCibaPolicy()
    • getParPolicy

      ParConfig getParPolicy()
    • getUserActionTokenLifespans

      Map<String,Integer> getUserActionTokenLifespans()
      This method will return a map with all the lifespans available or an empty map, but never null.
      Returns:
      map with user action token lifespans
    • getAccessCodeLifespanLogin

      int getAccessCodeLifespanLogin()
    • setAccessCodeLifespanLogin

      void setAccessCodeLifespanLogin(int seconds)
    • getActionTokenGeneratedByAdminLifespan

      int getActionTokenGeneratedByAdminLifespan()
    • setActionTokenGeneratedByAdminLifespan

      void setActionTokenGeneratedByAdminLifespan(int seconds)
    • getActionTokenGeneratedByUserLifespan

      int getActionTokenGeneratedByUserLifespan()
    • setActionTokenGeneratedByUserLifespan

      void setActionTokenGeneratedByUserLifespan(int seconds)
    • getActionTokenGeneratedByUserLifespan

      int getActionTokenGeneratedByUserLifespan(String actionTokenType)
    • setActionTokenGeneratedByUserLifespan

      void setActionTokenGeneratedByUserLifespan(String actionTokenType, Integer seconds)
    • getRequiredCredentialsStream

      Stream<RequiredCredentialModel> getRequiredCredentialsStream()
      Returns required credentials as a stream.
      Returns:
      Stream of RequiredCredentialModel. Never returns null.
    • addRequiredCredential

      void addRequiredCredential(String cred)
    • getPasswordPolicy

      PasswordPolicy getPasswordPolicy()
    • setPasswordPolicy

      void setPasswordPolicy(PasswordPolicy policy)
    • getOTPPolicy

      OTPPolicy getOTPPolicy()
    • setOTPPolicy

      void setOTPPolicy(OTPPolicy policy)
    • getWebAuthnPolicy

      WebAuthnPolicy getWebAuthnPolicy()
      Returns:
      WebAuthn policy for 2-factor authentication
    • setWebAuthnPolicy

      void setWebAuthnPolicy(WebAuthnPolicy policy)
      Set WebAuthn policy for 2-factor authentication
      Parameters:
      policy -
    • getWebAuthnPolicyPasswordless

      WebAuthnPolicy getWebAuthnPolicyPasswordless()
      Returns:
      WebAuthn passwordless policy below. This is temporary and will be removed later.
    • setWebAuthnPolicyPasswordless

      void setWebAuthnPolicyPasswordless(WebAuthnPolicy policy)
      Set WebAuthn passwordless policy below. This is temporary and will be removed later.
      Parameters:
      policy -
    • getRoleById

      RoleModel getRoleById(String id)
    • getDefaultGroupsStream

      Stream<GroupModel> getDefaultGroupsStream()
      Returns default groups as a stream.
      Returns:
      Stream of GroupModel. Never returns null.
    • addDefaultGroup

      void addDefaultGroup(GroupModel group)
    • removeDefaultGroup

      void removeDefaultGroup(GroupModel group)
    • getClientsStream

      Stream<ClientModel> getClientsStream()
      Returns clients as a stream.
      Returns:
      Stream of ClientModel. Never returns null.
    • getClientsStream

      Stream<ClientModel> getClientsStream(Integer firstResult, Integer maxResults)
      Returns clients as a stream.
      Parameters:
      firstResult - Integer Index of the first desired client. Ignored if negative or null.
      maxResults - Integer Maximum number of returned clients. Ignored if negative or null.
      Returns:
      Stream of ClientModel. Never returns null.
    • getClientsCount

      Long getClientsCount()
    • getAlwaysDisplayInConsoleClientsStream

      Stream<ClientModel> getAlwaysDisplayInConsoleClientsStream()
      Returns clients which are always displayed in the admin console as a stream.
      Returns:
      Stream of ClientModel. Never returns null.
    • addClient

      ClientModel addClient(String name)
    • addClient

      ClientModel addClient(String id, String clientId)
    • removeClient

      boolean removeClient(String id)
    • getClientById

      ClientModel getClientById(String id)
    • getClientByClientId

      ClientModel getClientByClientId(String clientId)
    • searchClientByClientIdStream

      Stream<ClientModel> searchClientByClientIdStream(String clientId, Integer firstResult, Integer maxResults)
      Search for clients by provided client's id.
      Parameters:
      clientId - String Id of the client.
      firstResult - Index of the first desired client. Ignored if negative or null.
      maxResults - Maximum number of returned clients. Ignored if negative or null.
      Returns:
      Stream of ClientModel. Never returns null.
    • searchClientByAttributes

      Stream<ClientModel> searchClientByAttributes(Map<String,String> attributes, Integer firstResult, Integer maxResults)
    • searchClientByAuthenticationFlowBindingOverrides

      Stream<ClientModel> searchClientByAuthenticationFlowBindingOverrides(Map<String,String> overrides, Integer firstResult, Integer maxResults)
    • updateRequiredCredentials

      void updateRequiredCredentials(Set<String> creds)
    • getBrowserSecurityHeaders

      Map<String,String> getBrowserSecurityHeaders()
    • setBrowserSecurityHeaders

      void setBrowserSecurityHeaders(Map<String,String> headers)
    • getSmtpConfig

      Map<String,String> getSmtpConfig()
    • setSmtpConfig

      void setSmtpConfig(Map<String,String> smtpConfig)
    • getBrowserFlow

      AuthenticationFlowModel getBrowserFlow()
    • setBrowserFlow

      void setBrowserFlow(AuthenticationFlowModel flow)
    • getRegistrationFlow

      AuthenticationFlowModel getRegistrationFlow()
    • setRegistrationFlow

      void setRegistrationFlow(AuthenticationFlowModel flow)
    • getDirectGrantFlow

      AuthenticationFlowModel getDirectGrantFlow()
    • setDirectGrantFlow

      void setDirectGrantFlow(AuthenticationFlowModel flow)
    • getResetCredentialsFlow

      AuthenticationFlowModel getResetCredentialsFlow()
    • setResetCredentialsFlow

      void setResetCredentialsFlow(AuthenticationFlowModel flow)
    • getClientAuthenticationFlow

      AuthenticationFlowModel getClientAuthenticationFlow()
    • setClientAuthenticationFlow

      void setClientAuthenticationFlow(AuthenticationFlowModel flow)
    • getDockerAuthenticationFlow

      AuthenticationFlowModel getDockerAuthenticationFlow()
    • setDockerAuthenticationFlow

      void setDockerAuthenticationFlow(AuthenticationFlowModel flow)
    • getFirstBrokerLoginFlow

      AuthenticationFlowModel getFirstBrokerLoginFlow()
    • setFirstBrokerLoginFlow

      void setFirstBrokerLoginFlow(AuthenticationFlowModel flow)
    • getAuthenticationFlowsStream

      Stream<AuthenticationFlowModel> getAuthenticationFlowsStream()
      Returns authentications flows as a stream.
      Returns:
      Stream of AuthenticationFlowModel. Never returns null.
    • getFlowByAlias

      AuthenticationFlowModel getFlowByAlias(String alias)
    • addAuthenticationFlow

      AuthenticationFlowModel addAuthenticationFlow(AuthenticationFlowModel model)
    • getAuthenticationFlowById

      AuthenticationFlowModel getAuthenticationFlowById(String id)
    • removeAuthenticationFlow

      void removeAuthenticationFlow(AuthenticationFlowModel model)
    • updateAuthenticationFlow

      void updateAuthenticationFlow(AuthenticationFlowModel model)
    • getAuthenticationExecutionsStream

      Stream<AuthenticationExecutionModel> getAuthenticationExecutionsStream(String flowId)
      Returns sorted (according to priority) AuthenticationExecutionModel as a stream. It should be used with forEachOrdered if the ordering is required.
      Parameters:
      flowId - String Id of the flow.
      Returns:
      Sorted stream of AuthenticationExecutionModel. Never returns null.
    • getAuthenticationExecutionById

      AuthenticationExecutionModel getAuthenticationExecutionById(String id)
    • getAuthenticationExecutionByFlowId

      AuthenticationExecutionModel getAuthenticationExecutionByFlowId(String flowId)
    • addAuthenticatorExecution

    • updateAuthenticatorExecution

      void updateAuthenticatorExecution(AuthenticationExecutionModel model)
    • removeAuthenticatorExecution

      void removeAuthenticatorExecution(AuthenticationExecutionModel model)
    • getAuthenticatorConfigsStream

      Stream<AuthenticatorConfigModel> getAuthenticatorConfigsStream()
      Returns authentication configs as a stream.
      Returns:
      Stream of AuthenticatorConfigModel. Never returns null.
    • addAuthenticatorConfig

      AuthenticatorConfigModel addAuthenticatorConfig(AuthenticatorConfigModel model)
    • updateAuthenticatorConfig

      void updateAuthenticatorConfig(AuthenticatorConfigModel model)
    • removeAuthenticatorConfig

      void removeAuthenticatorConfig(AuthenticatorConfigModel model)
    • getAuthenticatorConfigById

      AuthenticatorConfigModel getAuthenticatorConfigById(String id)
    • getAuthenticatorConfigByAlias

      AuthenticatorConfigModel getAuthenticatorConfigByAlias(String alias)
    • getRequiredActionConfigById

      RequiredActionConfigModel getRequiredActionConfigById(String id)
    • getRequiredActionConfigByAlias

      RequiredActionConfigModel getRequiredActionConfigByAlias(String alias)
    • removeRequiredActionProviderConfig

      void removeRequiredActionProviderConfig(RequiredActionConfigModel model)
    • updateRequiredActionConfig

      void updateRequiredActionConfig(RequiredActionConfigModel model)
    • getRequiredActionConfigsStream

      Stream<RequiredActionConfigModel> getRequiredActionConfigsStream()
    • getRequiredActionProvidersStream

      Stream<RequiredActionProviderModel> getRequiredActionProvidersStream()
      Returns sorted RequiredActionProviderModel as a stream. It should be used with forEachOrdered if the ordering is required.
      Returns:
      Sorted stream of RequiredActionProviderModel. Never returns null.
    • addRequiredActionProvider

      RequiredActionProviderModel addRequiredActionProvider(RequiredActionProviderModel model)
    • updateRequiredActionProvider

      void updateRequiredActionProvider(RequiredActionProviderModel model)
    • removeRequiredActionProvider

      void removeRequiredActionProvider(RequiredActionProviderModel model)
    • getRequiredActionProviderById

      RequiredActionProviderModel getRequiredActionProviderById(String id)
    • getRequiredActionProviderByAlias

      RequiredActionProviderModel getRequiredActionProviderByAlias(String alias)
    • getIdentityProvidersStream

      @Deprecated Stream<IdentityProviderModel> getIdentityProvidersStream()
      Returns identity providers as a stream.
      Returns:
      Stream of IdentityProviderModel. Never returns null.
    • getIdentityProviderByAlias

      @Deprecated IdentityProviderModel getIdentityProviderByAlias(String alias)
    • addIdentityProvider

      @Deprecated void addIdentityProvider(IdentityProviderModel identityProvider)
    • removeIdentityProviderByAlias

      @Deprecated void removeIdentityProviderByAlias(String alias)
    • updateIdentityProvider

      @Deprecated void updateIdentityProvider(IdentityProviderModel identityProvider)
    • getIdentityProviderMappersStream

      @Deprecated Stream<IdentityProviderMapperModel> getIdentityProviderMappersStream()
      Deprecated.
      Use IDPProvider#getMappersStream() instead.
      Returns identity provider mappers as a stream.
      Returns:
      Stream of IdentityProviderMapperModel. Never returns null.
    • getIdentityProviderMappersByAliasStream

      @Deprecated Stream<IdentityProviderMapperModel> getIdentityProviderMappersByAliasStream(String brokerAlias)
      Deprecated.
      Use IDPProvider#getMappersByAliasStream(String) instead.
      Returns identity provider mappers by the provided alias as a stream.
      Parameters:
      brokerAlias - String Broker's alias to filter results.
      Returns:
      Stream of IdentityProviderMapperModel Never returns null.
    • addIdentityProviderMapper

      Deprecated.
      Use IDPProvider#createMapper(IdentityProviderMapperModel) instead.
    • removeIdentityProviderMapper

      @Deprecated void removeIdentityProviderMapper(IdentityProviderMapperModel mapping)
      Deprecated.
      Use IDPProvider#removeMapper(IdentityProviderMapperModel) instead.
    • updateIdentityProviderMapper

      @Deprecated void updateIdentityProviderMapper(IdentityProviderMapperModel mapping)
      Deprecated.
      Use IDPProvider#updateMapper(IdentityProviderMapperModel) instead.
    • getIdentityProviderMapperById

      @Deprecated IdentityProviderMapperModel getIdentityProviderMapperById(String id)
      Deprecated.
      Use IDPProvider#getMapperById(String) instead.
    • getIdentityProviderMapperByName

      @Deprecated IdentityProviderMapperModel getIdentityProviderMapperByName(String brokerAlias, String name)
      Deprecated.
      Use IDPProvider#getMapperByName(String, String) instead.
    • addComponentModel

      ComponentModel addComponentModel(ComponentModel model)
      Adds component model. Will call onCreate() method of ComponentFactory
      Parameters:
      model -
      Returns:
    • importComponentModel

      ComponentModel importComponentModel(ComponentModel model)
      Adds component model. Will NOT call onCreate() method of ComponentFactory
      Parameters:
      model -
      Returns:
    • updateComponent

      void updateComponent(ComponentModel component)
      Updates component model. Will call onUpdate() method of ComponentFactory
      Parameters:
      component - to be updated
    • removeComponent

      void removeComponent(ComponentModel component)
      Removes given component. Will call preRemove() method of ComponentFactory. Also calls this.removeComponents(component.getId()).
      Parameters:
      component - to be removed
    • removeComponents

      void removeComponents(String parentId)
      Removes all components with given parentId
      Parameters:
      parentId - String id of parent
    • getComponentsStream

      Stream<ComponentModel> getComponentsStream(String parentId, String providerType)
      Returns stream of ComponentModels for specific parentId and providerType.
      Parameters:
      parentId - String id of parent
      providerType - String type of provider
      Returns:
      Stream of ComponentModel. Never returns null.
    • getComponentsStream

      Stream<ComponentModel> getComponentsStream(String parentId)
      Returns stream of ComponentModels for specific parentId.
      Parameters:
      parentId - String id of parent
      Returns:
      Stream of ComponentModel. Never returns null.
    • getComponentsStream

      Stream<ComponentModel> getComponentsStream()
      Returns stream of component models.
      Returns:
      Stream of ComponentModel. Never returns null.
    • getComponent

      ComponentModel getComponent(String id)
    • getStorageProviders

      default Stream<ComponentModel> getStorageProviders(Class<? extends Provider> storageProviderClass)
      Returns stream of ComponentModels that represent StorageProviders for class storageProviderClass in this realm.
      Parameters:
      storageProviderClass - Class<? extends Provider>
      Returns:
      Stream of ComponentModel. Never returns null.
    • getLoginTheme

      String getLoginTheme()
    • setLoginTheme

      void setLoginTheme(String name)
    • getAccountTheme

      String getAccountTheme()
    • setAccountTheme

      void setAccountTheme(String name)
    • getAdminTheme

      String getAdminTheme()
    • setAdminTheme

      void setAdminTheme(String name)
    • getEmailTheme

      String getEmailTheme()
    • setEmailTheme

      void setEmailTheme(String name)
    • getNotBefore

      int getNotBefore()
      Time in seconds since epoc
      Returns:
    • setNotBefore

      void setNotBefore(int notBefore)
    • isEventsEnabled

      boolean isEventsEnabled()
    • setEventsEnabled

      void setEventsEnabled(boolean enabled)
    • getEventsExpiration

      long getEventsExpiration()
    • setEventsExpiration

      void setEventsExpiration(long expiration)
    • getEventsListenersStream

      Stream<String> getEventsListenersStream()
      Returns events listeners as a stream.
      Returns:
      Stream of String. Never returns null.
    • setEventsListeners

      void setEventsListeners(Set<String> listeners)
    • getEnabledEventTypesStream

      Stream<String> getEnabledEventTypesStream()
      Returns enabled event types as a stream.
      Returns:
      Stream of String. Never returns null.
    • setEnabledEventTypes

      void setEnabledEventTypes(Set<String> enabledEventTypes)
    • isAdminEventsEnabled

      boolean isAdminEventsEnabled()
    • setAdminEventsEnabled

      void setAdminEventsEnabled(boolean enabled)
    • isAdminEventsDetailsEnabled

      boolean isAdminEventsDetailsEnabled()
    • setAdminEventsDetailsEnabled

      void setAdminEventsDetailsEnabled(boolean enabled)
    • getMasterAdminClient

      ClientModel getMasterAdminClient()
    • setMasterAdminClient

      void setMasterAdminClient(ClientModel client)
    • getDefaultRole

      RoleModel getDefaultRole()
      Returns default realm role. All both realm and client default roles are assigned as composite of this role.
      Returns:
      Default role of this realm
    • setDefaultRole

      void setDefaultRole(RoleModel role)
      Sets default role for this realm
      Parameters:
      role - to be set
    • isIdentityFederationEnabled

      @Deprecated boolean isIdentityFederationEnabled()
    • isInternationalizationEnabled

      boolean isInternationalizationEnabled()
    • setInternationalizationEnabled

      void setInternationalizationEnabled(boolean enabled)
    • getSupportedLocalesStream

      Stream<String> getSupportedLocalesStream()
      Returns supported locales as a stream.
      Returns:
      Stream of String. Never returns null.
    • setSupportedLocales

      void setSupportedLocales(Set<String> locales)
    • getDefaultLocale

      String getDefaultLocale()
    • setDefaultLocale

      void setDefaultLocale(String locale)
    • createGroup

      default GroupModel createGroup(String name)
    • createGroup

      default GroupModel createGroup(String id, String name)
    • createGroup

      default GroupModel createGroup(String name, GroupModel toParent)
    • createGroup

      GroupModel createGroup(String id, String name, GroupModel toParent)
    • getGroupById

      GroupModel getGroupById(String id)
    • getGroupsStream

      Stream<GroupModel> getGroupsStream()
      Returns groups as a stream.
      Returns:
      Stream of GroupModel. Never returns null.
    • getGroupsCount

      Long getGroupsCount(Boolean onlyTopGroups)
    • getGroupsCountByNameContaining

      Long getGroupsCountByNameContaining(String search)
    • getTopLevelGroupsStream

      @Deprecated Stream<GroupModel> getTopLevelGroupsStream()
      Deprecated.
    • getTopLevelGroupsStream

      @Deprecated Stream<GroupModel> getTopLevelGroupsStream(Integer first, Integer max)
      Deprecated.
    • removeGroup

      boolean removeGroup(GroupModel group)
    • moveGroup

      void moveGroup(GroupModel group, GroupModel toParent)
    • getClientScopesStream

      Stream<ClientScopeModel> getClientScopesStream()
      Returns all client scopes of this realm as a stream.
      Returns:
      Stream of ClientScopeModel. Never returns null.
    • addClientScope

      ClientScopeModel addClientScope(String name)
      Creates new client scope with the given name. Internal ID is created automatically. If given name contains spaces, those are replaced by underscores.
      Parameters:
      name - String name of the client scope.
      Returns:
      Model of the created client scope.
      Throws:
      ModelDuplicateException - if client scope with same id or name already exists.
    • addClientScope

      ClientScopeModel addClientScope(String id, String name)
      Creates new client scope with the given internal ID and name. If given name contains spaces, those are replaced by underscores.
      Parameters:
      id - String id of the client scope.
      name - String name of the client scope.
      Returns:
      Model of the created client scope.
      Throws:
      ModelDuplicateException - if client scope with same id or name already exists.
    • removeClientScope

      boolean removeClientScope(String id)
      Removes client scope with given id from this realm.
      Parameters:
      id - of the client scope
      Returns:
      true if the realm contained the scope and the removal was successful, false otherwise
    • getClientScopeById

      ClientScopeModel getClientScopeById(String id)
      Parameters:
      id - of the client scope
      Returns:
      Client scope with the given id, or null when the scope does not exist.
    • addDefaultClientScope

      void addDefaultClientScope(ClientScopeModel clientScope, boolean defaultScope)
      Adds given client scope among default/optional client scopes of this realm. The scope will be assigned to each new client.
      Parameters:
      clientScope - to be added
      defaultScope - if true the scope will be added among default client scopes, if false it will be added among optional client scopes
    • removeDefaultClientScope

      void removeDefaultClientScope(ClientScopeModel clientScope)
      Removes given client scope from default or optional client scopes of this realm.
      Parameters:
      clientScope - to be removed
    • createOrUpdateRealmLocalizationTexts

      void createOrUpdateRealmLocalizationTexts(String locale, Map<String,String> localizationTexts)
      Creates or updates the realm-specific localization texts for the given locale. This method will not delete any text. It updates texts, which are already stored or create new ones if the key does not exist yet.
    • removeRealmLocalizationTexts

      boolean removeRealmLocalizationTexts(String locale)
    • getRealmLocalizationTexts

      Map<String,Map<String,String>> getRealmLocalizationTexts()
    • getRealmLocalizationTextsByLocale

      Map<String,String> getRealmLocalizationTextsByLocale(String locale)
    • getDefaultClientScopesStream

      Stream<ClientScopeModel> getDefaultClientScopesStream(boolean defaultScope)
      Returns default client scopes of this realm either default ones or optional ones.
      Parameters:
      defaultScope - if true default client scopes are returned, if false optional client scopes are returned.
      Returns:
      Stream of ClientScopeModel. Never returns null.
    • addToDefaultRoles

      default void addToDefaultRoles(RoleModel role)
      Adds a role as a composite to default role of this realm.
      Parameters:
      role - to be added
    • createClientInitialAccessModel

      ClientInitialAccessModel createClientInitialAccessModel(int expiration, int count)
    • getClientInitialAccessModel

      ClientInitialAccessModel getClientInitialAccessModel(String id)
    • removeClientInitialAccessModel

      void removeClientInitialAccessModel(String id)
    • getClientInitialAccesses

      Stream<ClientInitialAccessModel> getClientInitialAccesses()
    • decreaseRemainingCount

      void decreaseRemainingCount(ClientInitialAccessModel clientInitialAccess)