2 * ================================================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ================================================================================
20 package org.openecomp.portalapp.portal.transport;
23 * Model of rows in the fn_app table; serialized as a message add or update an
24 * on-boarded application.
26 public class OnboardingApp {
32 public String imageUrl;
34 public String imageLink;
36 public String description;
42 public String alternateUrl;
44 public String restUrl;
46 public Boolean isOpen;
48 public Boolean isEnabled;
52 public String myLoginsAppName;
54 public String myLoginsAppOwner;
56 public String username;
58 public String appPassword;
60 public String thumbnail;
62 public String uebTopicName;
66 public String uebSecret;
68 public Boolean restrictedApp;
71 * Sets the name, myLoginsAppName, myLoginsAppOwner, username and
72 * appPassword fields to the empty string OR trims leading/trailing space,
75 public void normalize() {
76 this.name = (this.name == null) ? "" : this.name.trim();
77 this.myLoginsAppName = (this.myLoginsAppName == null) ? "" : this.myLoginsAppName.trim();
78 this.myLoginsAppOwner = (this.myLoginsAppOwner == null) ? "" : this.myLoginsAppOwner.trim();
79 this.username = (this.username == null) ? "" : this.username.trim();
80 this.appPassword = (this.appPassword == null) ? "" : this.appPassword.trim();
83 public void setUebTopicName(String topicName) {
84 this.uebTopicName = topicName;
87 public void setUebKey(String key) {
91 public void setUebSecret(String secret) {
92 this.uebSecret = secret;
95 // Hide the implementation of restricted and normal app from the front end.
96 // The json sent and received will include restrictedApp but not appType.
98 public void setRestrictedApp(Boolean restrictedApp) {
99 this.restrictedApp = restrictedApp;