Interface ClientConfigStorageService
public interface ClientConfigStorageService
-
Method Summary
Modifier and TypeMethodDescriptionvoiddefault StringgenerateRedirectUrl(String authorizationUrl) Generates the redirectUrl for a given authorizationUrl.getByIdOrFail(String id) booleanisNameUnique(String id, String name) Returns whether given name is unique.list()save(ClientConfigurationEntity clientConfigurationEntity) Creates or updates theClientConfigurationEntity
-
Method Details
-
save
@Nonnull ClientConfigurationEntity save(@Nonnull ClientConfigurationEntity clientConfigurationEntity) throws ConfigurationNotFoundException Creates or updates theClientConfigurationEntity- Parameters:
clientConfigurationEntity- the entity to create- Returns:
- The saved entity, with the ID if created
- Throws:
ConfigurationNotFoundException- if the configuration for the given id wasn't found
-
delete
- Parameters:
id- ofClientConfigurationEntityto delete- Throws:
ConfigurationNotFoundException- if the configuration for the given id wasn't found
-
getById
- Parameters:
id- of theClientConfigurationEntityfrom the store- Returns:
- The
OptionalClientConfigurationEntityfrom the store for the id, orOptional.empty()
-
getByIdOrFail
@Nonnull ClientConfigurationEntity getByIdOrFail(@Nonnull String id) throws ConfigurationNotFoundException - Parameters:
id- of theClientConfigurationEntityfrom the store- Returns:
- The
OptionalClientConfigurationEntityfrom the store for the id - Throws:
ConfigurationNotFoundException- if the configuration for the given id wasn't found
-
getByName
- Parameters:
name- of theClientConfigurationEntityfrom the store- Returns:
- The
OptionalClientConfigurationEntityfrom the store for the name, orOptional.empty()
-
list
- Returns:
- All the saved
ClientConfigurationEntityordered by name ascending, or an empty list
-
isNameUnique
Returns whether given name is unique.- Parameters:
id- id of the persisted configuration or null, if it's a new onename- name to be checked for uniqueness- Returns:
- whether given name is unique
-
generateRedirectUrl
Generates the redirectUrl for a given authorizationUrl. Https is enforced to perform this action.- Parameters:
authorizationUrl- the url to be transformed into a redirectUrl- Returns:
- the redirectUrl, null by default
- Throws:
ValidationException- if the baseUrl for the localhost is not Https.
-