1 4 package com.openedit.store; 5 6 10 public class Image extends LinkedFile 11 { 12 protected String fieldPostfix; protected String fieldId; 14 protected String fieldType; 15 public static final String TYPE_ORIGINAL = "original"; 16 public static final String TYPE_MEDIUM = "medium"; 17 public static final String TYPE_THUMBNAIL = "thumb"; 18 19 protected int fieldWidth; 20 protected boolean isOriginal; 21 24 public Image(String inDesc, int inWidth, String inPostfix) 25 { 26 setDescription(inDesc); 27 setWidth(inWidth); 28 setPostfix(inPostfix); 29 } 30 33 public Image() 34 { 35 } 36 public String getPostfix() 37 { 38 if (fieldPostfix == null) 39 fieldPostfix = ""; 40 41 return fieldPostfix; 42 } 43 public void setPostfix(String inPostfix) 44 { 45 fieldPostfix = inPostfix; 46 } 47 public int getWidth() 48 { 49 return fieldWidth; 50 } 51 public void setWidth(int inWidth) 52 { 53 fieldWidth = inWidth; 54 } 55 public boolean isOriginal() 56 { 57 return isOriginal; 58 } 59 public void setOriginal(boolean inIsOriginal) 60 { 61 isOriginal = inIsOriginal; 62 } 63 public String getId() 64 { 65 return fieldId; 66 } 67 public void setId(String inId) 68 { 69 fieldId = inId; 70 } 71 public String getType() 72 { 73 return fieldType; 74 } 75 public void setType(String inType) 76 { 77 fieldType = inType; 78 } 79 public String buildLink(String inId) 80 { 81 return getType() + "/" + inId + "-" + getPostfix() + ".jpg"; 82 } 83 84 85 } 86 | Popular Tags |