diff --git a/src/main/java/edu/group5/app/model/organization/Organization.java b/src/main/java/edu/group5/app/model/organization/Organization.java index 42844e1..7016567 100644 --- a/src/main/java/edu/group5/app/model/organization/Organization.java +++ b/src/main/java/edu/group5/app/model/organization/Organization.java @@ -7,7 +7,8 @@ * *

* An organization is identified by an organization number, a name, - * trust status, website Url, pre-approval status, and a textual description. + * trust status, website Url, pre-approval status, and a textual description, + * and a logo URL. * *

* Instances are validated on creation: @@ -15,6 +16,7 @@ *

  • orgNumber must be non-negative
  • *
  • name and websiteUrl must not be null or blank
  • *
  • description must not be null
  • + *
  • logoUrl may be null if no logo is available
  • * */ public record Organization( @@ -23,7 +25,8 @@ public record Organization( boolean trusted, String websiteUrl, boolean isPreApproved, - String description) { + String description, + String logoUrl) { /** * Creates a new organization. * @@ -35,12 +38,13 @@ public record Organization( * @param isPreApproved whether the organization is pre-approved * @param description a textual description of the organization; must not be * null + * @param logoUrl the URL to the organization's logo image; may be null * @throws NullPointerException if name, websiteUrl or description is null * @throws IllegalArgumentException if orgNumber is negative, or if name or * websiteUrl is blank */ public Organization(int orgNumber, String name, boolean trusted, String websiteUrl, boolean isPreApproved, - String description) { + String description, String logoUrl) { if (orgNumber < 0) { throw new IllegalArgumentException("orgNumber cannot be negative"); } @@ -50,6 +54,7 @@ public Organization(int orgNumber, String name, boolean trusted, String websiteU this.websiteUrl = Objects.requireNonNull(websiteUrl, "websiteUrl cannot be null"); this.isPreApproved = isPreApproved; this.description = Objects.requireNonNull(description, "description cannot be null"); + this.logoUrl = logoUrl; if (name.isBlank()) { throw new IllegalArgumentException("name cannot be blank");