diff --git a/services/contracts/src/main/java/com/workup/contracts/RabbitMQListener.java b/services/contracts/src/main/java/com/workup/contracts/RabbitMQListener.java index a02686aa..6023bf76 100644 --- a/services/contracts/src/main/java/com/workup/contracts/RabbitMQListener.java +++ b/services/contracts/src/main/java/com/workup/contracts/RabbitMQListener.java @@ -38,7 +38,8 @@ public class RabbitMQListener { public CompletableFuture receive(InitiateContractRequest in) throws Exception { InitiateContractResponse response = - ((InitiateContractCommand) commandMap.getCommand("InitiateContract")).Run(in); + (InitiateContractResponse) + ((Command) commandMap.getCommand("InitiateContract")).Run(in); return CompletableFuture.completedFuture(response); } @@ -47,8 +48,9 @@ public CompletableFuture receive(InitiateContractReque public CompletableFuture receive(ContractTerminationRequest in) throws Exception { return CompletableFuture.completedFuture( - ((RequestContractTerminationCommand) commandMap.getCommand("RequestContractTermination")) - .Run(in)); + (RequestContractTerminationResponse) + ((Command) commandMap.getCommand("RequestContractTermination")) + .Run(in)); } @RabbitHandler @@ -56,8 +58,9 @@ public CompletableFuture receive(ContractTerminatio public CompletableFuture receive(HandleTerminationRequest in) throws Exception { return CompletableFuture.completedFuture( - ((HandleTerminationRequestCommand) commandMap.getCommand("HandleTerminationRequest")) - .Run(in)); + (HandleTerminationRequestResponse) + ((Command) commandMap.getCommand("HandleTerminationRequest")) + .Run(in)); } @RabbitHandler @@ -65,7 +68,8 @@ public CompletableFuture receive(HandleTerminationReq public CompletableFuture receive(MarkPaymentCompletedRequest in) throws Exception { return CompletableFuture.completedFuture( - ((MarkMilestoneAsPaidCommand) commandMap.getCommand("MarkMilestoneAsPaid")).Run(in)); + (MarkMilestoneAsPaidResponse) + ((Command) commandMap.getCommand("MarkMilestoneAsPaid")).Run(in)); } @RabbitHandler @@ -73,14 +77,16 @@ public CompletableFuture receive(MarkPaymentComple public CompletableFuture receive(ViewContractMilestonesRequest in) throws Exception { return CompletableFuture.completedFuture( - ((ViewContractMilestonesCommand) commandMap.getCommand("ViewContractMilestones")).Run(in)); + (ViewContractMilestonesResponse) + ((Command) commandMap.getCommand("ViewContractMilestones")).Run(in)); } @RabbitHandler @Async public CompletableFuture receive(GetContractRequest in) throws Exception { return CompletableFuture.completedFuture( - ((GetContractCommand) commandMap.getCommand("GetContract")).Run(in)); + (GetContractResponse) + ((Command) commandMap.getCommand("GetContract")).Run(in)); } @RabbitHandler @@ -88,7 +94,8 @@ public CompletableFuture receive(GetContractRequest in) thr public CompletableFuture receive(EvaluateMilestoneRequest in) throws Exception { return CompletableFuture.completedFuture( - ((EvaluateMilestoneCommand) commandMap.getCommand("EvaluateMilestone")).Run(in)); + (EvaluateMilestoneResponse) + ((Command) commandMap.getCommand("EvaluateMilestone")).Run(in)); } @RabbitHandler @@ -96,7 +103,8 @@ public CompletableFuture receive(EvaluateMilestoneReq public CompletableFuture receive(ProgressMilestoneRequest in) throws Exception { return CompletableFuture.completedFuture( - ((ProgressMilestoneCommand) commandMap.getCommand("ProgressMilestone")).Run(in)); + (ProgressMilestoneResponse) + ((Command) commandMap.getCommand("ProgressMilestone")).Run(in)); } @RabbitHandler @@ -104,7 +112,8 @@ public CompletableFuture receive(ProgressMilestoneReq public CompletableFuture receive(GetPendingTerminationsRequest in) throws Exception { return CompletableFuture.completedFuture( - ((GetPendingTerminationsCommand) commandMap.getCommand("GetPendingTerminations")).Run(in)); + (GetPendingTerminationsResponse) + ((Command) commandMap.getCommand("GetPendingTerminations")).Run(in)); } // NEW_COMMAND_BOILERPLATE diff --git a/services/jobs/src/main/java/com/workup/jobs/RabbitMQListener.java b/services/jobs/src/main/java/com/workup/jobs/RabbitMQListener.java index 76e5a1b7..21d38611 100644 --- a/services/jobs/src/main/java/com/workup/jobs/RabbitMQListener.java +++ b/services/jobs/src/main/java/com/workup/jobs/RabbitMQListener.java @@ -1,13 +1,6 @@ package com.workup.jobs; -import com.workup.jobs.commands.AcceptProposalCommand; -import com.workup.jobs.commands.CreateProposalCommand; -import com.workup.jobs.commands.GetJobByIdCommand; -import com.workup.jobs.commands.GetMyJobsCommand; -import com.workup.jobs.commands.GetMyProposalsCommand; -import com.workup.jobs.commands.GetProposalsByJobIdCommand; import com.workup.jobs.commands.JobCommandMap; -import com.workup.jobs.commands.SearchJobsCommand; import com.workup.shared.commands.Command; import com.workup.shared.commands.CommandRequest; import com.workup.shared.commands.jobs.proposals.requests.AcceptProposalRequest; @@ -54,7 +47,8 @@ public CompletableFuture receive(CreateJobRequest in) throws public CompletableFuture receive(CreateProposalRequest in) throws Exception { CreateProposalResponse response = - ((CreateProposalCommand) commandMap.getCommand("CreateProposal")).Run(in); + (CreateProposalResponse) + ((Command) commandMap.getCommand("CreateProposal")).Run(in); return CompletableFuture.completedFuture(response); } @@ -62,7 +56,8 @@ public CompletableFuture receive(CreateProposalRequest i @Async public CompletableFuture receive(GetJobByIdRequest request) throws Exception { GetJobByIdResponse response = - ((GetJobByIdCommand) commandMap.getCommand("GetJobById")).Run(request); + (GetJobByIdResponse) + ((Command) commandMap.getCommand("GetJobById")).Run(request); return CompletableFuture.completedFuture(response); } @@ -70,7 +65,8 @@ public CompletableFuture receive(GetJobByIdRequest request) @Async public CompletableFuture receive(SearchJobsRequest request) throws Exception { SearchJobsResponse response = - ((SearchJobsCommand) commandMap.getCommand("SearchJobs")).Run(request); + (SearchJobsResponse) + ((Command) commandMap.getCommand("SearchJobs")).Run(request); return CompletableFuture.completedFuture(response); } @@ -78,7 +74,8 @@ public CompletableFuture receive(SearchJobsRequest request) @Async public CompletableFuture receive(GetMyJobsRequest request) throws Exception { GetMyJobsResponse response = - ((GetMyJobsCommand) commandMap.getCommand("GetMyJobs")).Run(request); + (GetMyJobsResponse) + ((Command) commandMap.getCommand("GetMyJobs")).Run(request); return CompletableFuture.completedFuture(response); } @@ -87,7 +84,8 @@ public CompletableFuture receive(GetMyJobsRequest request) th public CompletableFuture receive(AcceptProposalRequest request) throws Exception { AcceptProposalResponse response = - ((AcceptProposalCommand) commandMap.getCommand("AcceptProposal")).Run(request); + (AcceptProposalResponse) + ((Command) commandMap.getCommand("AcceptProposal")).Run(request); return CompletableFuture.completedFuture(response); } @@ -96,7 +94,9 @@ public CompletableFuture receive(AcceptProposalRequest r public CompletableFuture receive(GetProposalsByJobIdRequest request) throws Exception { GetProposalsByJobIdResponse response = - ((GetProposalsByJobIdCommand) commandMap.getCommand("GetProposalsByJobId")).Run(request); + (GetProposalsByJobIdResponse) + ((Command) commandMap.getCommand("GetProposalsByJobId")) + .Run(request); return CompletableFuture.completedFuture(response); } @@ -105,7 +105,8 @@ public CompletableFuture receive(GetProposalsByJobI public CompletableFuture receive(GetMyProposalsRequest request) throws Exception { GetMyProposalsResponse response = - ((GetMyProposalsCommand) commandMap.getCommand("GetMyProposals")).Run(request); + (GetMyProposalsResponse) + ((Command) commandMap.getCommand("GetMyProposals")).Run(request); return CompletableFuture.completedFuture(response); } } diff --git a/services/payments/src/main/java/com/workup/payments/PaymentsApplication.java b/services/payments/src/main/java/com/workup/payments/PaymentsApplication.java index 819e50fc..dfd16f9b 100644 --- a/services/payments/src/main/java/com/workup/payments/PaymentsApplication.java +++ b/services/payments/src/main/java/com/workup/payments/PaymentsApplication.java @@ -3,7 +3,6 @@ import com.workup.shared.enums.ControllerQueueNames; import com.workup.shared.enums.ServiceQueueNames; import com.workup.shared.enums.ThreadPoolSize; - import org.springframework.amqp.core.AnonymousQueue; import org.springframework.amqp.core.Binding; import org.springframework.amqp.core.BindingBuilder; diff --git a/services/payments/src/main/java/com/workup/payments/RabbitMQListener.java b/services/payments/src/main/java/com/workup/payments/RabbitMQListener.java index 471a93ba..d2883070 100644 --- a/services/payments/src/main/java/com/workup/payments/RabbitMQListener.java +++ b/services/payments/src/main/java/com/workup/payments/RabbitMQListener.java @@ -2,14 +2,6 @@ import com.workup.payments.commands.PaymentCommandMap; import com.workup.payments.commands.paymentrequest.*; -import com.workup.payments.commands.paymenttransaction.GetClientPaymentTransactionsCommand; -import com.workup.payments.commands.paymenttransaction.GetFreelancerPaymentTransactionsCommand; -import com.workup.payments.commands.wallet.CreateWalletCommand; -import com.workup.payments.commands.wallet.GetWalletCommand; -import com.workup.payments.commands.wallettransaction.CreateWalletTransactionCommand; -import com.workup.payments.commands.wallettransaction.GetWalletTransactionCommand; -import com.workup.payments.commands.wallettransaction.GetWalletTransactionsCommand; -import com.workup.payments.commands.wallettransaction.WithdrawFromWalletCommand; import com.workup.shared.commands.payments.paymentrequest.requests.*; import com.workup.shared.commands.payments.paymentrequest.responses.*; import com.workup.shared.commands.payments.paymenttransaction.requests.GetClientPaymentTransactionsRequest; @@ -47,7 +39,8 @@ public class RabbitMQListener { public CompletableFuture receive(CreatePaymentRequestRequest in) throws Exception { return CompletableFuture.completedFuture( - ((CreatePaymentRequestCommand) commandMap.getCommand("CreatePaymentRequest")).Run(in)); + (CreatePaymentRequestResponse) + ((Command) commandMap.getCommand("CreatePaymentRequest")).Run(in)); } @RabbitHandler @@ -55,8 +48,9 @@ public CompletableFuture receive(CreatePaymentRequ public CompletableFuture receive( CreateWalletTransactionRequest in) throws Exception { return CompletableFuture.completedFuture( - ((CreateWalletTransactionCommand) commandMap.getCommand("CreateWalletTransaction")) - .Run(in)); + (CreateWalletTransactionResponse) + ((Command) commandMap.getCommand("CreateWalletTransaction")) + .Run(in)); } @RabbitHandler @@ -64,8 +58,9 @@ public CompletableFuture receive( public CompletableFuture receive( GetClientPaymentRequestsRequest in) throws Exception { return CompletableFuture.completedFuture( - ((GetClientPaymentRequestsCommand) commandMap.getCommand("GetClientPaymentRequests")) - .Run(in)); + (GetClientPaymentRequestsResponse) + ((Command) commandMap.getCommand("GetClientPaymentRequests")) + .Run(in)); } @RabbitHandler @@ -73,7 +68,8 @@ public CompletableFuture receive( public CompletableFuture receive(GetWalletTransactionRequest in) throws Exception { return CompletableFuture.completedFuture( - ((GetWalletTransactionCommand) commandMap.getCommand("GetWalletTransaction")).Run(in)); + (GetWalletTransactionResponse) + ((Command) commandMap.getCommand("GetWalletTransaction")).Run(in)); } @RabbitHandler @@ -81,7 +77,8 @@ public CompletableFuture receive(GetWalletTransact public CompletableFuture receive(GetWalletTransactionsRequest in) throws Exception { return CompletableFuture.completedFuture( - ((GetWalletTransactionsCommand) commandMap.getCommand("GetWalletTransactions")).Run(in)); + (GetWalletTransactionsResponse) + ((Command) commandMap.getCommand("GetWalletTransactions")).Run(in)); } @RabbitHandler @@ -89,7 +86,8 @@ public CompletableFuture receive(GetWalletTransac public CompletableFuture receive(WithdrawFromWalletRequest in) throws Exception { return CompletableFuture.completedFuture( - ((WithdrawFromWalletCommand) commandMap.getCommand("WithdrawFromWallet")).Run(in)); + (WithdrawFromWalletResponse) + ((Command) commandMap.getCommand("WithdrawFromWallet")).Run(in)); } @RabbitHandler @@ -97,9 +95,9 @@ public CompletableFuture receive(WithdrawFromWalletR public CompletableFuture receive( GetFreelancerPaymentRequestsRequest in) throws Exception { return CompletableFuture.completedFuture( - ((GetFreelancerPaymentRequestsCommand) - commandMap.getCommand("GetFreelancerPaymentRequests")) - .Run(in)); + (GetFreelancerPaymentRequestsResponse) + ((Command) commandMap.getCommand("GetFreelancerPaymentRequests")) + .Run(in)); } @RabbitHandler @@ -107,7 +105,8 @@ public CompletableFuture receive( public CompletableFuture receive(GetPaymentRequestRequest in) throws Exception { return CompletableFuture.completedFuture( - ((GetPaymentRequestCommand) commandMap.getCommand("GetPaymentRequest")).Run(in)); + (GetPaymentRequestResponse) + ((Command) commandMap.getCommand("GetPaymentRequest")).Run(in)); } @RabbitHandler @@ -115,21 +114,24 @@ public CompletableFuture receive(GetPaymentRequestReq public CompletableFuture receive(PayPaymentRequestRequest in) throws Exception { return CompletableFuture.completedFuture( - ((PayPaymentRequestCommand) commandMap.getCommand("PayPaymentRequest")).Run(in)); + (PayPaymentRequestResponse) + ((Command) commandMap.getCommand("PayPaymentRequest")).Run(in)); } @RabbitHandler @Async public CompletableFuture receive(CreateWalletRequest in) throws Exception { return CompletableFuture.completedFuture( - ((CreateWalletCommand) commandMap.getCommand("CreateWallet")).Run(in)); + (CreateWalletResponse) + ((Command) commandMap.getCommand("CreateWallet")).Run(in)); } @RabbitHandler @Async public CompletableFuture receive(GetWalletRequest in) throws Exception { return CompletableFuture.completedFuture( - ((GetWalletCommand) commandMap.getCommand("GetWallet")).Run(in)); + (GetWalletResponse) + ((Command) commandMap.getCommand("GetWallet")).Run(in)); } @RabbitHandler @@ -137,9 +139,9 @@ public CompletableFuture receive(GetWalletRequest in) throws public CompletableFuture receive( GetClientPaymentTransactionsRequest in) throws Exception { return CompletableFuture.completedFuture( - ((GetClientPaymentTransactionsCommand) - commandMap.getCommand("GetClientPaymentTransactions")) - .Run(in)); + (GetClientPaymentTransactionsResponse) + ((Command) commandMap.getCommand("GetClientPaymentTransactions")) + .Run(in)); } @RabbitHandler @@ -147,8 +149,8 @@ public CompletableFuture receive( public CompletableFuture receive( GetFreelancerPaymentTransactionsRequest in) throws Exception { return CompletableFuture.completedFuture( - ((GetFreelancerPaymentTransactionsCommand) - commandMap.getCommand("GetFreelancerPaymentTransactions")) - .Run(in)); + (GetFreelancerPaymentTransactionsResponse) + ((Command) commandMap.getCommand("GetFreelancerPaymentTransactions")) + .Run(in)); } } diff --git a/services/users/src/main/java/com/workup/users/RabbitMQListener.java b/services/users/src/main/java/com/workup/users/RabbitMQListener.java index 1d13eb51..9aa8de9a 100644 --- a/services/users/src/main/java/com/workup/users/RabbitMQListener.java +++ b/services/users/src/main/java/com/workup/users/RabbitMQListener.java @@ -23,8 +23,9 @@ public class RabbitMQListener { public CompletableFuture receive( FreelancerGetProfileBriefRequest in) throws Exception { return CompletableFuture.completedFuture( - ((FreelancerGetProfileBriefCommand) commandMap.getCommand("FreelancerGetProfileBrief")) - .Run(in)); + (FreelancerGetProfileBriefResponse) + ((Command) commandMap.getCommand("FreelancerGetProfileBrief")) + .Run(in)); } @RabbitHandler @@ -32,7 +33,8 @@ public CompletableFuture receive( public CompletableFuture receive(FreelancerGetProfileRequest in) throws Exception { return CompletableFuture.completedFuture( - ((FreelancerGetProfileCommand) commandMap.getCommand("FreelancerGetProfile")).Run(in)); + (FreelancerGetProfileResponse) + ((Command) commandMap.getCommand("FreelancerGetProfile")).Run(in)); } @RabbitHandler @@ -40,7 +42,8 @@ public CompletableFuture receive(FreelancerGetProf public CompletableFuture receive(FreelancerGetResumeRequest in) throws Exception { return CompletableFuture.completedFuture( - ((FreelancerGetResumeCommand) commandMap.getCommand("FreelancerGetResume")).Run(in)); + (FreelancerGetResumeResponse) + ((Command) commandMap.getCommand("FreelancerGetResume")).Run(in)); } @RabbitHandler @@ -48,7 +51,8 @@ public CompletableFuture receive(FreelancerGetResum public CompletableFuture receive(FreelancerSetPhotoRequest in) throws Exception { return CompletableFuture.completedFuture( - ((FreelancerSetPhotoCommand) commandMap.getCommand("FreelancerSetPhoto")).Run(in)); + (FreelancerSetPhotoResponse) + ((Command) commandMap.getCommand("FreelancerSetPhoto")).Run(in)); } @RabbitHandler @@ -56,7 +60,8 @@ public CompletableFuture receive(FreelancerSetPhotoR public CompletableFuture receive(FreelancerSetProfileRequest in) throws Exception { return CompletableFuture.completedFuture( - ((FreelancerSetProfileCommand) commandMap.getCommand("FreelancerSetProfile")).Run(in)); + (FreelancerSetProfileResponse) + ((Command) commandMap.getCommand("FreelancerSetProfile")).Run(in)); } @RabbitHandler @@ -64,7 +69,8 @@ public CompletableFuture receive(FreelancerSetProf public CompletableFuture receive(FreelancerSetResumeRequest in) throws Exception { return CompletableFuture.completedFuture( - ((FreelancerSetResumeCommand) commandMap.getCommand("FreelancerSetResume")).Run(in)); + (FreelancerSetResumeResponse) + ((Command) commandMap.getCommand("FreelancerSetResume")).Run(in)); } @RabbitHandler @@ -72,7 +78,8 @@ public CompletableFuture receive(FreelancerSetResum public CompletableFuture receive(FreelancerGetPhotoRequest in) throws Exception { return CompletableFuture.completedFuture( - ((FreelancerGetPhotoCommand) commandMap.getCommand("FreelancerGetPhoto")).Run(in)); + (FreelancerGetPhotoResponse) + ((Command) commandMap.getCommand("FreelancerGetPhoto")).Run(in)); } @RabbitHandler @@ -80,7 +87,8 @@ public CompletableFuture receive(FreelancerGetPhotoR public CompletableFuture receive(ClientSetProfileRequest in) throws Exception { return CompletableFuture.completedFuture( - ((ClientSetProfileCommand) commandMap.getCommand("ClientSetProfile")).Run(in)); + (ClientSetProfileResponse) + ((Command) commandMap.getCommand("ClientSetProfile")).Run(in)); } @RabbitHandler @@ -88,7 +96,8 @@ public CompletableFuture receive(ClientSetProfileReque public CompletableFuture receive(ClientGetProfileRequest in) throws Exception { return CompletableFuture.completedFuture( - ((ClientGetProfileCommand) commandMap.getCommand("ClientGetProfile")).Run(in)); + (ClientGetProfileResponse) + ((Command) commandMap.getCommand("ClientGetProfile")).Run(in)); } @RabbitHandler @@ -96,7 +105,8 @@ public CompletableFuture receive(ClientGetProfileReque public CompletableFuture receive(ClientSetPhotoRequest in) throws Exception { return CompletableFuture.completedFuture( - ((ClientSetPhotoCommand) commandMap.getCommand("ClientSetPhoto")).Run(in)); + (ClientSetPhotoResponse) + ((Command) commandMap.getCommand("ClientSetPhoto")).Run(in)); } @RabbitHandler @@ -104,7 +114,8 @@ public CompletableFuture receive(ClientSetPhotoRequest i public CompletableFuture receive(ClientGetPhotoRequest in) throws Exception { return CompletableFuture.completedFuture( - ((ClientGetPhotoCommand) commandMap.getCommand("ClientGetPhoto")).Run(in)); + (ClientGetPhotoResponse) + ((Command) commandMap.getCommand("ClientGetPhoto")).Run(in)); } @RabbitHandler @@ -112,8 +123,9 @@ public CompletableFuture receive(ClientGetPhotoRequest i public CompletableFuture receive( AddFreelancerAchievementRequest in) throws Exception { return CompletableFuture.completedFuture( - ((AddFreelancerAchievementCommand) commandMap.getCommand("AddFreelancerAchievement")) - .Run(in)); + (AddFreelancerAchievementResponse) + ((Command) commandMap.getCommand("AddFreelancerAchievement")) + .Run(in)); } @RabbitHandler @@ -121,7 +133,8 @@ public CompletableFuture receive( public CompletableFuture receive(AddFreelancerEducationRequest in) throws Exception { return CompletableFuture.completedFuture( - ((AddFreelancerEducationCommand) commandMap.getCommand("AddFreelancerEducation")).Run(in)); + (AddFreelancerEducationResponse) + ((Command) commandMap.getCommand("AddFreelancerEducation")).Run(in)); } @RabbitHandler @@ -129,8 +142,9 @@ public CompletableFuture receive(AddFreelancerEd public CompletableFuture receive( AddFreelancerExperienceRequest in) throws Exception { return CompletableFuture.completedFuture( - ((AddFreelancerExperienceCommand) commandMap.getCommand("AddFreelancerExperience")) - .Run(in)); + (AddFreelancerExperienceResponse) + ((Command) commandMap.getCommand("AddFreelancerExperience")) + .Run(in)); } @RabbitHandler @@ -138,7 +152,8 @@ public CompletableFuture receive( public CompletableFuture receive(AddFreelancerSkillRequest in) throws Exception { return CompletableFuture.completedFuture( - ((AddFreelancerSkillCommand) commandMap.getCommand("AddFreelancerSkill")).Run(in)); + (AddFreelancerSkillResponse) + ((Command) commandMap.getCommand("AddFreelancerSkill")).Run(in)); } @RabbitHandler @@ -146,7 +161,8 @@ public CompletableFuture receive(AddFreelancerSkillR public CompletableFuture receive(AddFreelancerLanguageRequest in) throws Exception { return CompletableFuture.completedFuture( - ((AddFreelancerLanguageCommand) commandMap.getCommand("AddFreelancerLanguage")).Run(in)); + (AddFreelancerLanguageResponse) + ((Command) commandMap.getCommand("AddFreelancerLanguage")).Run(in)); } @RabbitHandler @@ -154,8 +170,9 @@ public CompletableFuture receive(AddFreelancerLan public CompletableFuture receive( GetFreelancerAchievementsRequest in) throws Exception { return CompletableFuture.completedFuture( - ((GetFreelancerAchievementsCommand) commandMap.getCommand("GetFreelancerAchievements")) - .Run(in)); + (GetFreelancerAchievementsResponse) + ((Command) commandMap.getCommand("GetFreelancerAchievements")) + .Run(in)); } @RabbitHandler @@ -163,8 +180,9 @@ public CompletableFuture receive( public CompletableFuture receive( GetFreelancerEducationsRequest in) throws Exception { return CompletableFuture.completedFuture( - ((GetFreelancerEducationsCommand) commandMap.getCommand("GetFreelancerEducations")) - .Run(in)); + (GetFreelancerEducationsResponse) + ((Command) commandMap.getCommand("GetFreelancerEducations")) + .Run(in)); } @RabbitHandler @@ -172,8 +190,9 @@ public CompletableFuture receive( public CompletableFuture receive( GetFreelancerExperiencesRequest in) throws Exception { return CompletableFuture.completedFuture( - ((GetFreelancerExperiencesCommand) commandMap.getCommand("GetFreelancerExperiences")) - .Run(in)); + (GetFreelancerExperiencesResponse) + ((Command) commandMap.getCommand("GetFreelancerExperiences")) + .Run(in)); } @RabbitHandler @@ -181,7 +200,8 @@ public CompletableFuture receive( public CompletableFuture receive(GetFreelancerSkillsRequest in) throws Exception { return CompletableFuture.completedFuture( - ((GetFreelancerSkillsCommand) commandMap.getCommand("GetFreelancerSkills")).Run(in)); + (GetFreelancerSkillsResponse) + ((Command) commandMap.getCommand("GetFreelancerSkills")).Run(in)); } @RabbitHandler @@ -189,7 +209,8 @@ public CompletableFuture receive(GetFreelancerSkill public CompletableFuture receive(GetFreelancerLanguagesRequest in) throws Exception { return CompletableFuture.completedFuture( - ((GetFreelancerLanguagesCommand) commandMap.getCommand("GetFreelancerLanguages")).Run(in)); + (GetFreelancerLanguagesResponse) + ((Command) commandMap.getCommand("GetFreelancerLanguages")).Run(in)); } @RabbitHandler @@ -197,8 +218,9 @@ public CompletableFuture receive(GetFreelancerLa public CompletableFuture receive( UpdateFreelancerAchievementRequest in) throws Exception { return CompletableFuture.completedFuture( - ((UpdateFreelancerAchievementCommand) commandMap.getCommand("UpdateFreelancerAchievement")) - .Run(in)); + (UpdateFreelancerAchievementResponse) + ((Command) commandMap.getCommand("UpdateFreelancerAchievement")) + .Run(in)); } @RabbitHandler @@ -206,8 +228,9 @@ public CompletableFuture receive( public CompletableFuture receive( UpdateFreelancerEducationRequest in) throws Exception { return CompletableFuture.completedFuture( - ((UpdateFreelancerEducationCommand) commandMap.getCommand("UpdateFreelancerEducation")) - .Run(in)); + (UpdateFreelancerEducationResponse) + ((Command) commandMap.getCommand("UpdateFreelancerEducation")) + .Run(in)); } @RabbitHandler @@ -215,8 +238,9 @@ public CompletableFuture receive( public CompletableFuture receive( UpdateFreelancerExperienceRequest in) throws Exception { return CompletableFuture.completedFuture( - ((UpdateFreelancerExperienceCommand) commandMap.getCommand("UpdateFreelancerExperience")) - .Run(in)); + (UpdateFreelancerExperienceResponse) + ((Command) commandMap.getCommand("UpdateFreelancerExperience")) + .Run(in)); } @RabbitHandler @@ -224,8 +248,9 @@ public CompletableFuture receive( public CompletableFuture receive( RemoveFreelancerAchievementRequest in) throws Exception { return CompletableFuture.completedFuture( - ((RemoveFreelancerAchievementCommand) commandMap.getCommand("RemoveFreelancerAchievement")) - .Run(in)); + (RemoveFreelancerAchievementResponse) + ((Command) commandMap.getCommand("RemoveFreelancerAchievement")) + .Run(in)); } @RabbitHandler @@ -233,8 +258,9 @@ public CompletableFuture receive( public CompletableFuture receive( RemoveFreelancerEducationRequest in) throws Exception { return CompletableFuture.completedFuture( - ((RemoveFreelancerEducationCommand) commandMap.getCommand("RemoveFreelancerEducation")) - .Run(in)); + (RemoveFreelancerEducationResponse) + ((Command) commandMap.getCommand("RemoveFreelancerEducation")) + .Run(in)); } @RabbitHandler @@ -242,8 +268,9 @@ public CompletableFuture receive( public CompletableFuture receive( RemoveFreelancerExperienceRequest in) throws Exception { return CompletableFuture.completedFuture( - ((RemoveFreelancerExperienceCommand) commandMap.getCommand("RemoveFreelancerExperience")) - .Run(in)); + (RemoveFreelancerExperienceResponse) + ((Command) commandMap.getCommand("RemoveFreelancerExperience")) + .Run(in)); } @RabbitHandler @@ -251,7 +278,8 @@ public CompletableFuture receive( public CompletableFuture receive(RemoveFreelancerSkillRequest in) throws Exception { return CompletableFuture.completedFuture( - ((RemoveFreelancerSkillCommand) commandMap.getCommand("RemoveFreelancerSkill")).Run(in)); + (RemoveFreelancerSkillResponse) + ((Command) commandMap.getCommand("RemoveFreelancerSkill")).Run(in)); } @RabbitHandler @@ -259,15 +287,16 @@ public CompletableFuture receive(RemoveFreelancer public CompletableFuture receive( RemoveFreelancerLanguageRequest in) throws Exception { return CompletableFuture.completedFuture( - ((RemoveFreelancerLanguageCommand) commandMap.getCommand("RemoveFreelancerLanguage")) - .Run(in)); + (RemoveFreelancerLanguageResponse) + ((Command) commandMap.getCommand("RemoveFreelancerLanguage")) + .Run(in)); } @RabbitHandler @Async public CompletableFuture receive(LoginRequest in) throws Exception { return CompletableFuture.completedFuture( - ((LoginCommand) commandMap.getCommand("Login")).Run(in)); + (LoginResponse) ((Command) commandMap.getCommand("Login")).Run(in)); } @RabbitHandler @@ -275,13 +304,15 @@ public CompletableFuture receive(LoginRequest in) throws Ex public CompletableFuture receive(FreelancerRegisterRequest in) throws Exception { return CompletableFuture.completedFuture( - ((FreelancerRegisterCommand) commandMap.getCommand("FreelancerRegister")).Run(in)); + (FreelancerRegisterResponse) + ((Command) commandMap.getCommand("FreelancerRegister")).Run(in)); } @RabbitHandler @Async public CompletableFuture receive(ClientRegisterRequest in) throws Exception { return CompletableFuture.completedFuture( - ((ClientRegisterCommand) commandMap.getCommand("ClientRegister")).Run(in)); + (ClientRegisterResponse) + ((Command) commandMap.getCommand("ClientRegister")).Run(in)); } }