Interface OAuthClientRegistrationPersistenceService<P extends OAuthClientRegistrationWrapper>
- Type Parameters:
P- The type ofOAuthClientRegistrationWrapperfor the specific implementation
- All Known Implementing Classes:
DefaultOAuthClientRegistrationPersistenceService
public interface OAuthClientRegistrationPersistenceService<P extends OAuthClientRegistrationWrapper>
Service responsible for CRUD operations related to
OAuthClientRegistrationWrapper.-
Method Summary
Modifier and TypeMethodDescriptionCreate a new client registrationvoidDelete a client registrationvoiddeleteById(String id) Delete a client registrationbooleanexistsById(String id) Check if a client registration exists by its system IDorg.springframework.data.domain.Page<P>findAll(org.springframework.data.domain.Pageable pageable) Find all client registrations.org.springframework.data.domain.Page<P>findAllByTenantId(String tenantId, org.springframework.data.domain.Pageable pageable) Find allOAuthClientRegistrationWrapperobjects for the current tenantFind a client registration by its system IDFind a client registration by its system ID and tenant ID.findByRegistrationId(String registrationId, String tenantId) Find aOAuthClientRegistrationWrapperby registration id and tenant idReplace a client registrationSave theOAuthClientRegistrationWrapperto the database
-
Method Details
-
findAll
org.springframework.data.domain.Page<P> findAll(@Nullable org.springframework.data.domain.Pageable pageable) Find all client registrations.- Parameters:
pageable- the pageable- Returns:
- A page of client registrations
-
findById
Find a client registration by its system ID- Parameters:
id- The client registration system ID- Returns:
- An optional of client registration
-
findById
Find a client registration by its system ID and tenant ID.- Parameters:
id- The client registration system IDtenantId- ID of the owning tenant.- Returns:
- An optional of client registration
-
existsById
Check if a client registration exists by its system ID- Parameters:
id- The client registration system ID- Returns:
- whether or not the client registration exists
-
replace
Replace a client registration- Parameters:
id- The id of the server to replaceclientRegistration- The replacement- Returns:
- The replaced client registration
-
create
Create a new client registration- Parameters:
clientRegistration- The client registration to create- Returns:
- The created client registration.
-
delete
Delete a client registration- Parameters:
clientRegistration- The client registration to delete.
-
deleteById
Delete a client registration- Parameters:
id- The id of the client registration to delete.
-
findByRegistrationId
Find aOAuthClientRegistrationWrapperby registration id and tenant id- Parameters:
registrationId- TheOAuthClientRegistrationWrapper.getRegistrationId()to filter bytenantId- The tenant ID to filter by- Returns:
- The matching registration or empty
-
save
Save theOAuthClientRegistrationWrapperto the database- Parameters:
clientRegistration- Instance to persist- Returns:
- Persited client registration
-
findAllByTenantId
org.springframework.data.domain.Page<P> findAllByTenantId(String tenantId, @Nullable org.springframework.data.domain.Pageable pageable) Find allOAuthClientRegistrationWrapperobjects for the current tenant- Parameters:
tenantId- the tenant IDpageable- the pageable- Returns:
- All registrations for the tenant
-