This is better than the previous way of using the canonical name of the class,
because the previous way did not allow for refactoring, and also required the
PremiumPricingEngine to live in the model package lest there be circular
dependencies, which does not seem ideal.
Note that, for reasons of backwards compatibility with existing persisted data,
the name of the static premium pricing engine has been set to its canonical
class name, but the class can now be refactored going forward so long as this
string remains unchanged, and any new pricing engine implementations can use
whatever string key they want (it doesn't have to be a canonical class name).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129215185
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 refactors the existing premium list functionality into the new
class StaticPremiumListPricingEngine, which implements PricingEngine.
A backfill @OnLoad is provided to default existing Registry entities
into the static implementation. For now there is just this one
implementation. Dagger map multibinding is used to generate the total
set of allowed pricing engines, and allows other parties to plug in
their own implementations.
The pricing engine is a required field on the Registry object. If you
don't want a particular Registry to actually have a premium list, then
use the static pricing engine but don't actually set a premium list.
A subsequent CL will refactor the Key<PremiumList> field on the
Registry entity class to be handled solely by the
StaticPremiumListPricingEngine implementation. Going forward, all
configuration and implementation details that are specific to a given
pricing engine should be handled by that pricing engine, and not as
fields on the Registry object.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121850176