package Ġcom . network ed assets . git 4 c . core Ċ Ċ import Ġcom . network ed assets . git 4 c . application . Bus s ines Plugin Components Ċ import Ġcom . network ed assets . git 4 c . boundary . Create Pre defined Repository Command Ċ import Ġcom . network ed assets . git 4 c . boundary . Create Pre defined Repository Result Request Ċ import Ġcom . network ed assets . git 4 c . boundary . inbound . Pre defined Repository Ċ import Ġcom . network ed assets . git 4 c . boundary . outbound . Saved Pre defined Repository Ċ import Ġcom . network ed assets . git 4 c . boundary . outbound . exceptions . NotFoundException Ċ import Ġcom . network ed assets . git 4 c . core . bus s iness . Computation Cache Ċ import Ġcom . network ed assets . git 4 c . core . bus s iness . Source Plugin Ċ import Ġcom . network ed assets . git 4 c . core . common . Identifier Generator Ċ import Ġcom . network ed assets . git 4 c . core . datastore . repositories . Pre defined Repository Database Ċ import Ġcom . network ed assets . git 4 c . core . datastore . repositories . Repository Database Ċ import Ġcom . network ed assets . git 4 c . core . use case . async . Computation Result UseCase Ċ import Ġcom . network ed assets . git 4 c . core . use case . async . Multi Thread Async UseCase Ċ import Ġcom . network ed assets . git 4 c . data . Repository Ċ import Ġcom . network ed assets . git 4 c . data . Repository With No Authorization Ċ import Ġcom . network ed assets . git 4 c . data . Repository With Ssh Key Ċ import Ġcom . network ed assets . git 4 c . data . Repository With Username And Password Ċ Ċ class ĠCreate Pre defined Repository UseCase ( ĊĠĠĠĠĠĠĠ Ġcomponents : ĠB uss ines Plugin Components , ĊĠĠĠĠĠĠĠ Ġval Ġpredefined Repository Database : ĠPre defined Repository Database Ġ= Ġcomponents . database . pre defined Repository Database , ĊĠĠĠĠĠĠĠ Ġval Ġrepository Database : ĠRepository Database Ġ= Ġcomponents . providers . repository Provider , ĊĠĠĠĠĠĠĠ Ġval Ġimporter : ĠSource Plugin Ġ= Ġcomponents . macro . importer , ĊĠĠĠĠĠĠĠ Ġval Ġid Generator : ĠIdentifier Generator Ġ= Ġcomponents . utils . id Generator , ĊĠĠĠĠĠĠĠ Ġcomput ations : ĠComp utation Cache < Saved Pre defined Repository > Ġ= Ġcomponents . async . create Pre defined Repository UseCase Cache Ċ ) Ġ: ĠMulti Thread Async UseCase < Create Pre defined Repository Command , ĠSaved Pre defined Repository > Ċ ( components , Ġcomput ations , Ġ 1 ) Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġexecuted Async ( requestId : ĠString , Ġrequest : ĠCreate Pre defined Repository Command ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrepository Ġ= Ġdetect Repository ( request . pre defined Repository To Create ) ĊĠĠĠĠĠĠĠ Ġval Ġpredefined Repository Ġ= Ġcom . network ed assets . git 4 c . data . Pre defined Repository ( id Generator . generate New Identifier (), Ġrepository . uuid , Ġrequest . pre defined Repository To Create . repository Name ) ĊĊĠĠĠĠĠĠĠ Ġimporter . verify ( repository ). apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( is Ok ()) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġpredefined Repository Database . put ( pre defined Repository . uuid , Ġpredefined Repository ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġrepository Database . put ( repository . uuid , Ġrepository ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġsuccess ( requestId , ĠSaved Pre defined Repository ( pre defined Repository . uuid )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġerror ( requestId , ĠIllegalArgumentException ( status . name )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġreturn Ġerror ( requestId , ĠNotFound Exception ( request . transaction Info , Ġ"")) ĊĠĠĠ Ġ} ĊĊĊĠĠĠ Ġprivate Ġfun Ġdetect Repository ( repository To Create : ĠPre defined Repository ): ĠRepository Ġ{ ĊĠĠĠĠĠĠĠ Ġwhen Ġ( repository To Create . credentials ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġis Ġin UserName Password Ġ-> Ġreturn ĠRepository With Username And Password ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġid Generator . generate New Identifier (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġrepository To Create . source Repository Url , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġrepository To Create . editable , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġrepository To Create . credentials . username , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġrepository To Create . credentials . password ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġis Ġin Ssh Key Ġ-> Ġreturn ĠRepository With Ssh Key ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġid Generator . generate New Identifier (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġrepository To Create . source Repository Url , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġrepository To Create . editable , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġrepository To Create . credentials . ssh Key ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġis Ġin No Auth Ġ-> Ġreturn ĠRepository With No Authorization ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġid Generator . generate New Identifier (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġrepository To Create . source Repository Url , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġrepository To Create . editable ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġelse Ġ-> Ġthrow ĠRuntimeException (" Unknown Ġauth Ġtype : Ġ${ repository To Create . credentials . java Class }") ĊĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ Ċ } Ċ Ċ class ĠCreate Pre defined Repository Result UseCase ( ĊĠĠĠĠĠĠĠ Ġcomponents : ĠB uss ines Plugin Components , ĊĠĠĠĠĠĠĠ Ġcomput ations : ĠComp utation Cache < Saved Pre defined Repository > Ġ= Ġcomponents . async . create Pre defined Repository UseCase Cache Ċ ) Ġ: ĠComp utation Result UseCase < Create Pre defined Repository Result Request , ĠSaved Pre defined Repository >( components , Ġcomput ations )