1 25 26 package org.snipsnap.snip.attachment; 27 28 import org.snipsnap.snip.SnipLink; 29 30 import java.util.Date ; 31 32 38 39 public class Attachment { 40 41 private String name; 42 private String contentType; 43 private long size; 44 private Date date; 45 private String location; 46 47 public Attachment(String name, String contentType, long size, Date date, String location) { 48 setName(name); 49 setContentType(contentType); 50 setSize(size); 51 setDate(date); 52 setLocation(location); 53 } 54 55 public void setName(String name) { 56 this.name = name; 57 } 58 59 public String getName() { 60 return name; 61 } 62 63 public String getNameEncoded() { 64 return SnipLink.encode(name); 65 } 66 67 public void setContentType(String contentType) { 68 this.contentType = contentType; 69 } 70 71 public String getContentType() { 72 return contentType; 73 } 74 75 public void setSize(long size) { 76 this.size = size; 77 } 78 79 public long getSize() { 80 return size; 81 } 82 83 public void setDate(Date date) { 84 this.date = date; 85 } 86 87 public Date getDate() { 88 return date; 89 } 90 91 public void setLocation(String location) { 92 this.location = location; 93 } 94 95 public String getLocation() { 96 return location; 97 } 98 } 99 | Popular Tags |