org.keycloak.testutils

## Class DummyUserFederationProviderFactory

- java.lang.Object
- - org.keycloak.testutils.DummyUserFederationProviderFactory

- All Implemented Interfaces:
    UserFederationProviderFactory, ProviderFactory<UserFederationProvider>

      public class DummyUserFederationProviderFactory
      extends Object
      implements UserFederationProviderFactory

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `PROVIDER_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DummyUserFederationProviderFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `UserFederationProvider` | `create(KeycloakSession session)`
    `int` | `getChangedSyncCounter()`
    `Set<String>` | `getConfigurationOptions()` Config options to display in generic admin console page for federation
    `int` | `getFullSyncCounter()`
    `String` | `getId()` This is the name of the provider and will be showed in the admin console as an option.
    `UserFederationProvider` | `getInstance(KeycloakSession session, UserFederationProviderModel model)` called per Keycloak transaction.
    `void` | `init(Config.Scope config)`
    `void` | `syncAllUsers(KeycloakSessionFactory sessionFactory, String realmId, UserFederationProviderModel model)` Sync all users from the provider storage to Keycloak storage.
    `void` | `syncChangedUsers(KeycloakSessionFactory sessionFactory, String realmId, UserFederationProviderModel model, Date lastSync)` Sync just changed (added / updated / removed) users from the provider storage to Keycloak storage.

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

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

- - ### Field Detail

    - #### PROVIDER_NAME

          public static final String PROVIDER_NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DummyUserFederationProviderFactory

          public DummyUserFederationProviderFactory()

  - ### Method Detail

    - #### getInstance

          public UserFederationProvider getInstance(KeycloakSession session,
                                           UserFederationProviderModel model)

      Description copied from interface: `UserFederationProviderFactory`
      called per Keycloak transaction.
      Specified by:
        `getInstance` in interface `UserFederationProviderFactory`
      Returns:

    - #### getConfigurationOptions

          public Set<String> getConfigurationOptions()

      Description copied from interface: `UserFederationProviderFactory`
      Config options to display in generic admin console page for federation
      Specified by:
        `getConfigurationOptions` in interface `UserFederationProviderFactory`
      Returns:

    - #### create

          public UserFederationProvider create(KeycloakSession session)

      Specified by:
        `create` in interface `ProviderFactory<UserFederationProvider>`

    - #### init

          public void init(Config.Scope config)

      Specified by:
        `init` in interface `ProviderFactory<UserFederationProvider>`

    - #### close

          public void close()

      Specified by:
        `close` in interface `ProviderFactory<UserFederationProvider>`

    - #### getId

          public String getId()

      Description copied from interface: `UserFederationProviderFactory`
      This is the name of the provider and will be showed in the admin console as an option.
      Specified by:
        `getId` in interface `UserFederationProviderFactory`
      Specified by:
        `getId` in interface `ProviderFactory<UserFederationProvider>`

    - #### syncAllUsers

          public void syncAllUsers(KeycloakSessionFactory sessionFactory,
                          String realmId,
                          UserFederationProviderModel model)

      Description copied from interface: `UserFederationProviderFactory`
      Sync all users from the provider storage to Keycloak storage.
      Specified by:
        `syncAllUsers` in interface `UserFederationProviderFactory`

    - #### syncChangedUsers

          public void syncChangedUsers(KeycloakSessionFactory sessionFactory,
                              String realmId,
                              UserFederationProviderModel model,
                              Date lastSync)

      Description copied from interface: `UserFederationProviderFactory`
      Sync just changed (added / updated / removed) users from the provider storage to Keycloak storage. This is useful in case that your storage supports "changelogs" (Tracking what users changed since specified date). It's implementation specific to decide what exactly will be changed (For example LDAP supports tracking of added / updated users, but not removed users. So removed users are not synced)
      Specified by:
        `syncChangedUsers` in interface `UserFederationProviderFactory`

    - #### getFullSyncCounter

          public int getFullSyncCounter()

    - #### getChangedSyncCounter

          public int getChangedSyncCounter()

Copyright © 2015. All Rights Reserved.