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.domain;
22 import org.apache.commons.lang.StringUtils;
24 import org.openecomp.portalsdk.core.domain.support.DomainVo;
26 public class Widget extends DomainVo {
28 private static final long serialVersionUID = 1L;
32 private Integer width;
34 private Integer height;
42 // We set here all default values. We also place protection
43 // into setters for fields with default values.
44 // If we don't use such protection we are able to place null
45 // to these fields and save such fields into DB even if DB has
46 // default values for these fields.
48 this.width = new Integer(0);
49 this.height = new Integer(0);
53 public String getName() {
57 public void setName(String name) {
58 if (StringUtils.isEmpty(name)) {
64 public Integer getWidth() {
68 public void setWidth(Integer width) {
70 width = new Integer(0);
75 public Integer getHeight() {
79 public void setHeight(Integer height) {
81 height = new Integer(0);
86 public String getUrl() {
90 public void setUrl(String url) {
91 if (StringUtils.isEmpty(url)) {
97 public Long getAppId() {
101 public void setAppId(Long appId) {