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 * Web applications served by other smile cdr modules (not by Smile Portal) 020 * ie: appSphere, MDM UI, FHIR Endpoint, etc. 021 * Note: 022 * - These applications will be served on iframe 023 * - Do not add these applications to ExternalAppJson to prevent duplication 024 */ 025public class CdrModuleAppJson extends AbstractModelJson implements IAppType { 026 @Schema(description = "label to display app on menu") 027 public final String label; 028 029 @Schema(description = "used to group menu items together") 030 public final String group; 031 032 @Schema(description = "module context path/relative URL for embedding app") 033 public final String url; 034 035 @Schema(description = "module application type to be used in smile-portal") 036 public final String appType; 037 038 @Schema(description = "port at which the module is exposed on Smile (optional)") 039 public final Integer port; 040 041 @JsonCreator 042 public CdrModuleAppJson( 043 @Nonnull @JsonProperty(value = "label", required = true) String theLabel, 044 @Nonnull @JsonProperty(value = "group", required = true) String theGroup, 045 @Nonnull @JsonProperty(value = "url", required = true) String theUrl, 046 @Nonnull @JsonProperty(value = "appType", required = true) String theAppType, 047 @Nonnull @JsonProperty(value = "port", required = true) Integer thePort) { 048 label = theLabel; 049 group = theGroup; 050 url = theUrl; 051 appType = theAppType; 052 port = thePort; 053 } 054 055 @Override 056 public String getAppType() { 057 return appType; 058 } 059}