DataElementImage.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */
  20. package org.openspcoop2.web.lib.mvc;

  21. import java.io.Serializable;

  22. /**
  23.  * DataElementImage
  24.  *
  25.  * @author Giuliano Pintori (pintori@link.it)
  26.  * @author $Author$
  27.  * @version $Rev$, $Date$
  28.  */
  29. public class DataElementImage implements Serializable {

  30.     /**
  31.      *
  32.      */
  33.     private static final long serialVersionUID = 1L;
  34.    
  35.     private String image;
  36.     private String toolTip;
  37.     private String url;
  38.     private String target;
  39.     private String onClick;
  40.     private boolean showAjaxStatus = true;
  41.     private String styleClass = null;
  42.    
  43.     public String getImage() {
  44.         return DataElement.checkNull(this.image);
  45.     }
  46.     public void setImage(String image) {
  47.         this.image = image;
  48.     }
  49.     public String getToolTip() {
  50.         return DataElement.checkNull(this.toolTip);
  51.     }
  52.     public void setToolTip(String toolTip) {
  53.         this.toolTip = toolTip;
  54.     }
  55.     public String getUrl() {
  56.         return DataElement.checkNull(this.url);
  57.     }
  58.     public void setUrl(String url) {
  59.         this.url = url;
  60.     }
  61.     public void setUrl(String servletName,Parameter ... parameter) {
  62.         this.url = DataElement._getUrlValue(servletName, parameter);
  63.     }
  64.     public void addParameter(Parameter ... parameter) {
  65.         this.url = DataElement._getUrlValue(this.url, parameter);
  66.     }
  67.     public String getTarget() {
  68.         return DataElement.checkNull(this.target);
  69.     }
  70.     public void setTarget(String target) {
  71.         this.target = target;
  72.     }
  73.     public void setTarget(TargetType s) {
  74.         this.target = s != null ? s.toString() : null;
  75.     }
  76.     public String getOnClick() {
  77.         return DataElement.checkNull(this.onClick);
  78.     }
  79.     public void setOnClick(String onClick) {
  80.         this.onClick = onClick;
  81.     }
  82.     public void setDisabilitaAjaxStatus() {
  83.         this.showAjaxStatus = false;
  84.     }
  85.     public boolean isShowAjaxStatus() {
  86.         return this.showAjaxStatus;
  87.     }
  88.     public void setShowAjaxStatus(boolean showAjaxStatus) {
  89.         this.showAjaxStatus = showAjaxStatus;
  90.     }
  91.     public String getStyleClass() {
  92.         return DataElement.checkNull(this.styleClass);
  93.     }
  94.     public void setStyleClass(String styleClass) {
  95.         this.styleClass = styleClass;
  96.     }
  97.    
  98. }