[PORTAL-16 PORTAL-18] Widget ms; staging
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / domain / Widget.java
index c2ef3c0..302195f 100644 (file)
-/*-\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 org.apache.commons.lang.StringUtils;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-public class Widget extends DomainVo {\r
-\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       private String name;\r
-\r
-       private Integer width;\r
-\r
-       private Integer height;\r
-\r
-       private String url;\r
-\r
-       private Long appId;\r
-\r
-       public Widget() {\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.width = new Integer(0);\r
-               this.height = new Integer(0);\r
-               this.url = "";\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 Integer getWidth() {\r
-               return width;\r
-       }\r
-\r
-       public void setWidth(Integer width) {\r
-               if (width == null) {\r
-                       width = new Integer(0);\r
-               }\r
-               this.width = width;\r
-       }\r
-\r
-       public Integer getHeight() {\r
-               return height;\r
-       }\r
-\r
-       public void setHeight(Integer height) {\r
-               if (height == null) {\r
-                       height = new Integer(0);\r
-               }\r
-               this.height = height;\r
-       }\r
-\r
-       public String getUrl() {\r
-               return url;\r
-       }\r
-\r
-       public void setUrl(String url) {\r
-               if (StringUtils.isEmpty(url)) {\r
-                       url = "";\r
-               }\r
-               this.url = url;\r
-       }\r
-\r
-       public Long getAppId() {\r
-               return appId;\r
-       }\r
-\r
-       public void setAppId(Long appId) {\r
-               this.appId = appId;\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 org.apache.commons.lang.StringUtils;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+public class Widget extends DomainVo {
+
+       private static final long serialVersionUID = 1L;
+
+       private String name;
+
+       private Integer width;
+
+       private Integer height;
+
+       private String url;
+
+       private Long appId;
+
+       public Widget() {
+               // 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.width = new Integer(0);
+               this.height = new Integer(0);
+               this.url = "";
+       }
+
+       public String getName() {
+               return name;
+       }
+
+       public void setName(String name) {
+               if (StringUtils.isEmpty(name)) {
+                       name = "";
+               }
+               this.name = name;
+       }
+
+       public Integer getWidth() {
+               return width;
+       }
+
+       public void setWidth(Integer width) {
+               if (width == null) {
+                       width = new Integer(0);
+               }
+               this.width = width;
+       }
+
+       public Integer getHeight() {
+               return height;
+       }
+
+       public void setHeight(Integer height) {
+               if (height == null) {
+                       height = new Integer(0);
+               }
+               this.height = height;
+       }
+
+       public String getUrl() {
+               return url;
+       }
+
+       public void setUrl(String url) {
+               if (StringUtils.isEmpty(url)) {
+                       url = "";
+               }
+               this.url = url;
+       }
+
+       public Long getAppId() {
+               return appId;
+       }
+
+       public void setAppId(Long appId) {
+               this.appId = appId;
+       }
+
+}