/* ĊĠĠĠ ĠCopyright Ġ 2 0 1 9 - 2 0 2 0 Ġe Mob il ify ĠGmbH ĊĊĠĠĠ ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); ĊĠĠĠ Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . ĊĠĠĠ ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat ĊĊĠĠĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 ĊĊĠĠĠ ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware ĊĠĠĠ Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , ĊĠĠĠ ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . ĊĠĠĠ ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand ĊĠĠĠ Ġlimitations Ġunder Ġthe ĠLicense . Ċ */ Ċ Ċ package Ġs nc . open ch arging network . node . repositories Ċ Ċ import Ġorg . springframework . data . repository . Crud Repository Ċ import Ġs nc . open ch arging network . node . models . entities .* Ċ import Ġs nc . open ch arging network . node . models . oc pi . Basic Role Ċ import Ġs nc . open ch arging network . node . models . oc pi . Interface Role Ċ Ċ interface ĠPlatform Repository : ĠCr ud Repository < Platform Entity , ĠLong > Ġ{ ĊĠĠĠ Ġfun Ġexists By Auth _ Token A ( token A : ĠString ?): ĠBoolean ĊĠĠĠ Ġfun Ġexists By Auth _ Token C ( token C : ĠString ?): ĠBoolean ĊĠĠĠ Ġfun ĠfindBy Auth _ Token A ( token A : ĠString ?): ĠPlatform Entity ? ĊĠĠĠ Ġfun ĠfindBy Auth _ Token C ( token C : ĠString ?): ĠPlatform Entity ? Ċ } Ċ Ċ interface ĠRole Repository : ĠCr ud Repository < Role Entity , ĠLong > Ġ{ ĊĠĠĠ Ġ// Ġused Ġin Ġregistration Ġto Ġprevent Ġmultiple Ġroles Ġof Ġthe Ġsame Ġcountry _ code / party _ id Ġcombination ĊĠĠĠ Ġfun Ġexists By CountryCode And Party ID All IgnoreCase ( country Code : ĠString , Ġparty ID : ĠString ): ĠBoolean ĊĠĠĠ Ġ// Ġused Ġto Ġensure Ġsender 's Ġrole Ġis Ġregistered Ġto Ġa Ġplatform Ġon Ġthe Ġbroker Ġ( hub ) ĊĠĠĠ Ġfun Ġexists By Platform ID And CountryCode And Party ID All IgnoreCase ( platform ID : ĠLong ?, Ġcountry Code : ĠString , Ġparty ID : ĠString ): ĠBoolean ĊĠĠĠ Ġ// Ġused Ġin Ġrouting Ġto Ġfind Ġroles Ġregistered Ġwith Ġbroker Ġ( hub ) ĊĠĠĠ Ġfun ĠfindBy CountryCode And Party ID All IgnoreCase ( country Code : ĠString , Ġparty ID : ĠString ): ĠRole Entity ? ĊĠĠĠ Ġfun ĠfindAll By CountryCode And Party ID All IgnoreCase ( country Code : ĠString , Ġparty ID : ĠString ): ĠIterable < Role Entity > ĊĠĠĠ Ġfun ĠfindAll By Platform ID ( platform ID : ĠLong ?): ĠIterable < Role Entity > ĊĠĠĠ Ġfun Ġdelete By Platform ID ( platform ID : ĠLong ?) Ċ } Ċ Ċ interface ĠEndpoint Repository : ĠCr ud Repository < Endpoint Entity , ĠLong > Ġ{ ĊĠĠĠ Ġfun ĠfindBy Platform ID ( platform ID : ĠLong ?): ĠIterable < Endpoint Entity > ĊĠĠĠ Ġfun ĠfindBy Platform ID And Identifier And Role ( platform ID : ĠLong ?, Ġidentifier : ĠString , ĠRole : ĠInterface Role ): ĠEndpoint Entity ? ĊĠĠĠ Ġfun Ġdelete By Platform ID ( platform ID : ĠLong ?) Ċ } Ċ Ċ interface ĠProxy Resource Repository : ĠCr ud Repository < Proxy Resource Entity , ĠLong > Ġ{ ĊĠĠĠ Ġfun Ġfind ById And Sender And Receiver ( id : ĠLong ?, Ġsender : ĠBasic Role , Ġreceiver : ĠBasic Role ): ĠProxy Resource Entity ? ĊĠĠĠ Ġfun ĠfindBy Alternative UID And Sender And Receiver ( alternative UID : ĠString , Ġsender : ĠBasic Role , Ġreceiver : ĠBasic Role ): ĠProxy Resource Entity ? Ċ } Ċ Ċ interface ĠO cn Rules List Repository : ĠCr ud Repository < O cn Rules List Entity , ĠLong > Ġ{ ĊĠĠĠ Ġfun Ġexists By Counter party ( party : ĠBasic Role ): ĠBoolean ĊĠĠĠ Ġfun ĠfindAll By Platform ID ( platform ID : ĠLong ?): ĠIterable < O cn Rules List Entity > ĊĠĠĠ Ġfun Ġdelete By Platform ID ( platform ID : ĠLong ?) ĊĠĠĠ Ġfun Ġdelete By Platform ID And Counter party ( platform ID : ĠLong ?, Ġparty : ĠBasic Role ) Ċ }