Search in sources :

Example 6 with ProtocolMapperEntity

use of org.keycloak.models.jpa.entities.ProtocolMapperEntity in project keycloak by keycloak.

the class ClientAdapter method removeProtocolMapper.

@Override
public void removeProtocolMapper(ProtocolMapperModel mapping) {
    ProtocolMapperEntity toDelete = getProtocolMapperEntity(mapping.getId());
    if (toDelete != null) {
        session.users().preRemove(mapping);
        this.entity.getProtocolMappers().remove(toDelete);
        em.remove(toDelete);
    }
}
Also used : ProtocolMapperEntity(org.keycloak.models.jpa.entities.ProtocolMapperEntity)

Aggregations

ProtocolMapperEntity (org.keycloak.models.jpa.entities.ProtocolMapperEntity)6 ModelDuplicateException (org.keycloak.models.ModelDuplicateException)2