1   /*
2    * Copyright (c) 2002-2004
3    * All rights reserved.
4    */
5   
6   package com.atlassian.core.util.thumbnail;
7   
8   // Thumbnail image of image attachments.
9   public class Thumbnail
10  {
11      private int height;
12      private int width;
13  
14      private String filename;
15      private long attachmentId;
16  
17      public Thumbnail(int height, int width, String fileName, long attachmentId)
18      {
19          this.height = height;
20          this.width = width;
21          this.filename = fileName;
22          this.attachmentId = attachmentId;
23      }
24  
25      public int getHeight()
26      {
27          return height;
28      }
29  
30  
31      public int getWidth()
32      {
33          return width;
34      }
35  
36      /**
37       * Get the filename of the file this thumbnail represents.
38       */
39      public String getFilename()
40      {
41          return filename;
42      }
43  
44      /**
45       * the id of the attachment for which this is a thumbnail of 
46       * @return
47       */
48      public long getAttachmentId()
49      {
50          return attachmentId;
51      }
52  
53      public String toString()
54      {
55          return "Thumbnail " + filename + " width:" + width + " height:" + height;
56      }
57  }