Interface OAuthClientRegistrationPersistenceService<P extends OAuthClientRegistrationWrapper>
-
- Type Parameters:
P
- The type ofOAuthClientRegistrationWrapper
for the specific implementation
- All Known Implementing Classes:
DefaultOAuthClientRegistrationPersistenceService
public interface OAuthClientRegistrationPersistenceService<P extends OAuthClientRegistrationWrapper>
Service responsible for CRUD operations related toOAuthClientRegistrationWrapper
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description P
create(P clientRegistration)
Create a new client registrationvoid
delete(P clientRegistration)
Delete a client registrationvoid
deleteById(String id)
Delete a client registrationboolean
existsById(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 allOAuthClientRegistrationWrapper
objects for the current tenantOptional<P>
findById(String id)
Find a client registration by its system IDOptional<P>
findById(String id, String tenantId)
Find a client registration by its system ID and tenant ID.Optional<P>
findByRegistrationId(String registrationId, String tenantId)
Find aOAuthClientRegistrationWrapper
by registration id and tenant idP
replace(String id, P clientRegistration)
Replace a client registrationP
save(P clientRegistration)
Save theOAuthClientRegistrationWrapper
to the database
-
-
-
Method Detail
-
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
Optional<P> findById(String id)
Find a client registration by its system ID- Parameters:
id
- The client registration system ID- Returns:
- An optional of client registration
-
findById
Optional<P> findById(String id, String tenantId)
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
boolean existsById(String id)
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
P replace(String id, P clientRegistration)
Replace a client registration- Parameters:
id
- The id of the server to replaceclientRegistration
- The replacement- Returns:
- The replaced client registration
-
create
P create(P clientRegistration)
Create a new client registration- Parameters:
clientRegistration
- The client registration to create- Returns:
- The created client registration.
-
delete
void delete(P clientRegistration)
Delete a client registration- Parameters:
clientRegistration
- The client registration to delete.
-
deleteById
void deleteById(String id)
Delete a client registration- Parameters:
id
- The id of the client registration to delete.
-
findByRegistrationId
Optional<P> findByRegistrationId(String registrationId, String tenantId)
Find aOAuthClientRegistrationWrapper
by 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
P save(P clientRegistration)
Save theOAuthClientRegistrationWrapper
to 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 allOAuthClientRegistrationWrapper
objects for the current tenant- Parameters:
tenantId
- the tenant IDpageable
- the pageable- Returns:
- All registrations for the tenant
-
-