1   package com.atlassian.bonnie.search;
2   
3   import java.io.InputStream;
4   import java.io.IOException;
5   
6   public class MockSearchableAttachment extends MockSearchableObject implements SearchableAttachment
7   {
8       String contentType;
9       String fileName;
10      String comment;
11      String niceType;
12      String niceFileSize;
13      String downloadPath;
14  
15      public String getNiceType()
16      {
17          return niceType;
18      }
19  
20      public void setNiceType(String niceType)
21      {
22          this.niceType = niceType;
23      }
24  
25      public String getNiceFileSize()
26      {
27          return niceFileSize;
28      }
29  
30      public void setNiceFileSize(String niceFileSize)
31      {
32          this.niceFileSize = niceFileSize;
33      }
34  
35      public String getDownloadPath()
36      {
37          return downloadPath;
38      }
39  
40      public void setDownloadPath(String downloadPath)
41      {
42          this.downloadPath = downloadPath;
43      }
44  
45      public String getContentType()
46      {
47          return contentType;
48      }
49  
50      public void setContentType(String contentType)
51      {
52          this.contentType = contentType;
53      }
54  
55      public String getFileName()
56      {
57          return fileName;
58      }
59  
60      public void setFileName(String fileName)
61      {
62          this.fileName = fileName;
63      }
64  
65      public InputStream getContentsAsStream() throws IOException
66      {
67          return getClass().getClassLoader().getResourceAsStream(fileName);
68      }
69  
70      public String getComment()
71      {
72          return comment;
73      }
74  
75      public void setComment(String comment)
76      {
77          this.comment = comment;
78      }
79  }