You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
903 B

import {Instantiable, FactoryProducer} from '../../../di'
import {RedemptionCodeRepository} from '../types'
import {CacheRedemptionCodeRepository} from './CacheRedemptionCodeRepository'
import {ConfiguredSingletonFactory} from '../../../di/factory/ConfiguredSingletonFactory'
* A dependency injection factory that matches the abstract RedemptionCodeRepository class
* and produces an instance of the configured repository driver implementation.
export class RedemptionCodeRepositoryFactory extends ConfiguredSingletonFactory<RedemptionCodeRepository> {
protected getConfigKey(): string {
return 'oauth2.repository.client'
protected getDefaultImplementation(): Instantiable<RedemptionCodeRepository> {
return CacheRedemptionCodeRepository
protected getAbstractImplementation(): any {
return RedemptionCodeRepository