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