Example usage for org.springframework.security.oauth2.provider ClientAlreadyExistsException ClientAlreadyExistsException

List of usage examples for org.springframework.security.oauth2.provider ClientAlreadyExistsException ClientAlreadyExistsException

Introduction

In this page you can find the example usage for org.springframework.security.oauth2.provider ClientAlreadyExistsException ClientAlreadyExistsException.

Prototype

public ClientAlreadyExistsException(String msg, Throwable cause) 

Source Link

Usage

From source file:org.springframework.security.oauth2.provider.client.JdbcClientDetailsService.java

public void addClientDetails(ClientDetails clientDetails) throws ClientAlreadyExistsException {
    try {/*from   w  w  w .  j  a  v  a2s .  c  o  m*/
        jdbcTemplate.update(insertClientDetailsSql, getFields(clientDetails));
    } catch (DuplicateKeyException e) {
        throw new ClientAlreadyExistsException("Client already exists: " + clientDetails.getClientId(), e);
    }
}

From source file:org.cloudfoundry.identity.uaa.zone.MultitenantJdbcClientDetailsService.java

public void addClientDetails(ClientDetails clientDetails) throws ClientAlreadyExistsException {
    try {//from www  .  j a v a2 s.  c o m
        jdbcTemplate.update(insertClientDetailsSql, getInsertClientDetailsFields(clientDetails));
    } catch (DuplicateKeyException e) {
        throw new ClientAlreadyExistsException("Client already exists: " + clientDetails.getClientId(), e);
    }
}