Created
November 22, 2025 16:07
-
-
Save trikitrok/487a673c04d69bef80d7df12d1422707 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // some imports | |
| public class NotifyOpenedClaimCommandBuilder { | |
| // some fields | |
| public static NotifyOpenedClaimCommandBuilder aNotifyOpenedCommand() { | |
| return new NotifyOpenedClaimCommandBuilder(); | |
| } | |
| public NotifyOpenedClaimCommandBuilder of(ClaimDataBuilder claimBuilder) { | |
| this.claimBuilder = claimBuilder; | |
| return this; | |
| } | |
| public NotifyOpenedClaimCommandBuilder of(ClaimBuilderX claimBuilderx) { | |
| this.claimBuilderx = claimBuilderx; | |
| return this; | |
| } | |
| // more setters | |
| public ClaimCommand build() { | |
| Objects.requireNonNull(openingListener, "Claims Opening Listener must not be null"); | |
| Objects.requireNonNull(referenceInCompany, "Reference In Company must not be null"); | |
| Claim claim; | |
| if(claimBuilderx != null) { | |
| claim = claimBuilderx.withStatus(ClaimStatus.OpenInCompanyButNotNotified).build(); | |
| } else { | |
| Objects.requireNonNull(claimBuilder, "Claim Builder must not be null"); | |
| claim = claimBuilder.withStatus(ClaimStatus.OpenInCompanyButNotNotified).build(); | |
| } | |
| return new NotifyOpenedClaimCommand(openingListener, referenceInCompany, claim); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment