1    package com.instantbank.lettertemplate.editor.util;
2    
3    
4    /**
5     *  Constant definitions for letters template edition.
6     *
7     * @author InstantBank (Rodrigo Lopez)
8     * @created September 2002
9     */
10   public interface LetterOp {
11     /**
12      *  Load < code, name> of existing categories in the current company. They
13      *  may be kept in the servlet context. See {@link
14      *  com.instantbank.lettertemplate.editor.web.TemplateEditorServlet#loadCategories(String,ObjectOutputStream)}
15      */
16     public static final int LOADCATEGORIES = 1;
17   
18     /**
19      *  Loads code and stamps of a template and components identified by its
20      *  category, print type and name --in the case of the template-- and by their
21      *  print type and name --in the case of the components--. The template and
22      *  components don't need to be related. See {@link
23      *  com.instantbank.lettertemplate.editor.web.TemplateEditorServlet#loadCodesStamps(ObjectInputStream,ObjectOutputStream)}
24      */
25     public static final int LOADCODESTAMP = 2;
26   
27     /////////////////////////////////////////////////
28     // Actions on templates
29     /////////////////////////////////////////////////
30   
31     /**
32      *  Load a full Template starting from its code. See {@link
33      *  com.instantbank.lettertemplate.editor.web.TemplateEditorServlet#loadTemplate(HttpServletRequest,ObjectInputStream,ObjectOutputStream)}
34      */
35     public static final int LOADTEMPL = 3;
36   
37     /**
38      *  Loads < code,names> for all templates in a given category and print
39      *  type. See {@link com.instantbank.lettertemplate.editor.web.TemplateEditorServlet#loadTemplatesDescription(ObjectInputStream,ObjectOutputStream)}
40      */
41     public static final int LOADTEMPLNAMES = 4;
42   
43     /**
44      *  Loads code and stamp of one template and its components given the
45      *  template's code. See {@link com.instantbank.lettertemplate.editor.web.TemplateEditorServlet#loadTemplateCodes(ObjectInputStream,ObjectOutputStream)}
46      */
47     public static final int LOADTEMPLCODES = 5;
48   
49     /**
50      *  Stores a full template and returns < code,stamps> of the template and
51      *  its components. See {@link com.instantbank.lettertemplate.editor.web.TemplateEditorServlet#storeTemplate(String,ObjectInputStream,ObjectOutputStream)}
52      */
53     public static final int STORETEMPLATE = 6;
54   
55     /////////////////////////////////////
56     //Actions on components
57     /////////////////////////////////////
58   
59     /**
60      *  Loads a component after its code. See {@link
61      *  com.instantbank.lettertemplate.editor.web.TemplateEditorServlet#loadComponent(HttpServletRequest,ObjectInputStream,ObjectOutputStream)}
62      */
63     public static final int LOADCOMPONENT = 7;
64   
65     /**
66      *  Loads code and description of all components, for the current company, for
67      *  the specified component type and print type. See {@link
68      *  com.instantbank.lettertemplate.editor.web.TemplateEditorServlet#loadComponentsDescription(ObjectInputStream,ObjectOutputStream)}
69      */
70     public static final int LOADCOMPDESCR = 8;
71   
72     /**
73      *  Load [code, stamp] for a component given its type, printType and name. See
74      *  {@link com.instantbank.lettertemplate.editor.web.TemplateEditorServlet#loadComponentCode(ObjectInputStream,ObjectOutputStream)}
75      */
76     public static final int LOADCOMPCODE = 9;
77   
78     /**
79      *  Stores a given component. See {@link
80      *  com.instantbank.lettertemplate.editor.web.TemplateEditorServlet#storeComponent(String,ObjectInputStream,ObjectOutputStream)}
81      */
82     public static final int STORECOMPONENT = 10;
83   
84     /**
85      *  Stores a component related to a given template, eventually changing one of
86      *  the template's original components. See {@link
87      *  com.instantbank.lettertemplate.editor.web.TemplateEditorServlet#storeComponentAs(String,ObjectInputStream,ObjectOutputStream)}
88      */
89     public static final int STORECOMPONENTAS = 11;
90   
91     /**
92      *  Loads an image of the current company, given its name. See {@link
93      *  com.instantbank.lettertemplate.editor.web.TemplateEditorServlet#loadImageRepository(ObjectInputStream,ObjectOutputStream)}
94      */
95     public static final int LOADIMG = 12;
96   
97     /**
98      *  Load available images names from the images repository. See {@link
99      *  com.instantbank.lettertemplate.editor.web.TemplateEditorServlet#loadImagesNamesRepository(String,ObjectInputStream,ObjectOutputStream)}
100     */
101    public static final int LOADIMGNAMES = 13;
102  
103    //////////////////////////////////
104    // Other actions
105    //////////////////////////////////
106  
107    /**
108     *  Load loan variables. See {@link com.instantbank.lettertemplate.editor.web.TemplateEditorServlet#loadVariables(ObjectOutputStream)}
109     */
110    public static final int LOADVARIABLES = 14;
111  
112    /**
113     *  Load variable formats. See {@link com.instantbank.lettertemplate.editor.web.TemplateEditorServlet#loadVariableFormats(ObjectOutputStream)}
114     */
115    public static final int LOADVARIABLEFORMATS = 15;
116  
117    /**
118     *  Generates Pdf.
119     */
120    public static final int GENERATEPDF = 99;
121  
122    /**
123     *  Control timeout in lettertemplate and in Instantbank ears.
124     */
125    public static final int CONTROLTIMEOUT = 101;
126  
127    /**
128     *  Goes to another URL.
129     */
130    public static final int EXIT = 100;
131  
132    /**
133     *  Named fonts for the template editor.
134     */
135    public static final String[] FONTNAME = new String[]
136      {"Arial", "Times New Roman", "Monospaced"};
137    //{"Serif", "SansSerif", "Monospaced"};
138    /**
139     *  Standard font families corresponding to font names.
140     */
141    public static final String[] FONTFAMILY = new String[]
142      {"\\fswiss", "\\froman", "\\fmodern"};
143    /**
144     *  Altern names for fonts.
145     */
146    public static final String[] FONTALTNAME = new String[]
147      {"Helvetica", "Times", "Courier"};
148    /**
149     *  Font sizes
150     */
151    public static final String[] FONTSIZE = new String[]{
152      "8", "9", "10", "11", "12", "13", "14", "15", "16"};
153  
154    // Those can also be used
155    //, "18", "20", "22", "24",
156    //"26", "28", "36", "48", "72"};
157  
158    /////////////////////////////////////
159    //Global constants for the editor Gui
160    /////////////////////////////////////
161  
162  
163    public static final int SAVEAS = 1;
164  
165    public static final int LOAD = 2;
166  
167    public static final int SAVEWITHNEW = 3;
168  }
169