java-design-patterns/business-delegate/etc/business-delegate.urm.puml
Ilkka Seppälä 7ac468db20
docs: #590 refactor and add explanation for business delegate (#1686)
Type: docs and refactoring

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2021-03-22 12:04:56 +05:30

46 lines
1.3 KiB
Plaintext

@startuml
package com.iluwatar.business.delegate {
class App {
+ App()
+ main(args : String[]) {static}
}
class BusinessDelegate {
- lookupService : BusinessLookup
+ BusinessDelegate()
+ playbackMovie(movie : String)
+ setLookupService(lookupService : BusinessLookup)
}
class BusinessLookup {
- netflixService : NetflixService
- youTubeService : YouTubeService
+ BusinessLookup()
+ getBusinessService(movie : String) : VideoStreamingService
+ setNetflixService(netflixService : NetflixService)
+ setYouTubeService(youTubeService : YouTubeService)
}
class MobileClient {
- businessDelegate : BusinessDelegate
+ MobileClient(businessDelegate : BusinessDelegate)
+ playbackMovie(movie : String)
}
class NetflixService {
- LOGGER : Logger {static}
+ NetflixService()
+ doProcessing()
}
interface VideoStreamingService {
+ doProcessing() {abstract}
}
class YouTubeService {
- LOGGER : Logger {static}
+ YouTubeService()
+ doProcessing()
}
}
BusinessLookup --> "-netflixService" NetflixService
BusinessLookup --> "-youTubeService" YouTubeService
MobileClient --> "-businessDelegate" BusinessDelegate
BusinessDelegate --> "-lookupService" BusinessLookup
NetflixService ..|> VideoStreamingService
YouTubeService ..|> VideoStreamingService
@enduml