X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fportalapp%2Fportal%2Ftransport%2FOnboardingApp.java;h=d1b2a5687580ccd94caaef9df9c38ccca4bb09b9;hb=230c71614b1d2fb71a8fb482c749ff5a6dad65d8;hp=8347d4f06e0a84941c08e799e246b74d0d132284;hpb=21a8761f684745bb300e075c7e98ad897ace9eed;p=portal.git diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/OnboardingApp.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/OnboardingApp.java index 8347d4f0..d1b2a568 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/OnboardingApp.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/OnboardingApp.java @@ -33,91 +33,314 @@ * * ============LICENSE_END============================================ * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. + * */ package org.onap.portalapp.portal.transport; +import org.hibernate.validator.constraints.SafeHtml; +import org.onap.portalapp.portal.domain.EpAppType; + /** * Model of rows in the fn_app table; serialized as a message add or update an * on-boarded application. */ public class OnboardingApp { - public Long id; + private Long id; + @SafeHtml + private String appName; + @SafeHtml + private String imageUrl; + @SafeHtml + private String imageLink; + @SafeHtml + private String appDescription; + @SafeHtml + private String appNotes; + @SafeHtml + private String landingPage; + @SafeHtml + private String alternateLandingPage; + @SafeHtml + private String restUrl; - public String name; + @SafeHtml + private String applicationType; + + private Boolean isOpen; - public String imageUrl; + private Boolean isEnabled; - public String imageLink; + private Long motsId; + @SafeHtml + private String myLoginsAppName; + @SafeHtml + private String myLoginsAppOwner; + @SafeHtml + private String appBasicAuthUsername; + @SafeHtml + private String appBasicAuthPassword; + @SafeHtml + private String thumbnail; + @SafeHtml + private String uebTopicName; + @SafeHtml + private String uebKey; + @SafeHtml + private String uebSecret; - public String description; + private Boolean restrictedApp; + + private Boolean rolesInAAF; + @SafeHtml + private String nameSpace; - public String notes; + @SafeHtml + private String modeOfIntegration; - public String url; + private Boolean appAck; - public String alternateUrl; + private Boolean usesCadi; + + /** + * Sets the name, myLoginsAppName, myLoginsAppOwner, username and + * appPassword fields to the empty string OR trims leading/trailing space, + * as appropriate. + */ + public void normalize() { + this.appName = (this.appName == null) ? "" : this.appName.trim(); + this.myLoginsAppName = (this.myLoginsAppName == null) ? "" : this.myLoginsAppName.trim(); + this.myLoginsAppOwner = (this.myLoginsAppOwner == null) ? "" : this.myLoginsAppOwner.trim(); + this.appBasicAuthUsername = (this.appBasicAuthUsername == null) ? "" : this.appBasicAuthUsername.trim(); + this.appBasicAuthPassword = (this.appBasicAuthPassword == null) ? "" : this.appBasicAuthPassword.trim(); + } - public String restUrl; + public Long getId() { + return id; + } - public Boolean isOpen; + public void setId(Long id) { + this.id = id; + } - public Boolean isEnabled; + public String getAppName() { + return appName; + } - public Long motsId; + public void setAppName(String appName) { + this.appName = appName; + } - public String myLoginsAppName; + public String getImageUrl() { + return imageUrl; + } - public String myLoginsAppOwner; + public void setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + } - public String username; + public String getImageLink() { + return imageLink; + } - public String appPassword; + public void setImageLink(String imageLink) { + this.imageLink = imageLink; + } - public String thumbnail; + public String getAppDescription() { + return appDescription; + } - public String uebTopicName; + public void setAppDescription(String appDescription) { + this.appDescription = appDescription; + } - public String uebKey; + public String getAppNotes() { + return appNotes; + } - public String uebSecret; + public void setAppNotes(String appNotes) { + this.appNotes = appNotes; + } - public Boolean restrictedApp; - - public Boolean isCentralAuth; - - public String nameSpace; + public String getLandingPage() { + return landingPage; + } - /** - * Sets the name, myLoginsAppName, myLoginsAppOwner, username and - * appPassword fields to the empty string OR trims leading/trailing space, - * as appropriate. - */ - public void normalize() { - this.name = (this.name == null) ? "" : this.name.trim(); - this.myLoginsAppName = (this.myLoginsAppName == null) ? "" : this.myLoginsAppName.trim(); - this.myLoginsAppOwner = (this.myLoginsAppOwner == null) ? "" : this.myLoginsAppOwner.trim(); - this.username = (this.username == null) ? "" : this.username.trim(); - this.appPassword = (this.appPassword == null) ? "" : this.appPassword.trim(); + public void setLandingPage(String landingPage) { + this.landingPage = landingPage; + } + + public String getAlternateLandingPage() { + return alternateLandingPage; + } + + public void setAlternateLandingPage(String alternateLandingPage) { + this.alternateLandingPage = alternateLandingPage; + } + + public String getRestUrl() { + return restUrl; } - public void setUebTopicName(String topicName) { - this.uebTopicName = topicName; + public void setRestUrl(String restUrl) { + this.restUrl = restUrl; } - public void setUebKey(String key) { - this.uebKey = key; + public Boolean getIsOpen() { + return isOpen; } - public void setUebSecret(String secret) { - this.uebSecret = secret; + public void setIsOpen(Boolean isOpen) { + this.isOpen = isOpen; } - // Hide the implementation of restricted and normal app from the front end. - // The json sent and received will include restrictedApp but not appType. + public Boolean getIsEnabled() { + return isEnabled; + } + + public void setIsEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + } + + public Long getMotsId() { + return motsId; + } + + public void setMotsId(Long motsId) { + this.motsId = motsId; + } + + public String getMyLoginsAppName() { + return myLoginsAppName; + } + + public void setMyLoginsAppName(String myLoginsAppName) { + this.myLoginsAppName = myLoginsAppName; + } + + public String getMyLoginsAppOwner() { + return myLoginsAppOwner; + } + + public void setMyLoginsAppOwner(String myLoginsAppOwner) { + this.myLoginsAppOwner = myLoginsAppOwner; + } + + public String getAppBasicAuthUsername() { + return appBasicAuthUsername; + } + + public void setAppBasicAuthUsername(String appBasicAuthUsername) { + this.appBasicAuthUsername = appBasicAuthUsername; + } + + public String getAppBasicAuthPassword() { + return appBasicAuthPassword; + } + + public void setAppBasicAuthPassword(String appBasicAuthPassword) { + this.appBasicAuthPassword = appBasicAuthPassword; + } + + public String getThumbnail() { + return thumbnail; + } + + public void setThumbnail(String thumbnail) { + this.thumbnail = thumbnail; + } + + public String getUebTopicName() { + return uebTopicName; + } + + public void setUebTopicName(String uebTopicName) { + this.uebTopicName = uebTopicName; + } + + public String getUebKey() { + return uebKey; + } + + public void setUebKey(String uebKey) { + this.uebKey = uebKey; + } + + public String getUebSecret() { + return uebSecret; + } + + public void setUebSecret(String uebSecret) { + this.uebSecret = uebSecret; + } + + public Boolean getRestrictedApp() { + return restrictedApp; + } public void setRestrictedApp(Boolean restrictedApp) { this.restrictedApp = restrictedApp; } + + public Boolean getRolesInAAF() { + return rolesInAAF; + } + + public void setRolesInAAF(Boolean rolesInAAF) { + this.rolesInAAF = rolesInAAF; + } + + public String getNameSpace() { + return nameSpace; + } + + public void setNameSpace(String nameSpace) { + this.nameSpace = nameSpace; + } + + public String getModeOfIntegration() { + return modeOfIntegration; + } + + public void setModeOfIntegration(String modeOfIntegration) { + this.modeOfIntegration = modeOfIntegration; + } + + public Boolean getAppAck() { + return appAck; + } + + public void setAppAck(Boolean appAck) { + this.appAck = appAck; + } + + public Boolean getUsesCadi() { + return usesCadi; + } + + public void setUsesCadi(Boolean usesCadi) { + this.usesCadi = usesCadi; + } + + public String getApplicationType() { + return applicationType; + } + + public void setApplicationType(String applicationType) { + this.applicationType = applicationType; + } + + public Integer appTypePersistedValue() { + switch (this.getApplicationType()) { + case EpAppType.GUI_STR: + return EpAppType.GUI; + case EpAppType.HYPERLINK_STR: + return EpAppType.HYPERLINK; + case EpAppType.NONGUI_STR: + return EpAppType.NONGUI; + default: + return 0; + } + } }