001/*- 002 * #%L 003 * Smile CDR - CDR 004 * %% 005 * Copyright (C) 2016 - 2026 Smile CDR, Inc. 006 * %% 007 * All rights reserved. 008 * #L% 009 */ 010package ca.cdr.api.model.json.portal; 011 012import ca.cdr.api.model.json.AbstractModelJson; 013import com.fasterxml.jackson.annotation.JsonCreator; 014import com.fasterxml.jackson.annotation.JsonProperty; 015import io.swagger.v3.oas.annotations.media.Schema; 016import jakarta.annotation.Nonnull; 017 018/** 019 * Custom external applications served by some other external URL (apps hosted elsewhere) 020 * Note: These applications will be served on iframe 021 */ 022public class ExternalAppJson extends AbstractModelJson implements IAppType { 023 @Schema(description = "label to display app on menu") 024 public final String label; 025 026 @Schema(description = "used to group menu items together") 027 public final String group; 028 029 @Schema(description = "external URL for embedding app") 030 public final String url; 031 032 @Schema(description = "human-readable description of the custom application") 033 public final String description; 034 035 @Schema(description = "application type to be used in smile-portal") 036 public String appType; 037 038 @JsonCreator 039 public ExternalAppJson( 040 @Nonnull @JsonProperty(value = "label", required = true) String theLabel, 041 @Nonnull @JsonProperty(value = "group", required = true) String theGroup, 042 @Nonnull @JsonProperty(value = "url", required = true) String theUrl, 043 @JsonProperty(value = "description") String theDescription) { 044 label = theLabel; 045 group = theGroup; 046 url = theUrl; 047 description = theDescription; 048 } 049 050 @Override 051 public String getAppType() { 052 return appType; 053 } 054}