mirror of
https://github.com/google/nomulus
synced 2026-01-08 23:23:32 +00:00
Rename PricingEngine to PremiumPricingEngine
This properly reflects the fact that other, separate things will now be responsible both for EAP and for per-TLD custom pricing. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=124558165
This commit is contained in:
committed by
Justine Tunney
parent
366c5a344d
commit
6ba1d5e6df
@@ -19,29 +19,29 @@ import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import dagger.multibindings.IntoMap;
|
||||
|
||||
import google.registry.model.pricing.PricingEngine;
|
||||
import google.registry.model.pricing.PremiumPricingEngine;
|
||||
import google.registry.model.pricing.StaticPremiumListPricingEngine;
|
||||
|
||||
/**
|
||||
* Dagger module for injecting pricing engines.
|
||||
*
|
||||
* <p>To add a new pricing engine, create a new class that implements {@link PricingEngine}, and add
|
||||
* a module that provides an instance of PricingEngine with a <code>PricingEngineClassKey</code>
|
||||
* annotation with the class of the implementation and also <code>@Provides @IntoMap</code>
|
||||
* annotations.
|
||||
* <p>To add a new pricing engine, create a new class that implements {@link PremiumPricingEngine},
|
||||
* and add a module that provides an instance of PricingEngine with a
|
||||
* <code>PricingEngineClassKey</code> annotation with the class of the implementation and also
|
||||
* <code>@Provides @IntoMap</code> annotations.
|
||||
*/
|
||||
@Module
|
||||
public class PricingModule {
|
||||
|
||||
/** The annotation used for PricingEngine implementation keys. */
|
||||
@MapKey
|
||||
@interface PricingEngineClassKey {
|
||||
Class<? extends PricingEngine> value();
|
||||
@interface PremiumPricingEngineClassKey {
|
||||
Class<? extends PremiumPricingEngine> value();
|
||||
}
|
||||
|
||||
@Provides @IntoMap
|
||||
@PricingEngineClassKey(StaticPremiumListPricingEngine.class)
|
||||
static PricingEngine provideStaticPremiumList(StaticPremiumListPricingEngine engine) {
|
||||
@PremiumPricingEngineClassKey(StaticPremiumListPricingEngine.class)
|
||||
static PremiumPricingEngine provideStaticPremiumList(StaticPremiumListPricingEngine engine) {
|
||||
return engine;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user