mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02: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:
parent
366c5a344d
commit
6ba1d5e6df
11 changed files with 45 additions and 52 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue