View Javadoc

1   /*
2    * This software was designed and created by Jason Carroll.
3    * Copyright (c) 2002, 2003, 2004 Jason Carroll.
4    * The author can be reached at jcarroll@cowsultants.com
5    * ITracker website: http://www.cowsultants.com
6    * ITracker forums: http://www.cowsultants.com/phpBB/index.php
7    *
8    * This program is free software; you can redistribute it and/or modify
9    * it only under the terms of the GNU General Public License as published by
10   * the Free Software Foundation; either version 2 of the License, or
11   * (at your option) any later version.
12   *
13   * This program is distributed in the hope that it will be useful,
14   * but WITHOUT ANY WARRANTY; without even the implied warranty of
15   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   * GNU General Public License for more details.
17   */
18  
19  package org.itracker.services.util;
20  
21  import java.util.HashSet;
22  
23  public class IssueAttachmentUtilities  {
24      public static final String DEFAULT_ATTACHMENT_DIR = "./itracker/attachments";
25  
26      public IssueAttachmentUtilities() {
27      }
28  
29  }
30  
31  class MimeType {
32      private String mimeType;
33      private HashSet<?> suffixes;
34      private String imageName;
35  
36      public MimeType(String mimeType, String imageName) {
37          setMimeType(mimeType);
38          setImageName(imageName);
39      }
40  
41      public String getMimeType() {
42          return mimeType;
43      }
44  
45      public void setMimeType(String value) {
46          mimeType = value;
47      }
48  
49      public String imageName() {
50          return imageName;
51      }
52  
53      public void setImageName(String value) {
54          imageName = value;
55      }
56  
57  	public HashSet<?> getSuffixes() {
58  		return suffixes;
59  	}
60  
61  	public void setSuffixes(HashSet<?> suffixes) {
62  		this.suffixes = suffixes;
63  	}
64  }
65  
66  /*
67   image/gif                       gif
68   image/ief                       ief
69   image/jpeg                      jpeg jpg jpe
70   image/pjpeg                     jpg
71   image/png                       png
72   image/x-png                     png
73   image/tiff                      tiff tif
74   image/x-cmu-raster              ras
75   image/x-portable-anymap         pnm
76   image/x-portable-bitmap         pbm
77   image/x-portable-graymap        pgm
78   image/x-portable-pixmap         ppm
79   image/x-rgb                     rgb
80   image/x-xbitmap                 xbm
81   image/x-xpixmap                 xpm
82   image/x-xwindowdump             xwd
83   application/x-compress          z Z
84   application/x-gtar              gtar tgz
85   application/x-gunzip            gz
86   application/x-gzip              gz
87   application/x-gzip-compressed   gz
88   application/x-tar               tar
89   application/zip                 zip
90   application/x-zip-compressed    zip
91   text/plain                      asc txt c cc h hh cpp hpp
92   application/excel               xls
93   application/msword              doc dot wrd
94   application/pdf                 pdf
95   application/postscript          ai eps ps
96   application/powerpoint          ppt
97   application/vnd.rn-realmedia    rm
98   audio/x-ms-wma                  wma
99   application/x-shockwave-flash   swf
100 */