Attachment.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.monitor.sdk.transaction;

  21. /**
  22.  * Attachment
  23.  *
  24.  * @author Poli Andrea (apoli@link.it)
  25.  * @author $Author$
  26.  * @version $Rev$, $Date$
  27.  */
  28. public class Attachment {
  29.    
  30.     public Attachment(byte[] content, String cid, String mime) {
  31.         this.cid = cid;
  32.         this.content = content;
  33.         this.mime = mime;
  34.     }
  35.    
  36.     protected String cid;
  37.     protected String mime;
  38.     protected byte[] content;
  39.     private boolean updated = false;

  40.     public boolean isUpdated() {
  41.         return this.updated;
  42.     }
  43.     public void setUpdated(boolean updated) {
  44.         this.updated = updated;
  45.     }
  46.     public String getContentID() {
  47.         return this.cid;
  48.     }
  49.     public void setContentID(String cid) {
  50.         this.cid = cid;
  51.     }
  52.    
  53.     public String getContentType() {
  54.         return this.mime;
  55.     }
  56.     public void setContentType(String mime) {
  57.         this.mime = mime;
  58.     }
  59.    
  60.     public byte[] getContentAsByte() {
  61.         return this.content;
  62.     }
  63.     public void setContentAsByte(byte[] content) {
  64.         this.content = content;
  65.     }
  66.    
  67. }