package Ġorg . ny pl . simpl ified . ui . catalog . saml 2 0 Ċ Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ import Ġorg . library simpl ified . services . api . Service Directory Type Ċ import Ġorg . ny pl . simpl ified . books . book _ registry . Book Registry Type Ċ import Ġorg . ny pl . simpl ified . books . controller . api . Books Controller Type Ċ import Ġorg . ny pl . simpl ified . build config . api . Build Configuration ServiceType Ċ import Ġorg . ny pl . simpl ified . listeners . api . Fragment Listener Type Ċ import Ġorg . ny pl . simpl ified . profiles . controller . api . Profiles Controller Type Ċ import Ġjava . io . File Ċ Ċ /** Ċ Ġ* ĠA Ġfactory Ġfor ĠSAML Ġ 2 . 0 Ġview Ġstate . Ċ Ġ*/ Ċ Ċ class ĠCatalog SAML 2 0 ViewModel Factory ( ĊĠ Ġprivate Ġval Ġservices : ĠService Directory Type , ĊĠ Ġprivate Ġval Ġlistener : ĠFragment Listener Type < Catalog SAML 2 0 Event >, ĊĠ Ġprivate Ġval Ġparameters : ĠCatalog SAML 2 0 Fragment Parameters , ĊĠ Ġprivate Ġval ĠwebView Data Dir : ĠFile Ċ ) Ġ: ĠViewModel Provider . Factory Ġ{ ĊĊĠ Ġoverride Ġfun Ġ< T Ġ: ĠViewModel > Ġcreate ( model Class : ĠClass < T >): ĠT Ġ{ ĊĠĠĠ Ġif Ġ( model Class Ġ== ĠCatalog SAML 2 0 ViewModel :: class . java ) Ġ{ ĊĠĠĠĠĠ Ġval Ġprofiles Controller Ġ= ĊĠĠĠĠĠĠĠ Ġservices . require Service ( Profiles Controller Type :: class . java ) ĊĠĠĠĠĠ Ġval Ġbooks Controller Ġ= ĊĠĠĠĠĠĠĠ Ġservices . require Service ( Books Controller Type :: class . java ) ĊĠĠĠĠĠ Ġval Ġbook Registry Ġ= ĊĠĠĠĠĠĠĠ Ġservices . require Service ( Book Registry Type :: class . java ) ĊĠĠĠĠĠ Ġval Ġbuild Config Ġ= ĊĠĠĠĠĠĠĠ Ġservices . require Service ( Build Configuration ServiceType :: class . java ) ĊĊĠĠĠĠĠ Ġreturn ĠCatalog SAML 2 0 ViewModel ( ĊĠĠĠĠĠĠĠ Ġprofiles Controller Ġ= Ġprofiles Controller , ĊĠĠĠĠĠĠĠ Ġbooks Controller Ġ= Ġbooks Controller , ĊĠĠĠĠĠĠĠ Ġbook Registry Ġ= Ġbook Registry , ĊĠĠĠĠĠĠĠ Ġbuild Config Ġ= Ġbuild Config , ĊĠĠĠĠĠĠĠ Ġlistener Ġ= Ġthis . listener , ĊĠĠĠĠĠĠĠ Ġparameters Ġ= Ġthis . parameters , ĊĠĠĠĠĠĠĠ ĠwebView Data Dir Ġ= Ġthis . web ViewData Dir ĊĠĠĠĠĠ Ġ) Ġas ĠT ĊĠĠĠ Ġ} ĊĠĠĠ Ġthrow ĠIllegalStateException (" Can 't Ġcreate Ġvalues Ġof Ġ$ model Class ") ĊĠ Ġ} Ċ } Ċ