UML generation: Mark the urm-maven-plugin execution to be ignored in Eclipse and recreate all .puml files
This commit is contained in:
@ -1,31 +1,47 @@
|
||||
@startuml
|
||||
package com.iluwatar.hexagonal.service {
|
||||
class LotteryServiceImpl {
|
||||
- bank : WireTransfers
|
||||
- notifications : LotteryNotifications
|
||||
- repository : LotteryTicketRepository
|
||||
+ LotteryServiceImpl()
|
||||
+ checkTicketForPrize(id : LotteryTicketId, winningNumbers : LotteryNumbers) : LotteryTicketCheckResult
|
||||
+ submitTicket(ticket : LotteryTicket) : Optional<LotteryTicketId>
|
||||
package com.iluwatar.hexagonal.sampledata {
|
||||
class SampleData {
|
||||
- PLAYERS : List<PlayerDetails> {static}
|
||||
+ SampleData()
|
||||
- getRandomPlayerDetails() : PlayerDetails {static}
|
||||
+ submitTickets(lotteryService : LotteryService, numTickets : int) {static}
|
||||
}
|
||||
interface LotteryService {
|
||||
+ checkTicketForPrize(LotteryTicketId, LotteryNumbers) : LotteryTicketCheckResult {abstract}
|
||||
+ submitTicket(LotteryTicket) : Optional<LotteryTicketId> {abstract}
|
||||
}
|
||||
package com.iluwatar.hexagonal.service {
|
||||
class ConsoleLottery {
|
||||
+ ConsoleLottery()
|
||||
+ main(args : String[]) {static}
|
||||
- printMainMenu() {static}
|
||||
- readString(scanner : Scanner) : String {static}
|
||||
}
|
||||
}
|
||||
package com.iluwatar.hexagonal.mongo {
|
||||
class MongoConnectionPropertiesLoader {
|
||||
- DEFAULT_HOST : String {static}
|
||||
- DEFAULT_PORT : int {static}
|
||||
+ MongoConnectionPropertiesLoader()
|
||||
+ load() {static}
|
||||
}
|
||||
}
|
||||
package com.iluwatar.hexagonal.domain {
|
||||
class LotteryTicketId {
|
||||
- id : UUID
|
||||
- id : int
|
||||
- numAllocated : int {static}
|
||||
+ LotteryTicketId()
|
||||
+ getId() : UUID
|
||||
+ LotteryTicketId(id : int)
|
||||
+ equals(o : Object) : boolean
|
||||
+ getId() : int
|
||||
+ hashCode() : int
|
||||
+ toString() : String
|
||||
}
|
||||
class LotteryConstants {
|
||||
+ PLAYER_MAX_SALDO : int {static}
|
||||
+ PRIZE_AMOUNT : int {static}
|
||||
+ SERVICE_BANK_ACCOUNT : String {static}
|
||||
+ SERVICE_BANK_ACCOUNT_SALDO : int {static}
|
||||
+ TICKET_PRIZE : int {static}
|
||||
+ LotteryConstants()
|
||||
class LotteryAdministration {
|
||||
- notifications : LotteryEventLog
|
||||
- repository : LotteryTicketRepository
|
||||
- wireTransfers : WireTransfers
|
||||
+ LotteryAdministration(repository : LotteryTicketRepository, notifications : LotteryEventLog, wireTransfers : WireTransfers)
|
||||
+ getAllSubmittedTickets() : Map<LotteryTicketId, LotteryTicket>
|
||||
+ performLottery() : LotteryNumbers
|
||||
+ resetLottery()
|
||||
}
|
||||
class LotteryNumbers {
|
||||
+ MAX_NUMBER : int {static}
|
||||
@ -39,19 +55,34 @@ package com.iluwatar.hexagonal.domain {
|
||||
+ equals(obj : Object) : boolean
|
||||
- generateRandomNumbers()
|
||||
+ getNumbers() : Set<Integer>
|
||||
+ getNumbersAsString() : String
|
||||
+ hashCode() : int
|
||||
+ toString() : String
|
||||
}
|
||||
class LotteryService {
|
||||
- notifications : LotteryEventLog
|
||||
- repository : LotteryTicketRepository
|
||||
- wireTransfers : WireTransfers
|
||||
+ LotteryService(repository : LotteryTicketRepository, notifications : LotteryEventLog, wireTransfers : WireTransfers)
|
||||
+ checkTicketForPrize(id : LotteryTicketId, winningNumbers : LotteryNumbers) : LotteryTicketCheckResult
|
||||
+ submitTicket(ticket : LotteryTicket) : Optional<LotteryTicketId>
|
||||
}
|
||||
-class RandomNumberGenerator {
|
||||
- randomIterator : OfInt
|
||||
+ RandomNumberGenerator(min : int, max : int)
|
||||
+ nextInt() : int
|
||||
}
|
||||
class PlayerDetails {
|
||||
- bankAccountNumber : String
|
||||
- emailAddress : String
|
||||
- phoneNumber : String
|
||||
- PlayerDetails(email : String, bankAccount : String, phone : String)
|
||||
+ create(email : String, bankAccount : String, phone : String) : PlayerDetails {static}
|
||||
+ PlayerDetails(email : String, bankAccount : String, phone : String)
|
||||
+ equals(obj : Object) : boolean
|
||||
+ getBankAccount() : String
|
||||
+ getEmail() : String
|
||||
+ getPhoneNumber() : String
|
||||
+ hashCode() : int
|
||||
+ toString() : String
|
||||
}
|
||||
class LotteryTicketCheckResult {
|
||||
- checkResult : CheckResult
|
||||
@ -63,20 +94,30 @@ package com.iluwatar.hexagonal.domain {
|
||||
+ getResult() : CheckResult
|
||||
+ hashCode() : int
|
||||
}
|
||||
class LotteryConstants {
|
||||
+ PLAYER_MAX_SALDO : int {static}
|
||||
+ PRIZE_AMOUNT : int {static}
|
||||
+ SERVICE_BANK_ACCOUNT : String {static}
|
||||
+ SERVICE_BANK_ACCOUNT_SALDO : int {static}
|
||||
+ TICKET_PRIZE : int {static}
|
||||
- LotteryConstants()
|
||||
}
|
||||
class LotteryTicket {
|
||||
- id : LotteryTicketId
|
||||
- lotteryNumbers : LotteryNumbers
|
||||
- playerDetails : PlayerDetails
|
||||
- LotteryTicket(details : PlayerDetails, numbers : LotteryNumbers)
|
||||
+ create(details : PlayerDetails, numbers : LotteryNumbers) : LotteryTicket {static}
|
||||
+ LotteryTicket(id : LotteryTicketId, details : PlayerDetails, numbers : LotteryNumbers)
|
||||
+ equals(obj : Object) : boolean
|
||||
+ getId() : LotteryTicketId
|
||||
+ getNumbers() : LotteryNumbers
|
||||
+ getPlayerDetails() : PlayerDetails
|
||||
+ hashCode() : int
|
||||
+ setId(id : LotteryTicketId)
|
||||
+ toString() : String
|
||||
}
|
||||
-class RandomNumberGenerator {
|
||||
- randomIterator : OfInt
|
||||
+ RandomNumberGenerator(min : int, max : int)
|
||||
+ nextInt() : int
|
||||
class LotteryUtils {
|
||||
- LotteryUtils()
|
||||
+ checkTicketForPrize(repository : LotteryTicketRepository, id : LotteryTicketId, winningNumbers : LotteryNumbers) : LotteryTicketCheckResult {static}
|
||||
}
|
||||
enum CheckResult {
|
||||
+ NO_PRIZE {static}
|
||||
@ -87,23 +128,64 @@ package com.iluwatar.hexagonal.domain {
|
||||
}
|
||||
}
|
||||
package com.iluwatar.hexagonal.banking {
|
||||
class WireTransfersImpl {
|
||||
- accounts : Map<String, Integer> {static}
|
||||
+ WireTransfersImpl()
|
||||
+ getFunds(bankAccount : String) : int
|
||||
+ setFunds(bankAccount : String, amount : int)
|
||||
+ transferFunds(amount : int, sourceBackAccount : String, destinationBankAccount : String) : boolean
|
||||
}
|
||||
interface WireTransfers {
|
||||
+ getFunds(String) : int {abstract}
|
||||
+ setFunds(String, int) {abstract}
|
||||
+ transferFunds(int, String, String) : boolean {abstract}
|
||||
}
|
||||
class MongoBank {
|
||||
- DEFAULT_ACCOUNTS_COLLECTION : String {static}
|
||||
- DEFAULT_DB : String {static}
|
||||
- accountsCollection : MongoCollection<Document>
|
||||
- database : MongoDatabase
|
||||
- mongoClient : MongoClient
|
||||
+ MongoBank()
|
||||
+ MongoBank(dbName : String, accountsCollectionName : String)
|
||||
+ connect()
|
||||
+ connect(dbName : String, accountsCollectionName : String)
|
||||
+ getAccountsCollection() : MongoCollection<Document>
|
||||
+ getFunds(bankAccount : String) : int
|
||||
+ getMongoClient() : MongoClient
|
||||
+ getMongoDatabase() : MongoDatabase
|
||||
+ setFunds(bankAccount : String, amount : int)
|
||||
+ transferFunds(amount : int, sourceBackAccount : String, destinationBankAccount : String) : boolean
|
||||
}
|
||||
class InMemoryBank {
|
||||
- accounts : Map<String, Integer> {static}
|
||||
+ InMemoryBank()
|
||||
+ getFunds(bankAccount : String) : int
|
||||
+ setFunds(bankAccount : String, amount : int)
|
||||
+ transferFunds(amount : int, sourceBackAccount : String, destinationBankAccount : String) : boolean
|
||||
}
|
||||
}
|
||||
package com.iluwatar.hexagonal.database {
|
||||
class LotteryTicketInMemoryRepository {
|
||||
class MongoTicketRepository {
|
||||
- DEFAULT_COUNTERS_COLLECTION : String {static}
|
||||
- DEFAULT_DB : String {static}
|
||||
- DEFAULT_TICKETS_COLLECTION : String {static}
|
||||
- countersCollection : MongoCollection<Document>
|
||||
- database : MongoDatabase
|
||||
- mongoClient : MongoClient
|
||||
- ticketsCollection : MongoCollection<Document>
|
||||
+ MongoTicketRepository()
|
||||
+ MongoTicketRepository(dbName : String, ticketsCollectionName : String, countersCollectionName : String)
|
||||
+ connect()
|
||||
+ connect(dbName : String, ticketsCollectionName : String, countersCollectionName : String)
|
||||
+ deleteAll()
|
||||
- docToTicket(doc : Document) : LotteryTicket
|
||||
+ findAll() : Map<LotteryTicketId, LotteryTicket>
|
||||
+ findById(id : LotteryTicketId) : Optional<LotteryTicket>
|
||||
+ getCountersCollection() : MongoCollection<Document>
|
||||
+ getMongoClient() : MongoClient
|
||||
+ getMongoDatabase() : MongoDatabase
|
||||
+ getNextId() : int
|
||||
+ getTicketsCollection() : MongoCollection<Document>
|
||||
- initCounters()
|
||||
+ save(ticket : LotteryTicket) : Optional<LotteryTicketId>
|
||||
}
|
||||
class InMemoryTicketRepository {
|
||||
- tickets : Map<LotteryTicketId, LotteryTicket> {static}
|
||||
+ LotteryTicketInMemoryRepository()
|
||||
+ InMemoryTicketRepository()
|
||||
+ deleteAll()
|
||||
+ findAll() : Map<LotteryTicketId, LotteryTicket>
|
||||
+ findById(id : LotteryTicketId) : Optional<LotteryTicket>
|
||||
@ -116,68 +198,79 @@ package com.iluwatar.hexagonal.database {
|
||||
+ save(LotteryTicket) : Optional<LotteryTicketId> {abstract}
|
||||
}
|
||||
}
|
||||
package com.iluwatar.hexagonal.eventlog {
|
||||
interface LotteryNotifications {
|
||||
+ notifyNoWin(PlayerDetails) {abstract}
|
||||
+ notifyPrize(PlayerDetails, int) {abstract}
|
||||
+ notifyPrizeError(PlayerDetails, int) {abstract}
|
||||
+ notifyTicketSubmitError(PlayerDetails) {abstract}
|
||||
+ notifyTicketSubmitted(PlayerDetails) {abstract}
|
||||
}
|
||||
class LotteryNotificationsImpl {
|
||||
+ LotteryNotificationsImpl()
|
||||
+ notifyNoWin(details : PlayerDetails)
|
||||
+ notifyPrize(details : PlayerDetails, prizeAmount : int)
|
||||
+ notifyPrizeError(details : PlayerDetails, prizeAmount : int)
|
||||
+ notifyTicketSubmitError(details : PlayerDetails)
|
||||
+ notifyTicketSubmitted(details : PlayerDetails)
|
||||
}
|
||||
}
|
||||
package com.iluwatar.hexagonal {
|
||||
class App {
|
||||
- allPlayerDetails : List<PlayerDetails> {static}
|
||||
+ App()
|
||||
- getRandomPlayerDetails() : PlayerDetails {static}
|
||||
+ main(args : String[]) {static}
|
||||
- submitTickets(lotteryService : LotteryService, numTickets : int) {static}
|
||||
}
|
||||
}
|
||||
package com.iluwatar.hexagonal.administration {
|
||||
interface LotteryAdministration {
|
||||
+ getAllSubmittedTickets() : Map<LotteryTicketId, LotteryTicket> {abstract}
|
||||
+ performLottery() : LotteryNumbers {abstract}
|
||||
+ resetLottery() {abstract}
|
||||
}
|
||||
class LotteryAdministrationImpl {
|
||||
- bank : WireTransfers
|
||||
- notifications : LotteryNotifications
|
||||
- repository : LotteryTicketRepository
|
||||
- service : LotteryService
|
||||
+ LotteryAdministrationImpl()
|
||||
+ getAllSubmittedTickets() : Map<LotteryTicketId, LotteryTicket>
|
||||
+ performLottery() : LotteryNumbers
|
||||
+ resetLottery()
|
||||
class ConsoleAdministration {
|
||||
+ ConsoleAdministration()
|
||||
+ main(args : String[]) {static}
|
||||
- printMainMenu() {static}
|
||||
- readString(scanner : Scanner) : String {static}
|
||||
}
|
||||
}
|
||||
package com.iluwatar.hexagonal.eventlog {
|
||||
interface LotteryEventLog {
|
||||
+ prizeError(PlayerDetails, int) {abstract}
|
||||
+ ticketDidNotWin(PlayerDetails) {abstract}
|
||||
+ ticketSubmitError(PlayerDetails) {abstract}
|
||||
+ ticketSubmitted(PlayerDetails) {abstract}
|
||||
+ ticketWon(PlayerDetails, int) {abstract}
|
||||
}
|
||||
class StdOutEventLog {
|
||||
+ StdOutEventLog()
|
||||
+ prizeError(details : PlayerDetails, prizeAmount : int)
|
||||
+ ticketDidNotWin(details : PlayerDetails)
|
||||
+ ticketSubmitError(details : PlayerDetails)
|
||||
+ ticketSubmitted(details : PlayerDetails)
|
||||
+ ticketWon(details : PlayerDetails, prizeAmount : int)
|
||||
}
|
||||
class MongoEventLog {
|
||||
- DEFAULT_DB : String {static}
|
||||
- DEFAULT_EVENTS_COLLECTION : String {static}
|
||||
- database : MongoDatabase
|
||||
- eventsCollection : MongoCollection<Document>
|
||||
- mongoClient : MongoClient
|
||||
- stdOutEventLog : StdOutEventLog
|
||||
+ MongoEventLog()
|
||||
+ MongoEventLog(dbName : String, eventsCollectionName : String)
|
||||
+ connect()
|
||||
+ connect(dbName : String, eventsCollectionName : String)
|
||||
+ getEventsCollection() : MongoCollection<Document>
|
||||
+ getMongoClient() : MongoClient
|
||||
+ getMongoDatabase() : MongoDatabase
|
||||
+ prizeError(details : PlayerDetails, prizeAmount : int)
|
||||
+ ticketDidNotWin(details : PlayerDetails)
|
||||
+ ticketSubmitError(details : PlayerDetails)
|
||||
+ ticketSubmitted(details : PlayerDetails)
|
||||
+ ticketWon(details : PlayerDetails, prizeAmount : int)
|
||||
}
|
||||
}
|
||||
LotteryAdministration --+ LotteryTicketCheckResult
|
||||
LotteryTicket --> "-playerDetails" PlayerDetails
|
||||
LotteryAdministrationImpl --> "-bank" WireTransfers
|
||||
App --> "-allPlayerDetails" PlayerDetails
|
||||
MongoEventLog --> "-stdOutEventLog" StdOutEventLog
|
||||
LotteryService --> "-wireTransfers" WireTransfers
|
||||
LotteryAdministration --> "-notifications" LotteryEventLog
|
||||
RandomNumberGenerator ..+ PrimitiveIterator
|
||||
LotteryAdministrationImpl --> "-repository" LotteryTicketRepository
|
||||
LotteryAdministrationImpl --+ LotteryTicketCheckResult
|
||||
LotteryServiceImpl --> "-notifications" LotteryNotifications
|
||||
LotteryAdministration --> "-wireTransfers" WireTransfers
|
||||
LotteryTicket --> "-id" LotteryTicketId
|
||||
LotteryService --> "-notifications" LotteryEventLog
|
||||
LotteryAdministration --> "-repository" LotteryTicketRepository
|
||||
LotteryTicket --> "-lotteryNumbers" LotteryNumbers
|
||||
LotteryAdministrationImpl --> "-notifications" LotteryNotifications
|
||||
LotteryServiceImpl --> "-repository" LotteryTicketRepository
|
||||
LotteryServiceImpl --+ LotteryTicketCheckResult
|
||||
LotteryServiceImpl --> "-bank" WireTransfers
|
||||
SampleData --> "-PLAYERS" PlayerDetails
|
||||
ConsoleLottery --+ LotteryTicketCheckResult
|
||||
RandomNumberGenerator ..+ LotteryNumbers
|
||||
LotteryAdministrationImpl --> "-service" LotteryService
|
||||
LotteryService --> "-repository" LotteryTicketRepository
|
||||
LotteryUtils --+ LotteryTicketCheckResult
|
||||
LotteryTicketCheckResult --> "-checkResult" CheckResult
|
||||
CheckResult ..+ LotteryTicketCheckResult
|
||||
LotteryTicketInMemoryRepository ..|> LotteryTicketRepository
|
||||
WireTransfersImpl ..|> WireTransfers
|
||||
LotteryServiceImpl ..|> LotteryService
|
||||
LotteryNotificationsImpl ..|> LotteryNotifications
|
||||
LotteryAdministrationImpl ..|> LotteryAdministration
|
||||
MongoTicketRepository ..|> LotteryTicketRepository
|
||||
MongoBank ..|> WireTransfers
|
||||
InMemoryBank ..|> WireTransfers
|
||||
StdOutEventLog ..|> LotteryEventLog
|
||||
InMemoryTicketRepository ..|> LotteryTicketRepository
|
||||
MongoEventLog ..|> LotteryEventLog
|
||||
@enduml
|
Reference in New Issue
Block a user