001 /****************************************************************
002 * Licensed to the Apache Software Foundation (ASF) under one *
003 * or more contributor license agreements. See the NOTICE file *
004 * distributed with this work for additional information *
005 * regarding copyright ownership. The ASF licenses this file *
006 * to you under the Apache License, Version 2.0 (the *
007 * "License"); you may not use this file except in compliance *
008 * with the License. You may obtain a copy of the License at *
009 * *
010 * http://www.apache.org/licenses/LICENSE-2.0 *
011 * *
012 * Unless required by applicable law or agreed to in writing, *
013 * software distributed under the License is distributed on an *
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
015 * KIND, either express or implied. See the License for the *
016 * specific language governing permissions and limitations *
017 * under the License. *
018 ****************************************************************/
019
020 package org.apache.hupa.shared.data;
021
022 import java.io.Serializable;
023
024 /**
025 * Attachment of a message
026 *
027 *
028 */
029 public class MessageAttachment implements Serializable {
030
031 /**
032 *
033 */
034 private static final long serialVersionUID = -6896197131104882424L;
035 private String cType;
036 private int size;
037 private String name;
038
039 /**
040 * Set the name of the attachment
041 *
042 * @param name
043 */
044 public void setName(String name) {
045 this.name = name;
046
047 }
048
049 /**
050 * Return the name of the attachment
051 *
052 * @return name
053 */
054 public String getName() {
055 return name;
056 }
057
058 /**
059 * Set the content-type of the attachment
060 *
061 * @param cType
062 */
063 public void setContentType(String cType) {
064 this.cType = cType;
065 }
066
067 /**
068 * Return the content-type of the attachment
069 *
070 * @return cType
071 */
072 public String getContentType() {
073 return cType;
074 }
075
076 /**
077 * Set the content size in bytes
078 *
079 * @param size
080 */
081 public void setSize(int size) {
082 this.size = size;
083 }
084
085 /**
086 * Return the content size in bytes
087 *
088 * @return size
089 */
090 public int getSize() {
091 return size;
092 }
093 }