1 package com.instantbank.component.lettertemplate.util; 2 3 import java.util.ArrayList; 4 5 /** 6 * Groups Template and LetterComponent objects as "viewable" objects; i.e: 7 * those that can be transformed to a printable version. 8 * 9 * @author InstantBank (Rodrigo Lopez) 10 * @created November 2002 11 */ 12 public interface LetterViewable { 13 14 /** 15 * Produces an array with information of images, in ascending order through 16 * all the text. The position information is kept but is meaningless in this 17 * case. 18 * 19 * @return An array of <position, image> 20 */ 21 public ArrayList[] getAllImages(); 22 23 24 /** 25 * Delivers the set of variables of this "viewable". 26 * 27 * @return Description of the Return Value 28 */ 29 public ArrayList[] setOfVariables(); 30 31 32 /** 33 * Delivers the viewable's code. 34 * 35 * @return The code value 36 */ 37 public long getCode(); 38 39 40 /** 41 * Delivers this viewables's name 42 * 43 * @return The name value 44 */ 45 public String getName(); 46 47 48 /** 49 * Delivers this viewables's print type (Laser or Typewritter) 50 * 51 * @return The printType value 52 */ 53 public int getPrintType(); 54 55 56 /** 57 * Decides if this viewable has variables. 58 * 59 * @return Description of the Return Value 60 */ 61 public boolean hasVariables(); 62 63 64 /** 65 * Transform this Viewable in a "fo-template" without external references to 66 * image files. 67 * 68 * @return The fo-template --as a String-- or null if something goes wrong. 69 */ 70 public String toFoTemplate(); 71 } 72