All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.adorsys.ledgers.keycloak.client.mapper.KeycloakDataMapperImpl Maven / Gradle / Ivy

The newest version!
package de.adorsys.ledgers.keycloak.client.mapper;

import de.adorsys.ledgers.keycloak.client.model.KeycloakRealm;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.processing.Generated;
import org.keycloak.representations.idm.RealmRepresentation;
import org.springframework.stereotype.Component;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2021-12-06T13:24:18+0000",
    comments = "version: 1.4.1.Final, compiler: javac, environment: Java 11.0.13 (Azul Systems, Inc.)"
)
@Component
public class KeycloakDataMapperImpl implements KeycloakDataMapper {

    @Override
    public RealmRepresentation createRealmRepresentation(KeycloakRealm source) {
        if ( source == null ) {
            return null;
        }

        RealmRepresentation realmRepresentation = new RealmRepresentation();

        realmRepresentation.setRealm( source.getRealm() );
        realmRepresentation.setEnabled( source.isEnabled() );
        realmRepresentation.setAccessTokenLifespan( source.getAccessTokenLifespan() );
        realmRepresentation.setAccessTokenLifespanForImplicitFlow( source.getAccessTokenLifespanForImplicitFlow() );
        realmRepresentation.setOfflineSessionIdleTimeout( source.getOfflineSessionIdleTimeout() );
        realmRepresentation.setOfflineSessionMaxLifespanEnabled( source.isOfflineSessionMaxLifespanEnabled() );
        realmRepresentation.setOfflineSessionMaxLifespan( source.getOfflineSessionMaxLifespan() );
        realmRepresentation.setClientSessionIdleTimeout( source.getClientSessionIdleTimeout() );
        realmRepresentation.setClientSessionMaxLifespan( source.getClientSessionMaxLifespan() );
        realmRepresentation.setClientOfflineSessionIdleTimeout( source.getClientOfflineSessionIdleTimeout() );
        realmRepresentation.setClientOfflineSessionMaxLifespan( source.getClientOfflineSessionMaxLifespan() );
        realmRepresentation.setRegistrationAllowed( source.isRegistrationAllowed() );
        realmRepresentation.setRegistrationEmailAsUsername( source.isRegistrationEmailAsUsername() );
        realmRepresentation.setVerifyEmail( source.isVerifyEmail() );
        realmRepresentation.setLoginWithEmailAllowed( source.isLoginWithEmailAllowed() );
        realmRepresentation.setDuplicateEmailsAllowed( source.isDuplicateEmailsAllowed() );
        realmRepresentation.setResetPasswordAllowed( source.isResetPasswordAllowed() );
        realmRepresentation.setEditUsernameAllowed( source.isEditUsernameAllowed() );
        Map map = source.getSmtpServer();
        if ( map != null ) {
            realmRepresentation.setSmtpServer( new HashMap( map ) );
        }

        return realmRepresentation;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy