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=37ad5add3db8d14210fa60edcece418fbbdfc7c2;hpb=e276ad30dc38f55e06877df8fd0d3372534c8f47;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 37ad5add..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 @@ -38,6 +38,7 @@ 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 @@ -45,81 +46,301 @@ import org.hibernate.validator.constraints.SafeHtml; */ public class OnboardingApp { - public Long id; + private Long id; @SafeHtml - public String name; + private String appName; @SafeHtml - public String imageUrl; + private String imageUrl; @SafeHtml - public String imageLink; + private String imageLink; @SafeHtml - public String description; + private String appDescription; @SafeHtml - public String notes; + private String appNotes; @SafeHtml - public String url; + private String landingPage; @SafeHtml - public String alternateUrl; + private String alternateLandingPage; @SafeHtml - public String restUrl; + private String restUrl; - public Boolean isOpen; + @SafeHtml + private String applicationType; + + private Boolean isOpen; - public Boolean isEnabled; + private Boolean isEnabled; - public Long motsId; + private Long motsId; @SafeHtml - public String myLoginsAppName; + private String myLoginsAppName; @SafeHtml - public String myLoginsAppOwner; + private String myLoginsAppOwner; @SafeHtml - public String username; + private String appBasicAuthUsername; @SafeHtml - public String appPassword; + private String appBasicAuthPassword; @SafeHtml - public String thumbnail; + private String thumbnail; @SafeHtml - public String uebTopicName; + private String uebTopicName; @SafeHtml - public String uebKey; + private String uebKey; @SafeHtml - public String uebSecret; + private String uebSecret; - public Boolean restrictedApp; + private Boolean restrictedApp; - public Boolean isCentralAuth; + private Boolean rolesInAAF; + @SafeHtml + private String nameSpace; + @SafeHtml - public String nameSpace; + private String modeOfIntegration; + private Boolean appAck; + + 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.name = (this.name == null) ? "" : this.name.trim(); + 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.username = (this.username == null) ? "" : this.username.trim(); - this.appPassword = (this.appPassword == null) ? "" : this.appPassword.trim(); + this.appBasicAuthUsername = (this.appBasicAuthUsername == null) ? "" : this.appBasicAuthUsername.trim(); + this.appBasicAuthPassword = (this.appBasicAuthPassword == null) ? "" : this.appBasicAuthPassword.trim(); + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + } + + public String getImageLink() { + return imageLink; + } + + public void setImageLink(String imageLink) { + this.imageLink = imageLink; + } + + public String getAppDescription() { + return appDescription; + } + + public void setAppDescription(String appDescription) { + this.appDescription = appDescription; + } + + public String getAppNotes() { + return appNotes; + } + + public void setAppNotes(String appNotes) { + this.appNotes = appNotes; + } + + public String getLandingPage() { + return landingPage; + } + + public void setLandingPage(String landingPage) { + this.landingPage = landingPage; } - public void setUebTopicName(String topicName) { - this.uebTopicName = topicName; + public String getAlternateLandingPage() { + return alternateLandingPage; } - public void setUebKey(String key) { - this.uebKey = key; + public void setAlternateLandingPage(String alternateLandingPage) { + this.alternateLandingPage = alternateLandingPage; } - public void setUebSecret(String secret) { - this.uebSecret = secret; + public String getRestUrl() { + return restUrl; } - // Hide the implementation of restricted and normal app from the front end. - // The json sent and received will include restrictedApp but not appType. + public void setRestUrl(String restUrl) { + this.restUrl = restUrl; + } + + public Boolean getIsOpen() { + return isOpen; + } + + public void setIsOpen(Boolean isOpen) { + this.isOpen = isOpen; + } + + 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; + } + } }