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:
Ben McIlwain 2016-06-10 07:10:59 -07:00 committed by Justine Tunney
parent 366c5a344d
commit 6ba1d5e6df
11 changed files with 45 additions and 52 deletions

View file

@ -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;
}
}