<s> """<STR_LIT>""" <EOL> import feconf <EOL> import utils <EOL> NAMES = utils . create_enum ( <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:email>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT:file>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:user>' ) <EOL> class _Platform ( object ) : <EOL> @ classmethod <EOL> def import_models ( cls ) : <EOL> raise NotImplementedError <EOL> class _Gae ( _Platform ) : <EOL> @ classmethod <EOL> def import_models ( cls , model_names ) : <EOL> returned_models = [ ] <EOL> for name in model_names : <EOL> if name == NAMES . base_model : <EOL> from core . storage . base_model import gae_models as base_models <EOL> returned_models . append ( base_models ) <EOL> elif name == NAMES . collection : <EOL> from core . storage . collection import gae_models as collection_models <EOL> returned_models . append ( collection_models ) <EOL> elif name == NAMES . config : <EOL> from core . storage . config import gae_models as config_models <EOL> returned_models . append ( config_models ) <EOL> elif name == NAMES . email : <EOL> from core . storage . email import gae_models as email_models <EOL> returned_models . append ( email_models ) <EOL> elif name == NAMES . exploration : <EOL> from core . storage . exploration import gae_models as exp_models <EOL> returned_models . append ( exp_models ) <EOL> elif name == NAMES . feedback : <EOL> from core . storage . feedback import gae_models as feedback_models <EOL> returned_models . append ( feedback_models ) <EOL> elif name == NAMES . file : <EOL> from core . storage . file import gae_models as file_models <EOL> returned_models . append ( file_models ) <EOL> elif name == NAMES . job : <EOL> from core . storage . job import gae_models as job_models <EOL> returned_models . append ( job_models ) <EOL> elif name == NAMES . recommendations : <EOL> from core . storage . recommendations import gae_models as recommendations_models <EOL> returned_models . append ( recommendations_models ) <EOL> elif name == NAMES . statistics : <EOL> from core . storage . statistics import gae_models as statistics_models <EOL> returned_models . append ( statistics_models ) <EOL> elif name == NAMES . user : <EOL> from core . storage . user import gae_models as user_models <EOL> returned_models . append ( user_models ) <EOL> else : <EOL> raise Exception ( '<STR_LIT>' % name ) <EOL> return tuple ( returned_models ) <EOL> @ classmethod <EOL> def import_transaction_services ( cls ) : <EOL> from core . platform . transactions import gae_transaction_services <EOL> return gae_transaction_services <EOL> @ classmethod <EOL> def import_current_user_services ( cls ) : <EOL> from core . platform . users import gae_current_user_services <EOL> return gae_current_user_services <EOL> @ classmethod <EOL> def import_email_services ( cls ) : <EOL> from core . platform . email import gae_email_services <EOL> return gae_email_services <EOL> @ classmethod <EOL> def import_memcache_services ( cls ) : <EOL> from core . platform . memcache import gae_memcache_services <EOL> return gae_memcache_services <EOL> @ classmethod <EOL> def import_taskqueue_services ( cls ) : <EOL> from core . platform . taskqueue import gae_taskqueue_services <EOL> return gae_taskqueue_services <EOL> @ classmethod <EOL> def import_search_services ( cls ) : <EOL> from core . platform . search import gae_search_services <EOL> return gae_search_services <EOL> NAME = '<STR_LIT>' <EOL> class Registry ( object ) : <EOL> _PLATFORM_MAPPING = { <EOL> _Gae . NAME : _Gae , <EOL> } <EOL> @ classmethod <EOL> def _get ( cls ) : <EOL> return cls . _PLATFORM_MAPPING . get ( feconf . PLATFORM ) <EOL> @ classmethod <EOL> def import_models ( cls , model_names ) : <EOL> return cls . _get ( ) . import_models ( model_names ) <EOL> @ classmethod <EOL> def import_current_user_services ( cls ) : <EOL> return cls . _get ( ) . import_current_user_services ( ) <EOL> @ classmethod <EOL> def import_transaction_services ( cls ) : <EOL> return cls . _get ( ) . import_transaction_services ( ) <EOL> @ classmethod <EOL> def import_email_services ( cls ) : <EOL> return cls . _get ( ) . import_email_services ( ) <EOL> @ classmethod <EOL> def import_memcache_services ( cls ) : <EOL> return cls . _get ( ) . import_memcache_services ( ) <EOL> @ classmethod <EOL> def import_taskqueue_services ( cls ) : <EOL> return cls . _get ( ) . import_taskqueue_services ( ) <EOL> @ classmethod <EOL> def import_search_services ( cls ) : <EOL> return cls . _get ( ) . import_search_services ( ) </s>
