-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import javax.persistence.Lob;\r
-\r
-import org.apache.commons.lang.StringUtils;\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-/**\r
- * Model for all columns in the fn_app table.\r
- */\r
-public class EPApp extends DomainVo {\r
-\r
- private static final long serialVersionUID = 1L;\r
-\r
- private String name;\r
- private String imageUrl;\r
- private String description;\r
- private String notes;\r
- private String url;\r
- private String alternateUrl;\r
- private String appRestEndpoint;\r
- private String mlAppName;\r
- private String mlAppAdminId;\r
- private Long motsId;\r
- private String username;\r
- private String appPassword;\r
- @Lob\r
- private byte[] thumbnail;\r
- private Boolean open;\r
- private Boolean enabled;\r
- private String uebTopicName;\r
- private String uebKey;\r
- private String uebSecret;\r
- private Integer appType;\r
-\r
- private AppContactUs contactUs;\r
-\r
- public EPApp() {\r
- // Attention!!!\r
- // We set here all default values. We also place protection\r
- // into setters for fields with default values.\r
- // If we don't use such protection we are able to place null\r
- // to these fields and save such fields into DB even if DB has\r
- // default values for these fields.\r
- this.name = "";\r
- this.mlAppName = "";\r
- this.mlAppAdminId = "";\r
- this.username = "";\r
- this.appPassword = "";\r
- this.open = new Boolean(false);\r
- this.enabled = new Boolean(true);\r
- this.uebTopicName = "";\r
- this.uebKey = "";\r
- this.uebSecret = "";\r
- this.appType = 1;\r
- }\r
-\r
- public String getName() {\r
- return name;\r
- }\r
-\r
- public void setName(String name) {\r
- if (StringUtils.isEmpty(name)) {\r
- name = "";\r
- }\r
- this.name = name;\r
- }\r
-\r
- public String getImageUrl() {\r
- return imageUrl;\r
- }\r
-\r
- public void setImageUrl(String imageUrl) {\r
- this.imageUrl = imageUrl;\r
- }\r
-\r
- public byte[] getThumbnail() {\r
- return this.thumbnail;\r
- }\r
-\r
- public void setThumbnail(byte[] thumbnail) {\r
- this.thumbnail = thumbnail;\r
- }\r
-\r
- public String getDescription() {\r
- return description;\r
- }\r
-\r
- public void setDescription(String description) {\r
- this.description = description;\r
- }\r
-\r
- public String getNotes() {\r
- return notes;\r
- }\r
-\r
- public void setNotes(String notes) {\r
- this.notes = notes;\r
- }\r
-\r
- public String getUrl() {\r
- return url;\r
- }\r
-\r
- public void setUrl(String url) {\r
- this.url = url;\r
- }\r
-\r
- public String getAlternateUrl() {\r
- return alternateUrl;\r
- }\r
-\r
- public void setAlternateUrl(String alternateUrl) {\r
- this.alternateUrl = alternateUrl;\r
- }\r
-\r
- public String getAppRestEndpoint() {\r
- return appRestEndpoint;\r
- }\r
-\r
- public void setAppRestEndpoint(String appRestEndpoint) {\r
- this.appRestEndpoint = appRestEndpoint;\r
- }\r
-\r
- public String getMlAppName() {\r
- return mlAppName;\r
- }\r
-\r
- public void setMlAppName(String mlAppName) {\r
- if (StringUtils.isEmpty(mlAppName)) {\r
- mlAppName = "";\r
- }\r
- this.mlAppName = mlAppName;\r
- }\r
-\r
- public String getMlAppAdminId() {\r
- return mlAppAdminId;\r
- }\r
-\r
- public void setMlAppAdminId(String mlAppAdminId) {\r
- if (StringUtils.isEmpty(mlAppAdminId)) {\r
- mlAppAdminId = "";\r
- }\r
- this.mlAppAdminId = mlAppAdminId;\r
- }\r
-\r
- public Long getMotsId() {\r
- return motsId;\r
- }\r
-\r
- public void setMotsId(Long motsId) {\r
- this.motsId = motsId;\r
- }\r
-\r
- public String getUsername() {\r
- return username;\r
- }\r
-\r
- public void setUsername(String username) {\r
- this.username = username;\r
- }\r
-\r
- public String getAppPassword() {\r
- return appPassword;\r
- }\r
-\r
- public void setAppPassword(String appPassword) {\r
- if (StringUtils.isEmpty(appPassword)) {\r
- appPassword = "";\r
- }\r
- this.appPassword = appPassword;\r
- }\r
-\r
- public Boolean getOpen() {\r
- return open;\r
- }\r
-\r
- public void setOpen(Boolean open) {\r
- if (open == null) {\r
- open = new Boolean(false);\r
- }\r
- this.open = open;\r
- }\r
-\r
- public Boolean getEnabled() {\r
- return enabled;\r
- }\r
-\r
- public void setEnabled(Boolean enabled) {\r
- if (enabled == null) {\r
- enabled = new Boolean(true);\r
- }\r
- this.enabled = enabled;\r
- }\r
-\r
- public Integer getAppType() {\r
- return appType;\r
- }\r
-\r
- public void setAppType(Integer appType) {\r
- if (appType == null) {\r
- appType = new Integer(1);\r
- }\r
- this.appType = appType;\r
- }\r
-\r
- public void setRestrictedApp(Boolean restrictedApp) {\r
- Integer result = 1;\r
- if (restrictedApp) {\r
- result = 2;\r
- }\r
- this.appType = result;\r
- }\r
-\r
- public Boolean isRestrictedApp() {\r
- return (this.appType == 2 ? true : false);\r
- }\r
-\r
- public int compareTo(Object obj) {\r
- Long c1 = getId();\r
- Long c2 = ((EPApp) obj).getId();\r
-\r
- return c1.compareTo(c2);\r
- }\r
-\r
- public String getUebTopicName() {\r
- return this.uebTopicName;\r
- }\r
-\r
- public void setUebTopicName(String topicName) {\r
- if (StringUtils.isEmpty(topicName)) {\r
- this.uebTopicName = "";\r
- }\r
- this.uebTopicName = topicName;\r
- }\r
-\r
- public String getUebKey() {\r
- return this.uebKey;\r
- }\r
-\r
- public void setUebKey(String uebKey) {\r
- if (StringUtils.isEmpty(uebKey)) {\r
- this.uebKey = "";\r
- }\r
- this.uebKey = uebKey;\r
- }\r
-\r
- public String getUebSecret() {\r
- return this.uebSecret;\r
- }\r
-\r
- public void setUebSecret(String uebSecret) {\r
- if (StringUtils.isEmpty(uebSecret)) {\r
- this.uebSecret = "";\r
- }\r
- this.uebSecret = uebSecret;\r
- }\r
-\r
- public AppContactUs getContactUs() {\r
- return contactUs;\r
- }\r
-\r
- public void setContactUs(AppContactUs contactUs) {\r
- this.contactUs = contactUs;\r
- }\r
-\r
- @Override\r
- public String toString() {\r
- String str = "[" + getId() + ":" + getName() + "]";\r
- return str;\r
- }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import javax.persistence.Lob;
+
+import org.apache.commons.lang.StringUtils;
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+/**
+ * Model for all columns in the fn_app table.
+ */
+public class EPApp extends DomainVo {
+
+ private static final long serialVersionUID = 1L;
+
+ private String name;
+ private String imageUrl;
+ private String description;
+ private String notes;
+ private String url;
+ private String alternateUrl;
+ private String appRestEndpoint;
+ private String mlAppName;
+ private String mlAppAdminId;
+ private Long motsId;
+ private String username;
+ private String appPassword;
+ @Lob
+ private byte[] thumbnail;
+ private Boolean open;
+ private Boolean enabled;
+ private String uebTopicName;
+ private String uebKey;
+ private String uebSecret;
+ private Integer appType;
+
+ private AppContactUs contactUs;
+
+ public EPApp() {
+ // Attention!!!
+ // We set here all default values. We also place protection
+ // into setters for fields with default values.
+ // If we don't use such protection we are able to place null
+ // to these fields and save such fields into DB even if DB has
+ // default values for these fields.
+ this.name = "";
+ this.mlAppName = "";
+ this.mlAppAdminId = "";
+ this.username = "";
+ this.appPassword = "";
+ this.open = new Boolean(false);
+ this.enabled = new Boolean(true);
+ this.uebTopicName = "";
+ this.uebKey = "";
+ this.uebSecret = "";
+ this.appType = 1;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ if (StringUtils.isEmpty(name)) {
+ name = "";
+ }
+ this.name = name;
+ }
+
+ public String getImageUrl() {
+ return imageUrl;
+ }
+
+ public void setImageUrl(String imageUrl) {
+ this.imageUrl = imageUrl;
+ }
+
+ public byte[] getThumbnail() {
+ return this.thumbnail;
+ }
+
+ public void setThumbnail(byte[] thumbnail) {
+ this.thumbnail = thumbnail;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getNotes() {
+ return notes;
+ }
+
+ public void setNotes(String notes) {
+ this.notes = notes;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public String getAlternateUrl() {
+ return alternateUrl;
+ }
+
+ public void setAlternateUrl(String alternateUrl) {
+ this.alternateUrl = alternateUrl;
+ }
+
+ public String getAppRestEndpoint() {
+ return appRestEndpoint;
+ }
+
+ public void setAppRestEndpoint(String appRestEndpoint) {
+ this.appRestEndpoint = appRestEndpoint;
+ }
+
+ public String getMlAppName() {
+ return mlAppName;
+ }
+
+ public void setMlAppName(String mlAppName) {
+ if (StringUtils.isEmpty(mlAppName)) {
+ mlAppName = "";
+ }
+ this.mlAppName = mlAppName;
+ }
+
+ public String getMlAppAdminId() {
+ return mlAppAdminId;
+ }
+
+ public void setMlAppAdminId(String mlAppAdminId) {
+ if (StringUtils.isEmpty(mlAppAdminId)) {
+ mlAppAdminId = "";
+ }
+ this.mlAppAdminId = mlAppAdminId;
+ }
+
+ public Long getMotsId() {
+ return motsId;
+ }
+
+ public void setMotsId(Long motsId) {
+ this.motsId = motsId;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getAppPassword() {
+ return appPassword;
+ }
+
+ public void setAppPassword(String appPassword) {
+ if (StringUtils.isEmpty(appPassword)) {
+ appPassword = "";
+ }
+ this.appPassword = appPassword;
+ }
+
+ public Boolean getOpen() {
+ return open;
+ }
+
+ public void setOpen(Boolean open) {
+ if (open == null) {
+ open = new Boolean(false);
+ }
+ this.open = open;
+ }
+
+ public Boolean getEnabled() {
+ return enabled;
+ }
+
+ public void setEnabled(Boolean enabled) {
+ if (enabled == null) {
+ enabled = new Boolean(true);
+ }
+ this.enabled = enabled;
+ }
+
+ public Integer getAppType() {
+ return appType;
+ }
+
+ public void setAppType(Integer appType) {
+ if (appType == null) {
+ appType = new Integer(1);
+ }
+ this.appType = appType;
+ }
+
+ public void setRestrictedApp(Boolean restrictedApp) {
+ Integer result = 1;
+ if (restrictedApp) {
+ result = 2;
+ }
+ this.appType = result;
+ }
+
+ public Boolean isRestrictedApp() {
+ return (this.appType == 2 ? true : false);
+ }
+
+ public int compareTo(Object obj) {
+ Long c1 = getId();
+ Long c2 = ((EPApp) obj).getId();
+
+ return c1.compareTo(c2);
+ }
+
+ public String getUebTopicName() {
+ return this.uebTopicName;
+ }
+
+ public void setUebTopicName(String topicName) {
+ if (StringUtils.isEmpty(topicName)) {
+ this.uebTopicName = "";
+ }
+ this.uebTopicName = topicName;
+ }
+
+ public String getUebKey() {
+ return this.uebKey;
+ }
+
+ public void setUebKey(String uebKey) {
+ if (StringUtils.isEmpty(uebKey)) {
+ this.uebKey = "";
+ }
+ this.uebKey = uebKey;
+ }
+
+ public String getUebSecret() {
+ return this.uebSecret;
+ }
+
+ public void setUebSecret(String uebSecret) {
+ if (StringUtils.isEmpty(uebSecret)) {
+ this.uebSecret = "";
+ }
+ this.uebSecret = uebSecret;
+ }
+
+ public AppContactUs getContactUs() {
+ return contactUs;
+ }
+
+ public void setContactUs(AppContactUs contactUs) {
+ this.contactUs = contactUs;
+ }
+
+ @Override
+ public String toString() {
+ String str = "[" + getId() + ":" + getName() + "]";
+ return str;
+ }
+
+}