KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openlaszlo > iv > flash > util > Resource


1 /*
2  * $Id: Resource.java,v 1.9 2002/08/02 03:15:17 skavish Exp $
3  *
4  * ===========================================================================
5  *
6  * The JGenerator Software License, Version 1.0
7  *
8  * Copyright (c) 2000 Dmitry Skavish (skavish@usa.net). All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions are met:
12  *
13  * 1. Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  *
16  * 2. Redistributions in binary form must reproduce the above copyright
17  * notice, this list of conditions and the following disclaimer in
18  * the documentation and/or other materials provided with the
19  * distribution.
20  *
21  * 3. The end-user documentation included with the redistribution, if
22  * any, must include the following acknowlegement:
23  * "This product includes software developed by Dmitry Skavish
24  * (skavish@usa.net, http://www.flashgap.com/)."
25  * Alternately, this acknowlegement may appear in the software itself,
26  * if and wherever such third-party acknowlegements normally appear.
27  *
28  * 4. The name "The JGenerator" must not be used to endorse or promote
29  * products derived from this software without prior written permission.
30  * For written permission, please contact skavish@usa.net.
31  *
32  * 5. Products derived from this software may not be called "The JGenerator"
33  * nor may "The JGenerator" appear in their names without prior written
34  * permission of Dmitry Skavish.
35  *
36  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39  * DISCLAIMED. IN NO EVENT SHALL DMITRY SKAVISH OR THE OTHER
40  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47  * SUCH DAMAGE.
48  *
49  */

50
51 package org.openlaszlo.iv.flash.util;
52
53 import java.util.*;
54
55 /**
56  * Resources
57  * <P>
58  * Resource key has to have digit in first character from 0 to 4.
59  * <ol start=0>
60  * <li>FATAL
61  * <li>ERROR
62  * <li>WARN
63  * <li>INFO
64  * <li>DEBUG
65  * </ol>
66  *
67  * @author Dmitry Skavish
68  */

69 public class Resource extends ListResourceBundle {
70
71     public static final String JavaDoc INFINITELOOP = "0_000";
72     public static final String JavaDoc GENCMDERR = "2_001";
73     public static final String JavaDoc UNKNOWNTAG = "4_002";
74     public static final String JavaDoc UNKNOWNGENTEXT = "4_003";
75     public static final String JavaDoc CMDNOTFOUND = "1_004";
76     public static final String JavaDoc CMDNOTCREATED = "1_005";
77     public static final String JavaDoc ERRCMDFILEREAD = "1_006";
78     public static final String JavaDoc CMDSCRIPTNOTFOUND = "1_007";
79     public static final String JavaDoc INVALRATEVALUE = "1_008";
80     public static final String JavaDoc INVALURL = "1_009";
81     public static final String JavaDoc ERRDATAREAD = "1_00a";
82     public static final String JavaDoc INVALDATASOURCE = "1_00b";
83     public static final String JavaDoc INVALALPHA = "1_00c";
84     public static final String JavaDoc COLNOTFOUNDCMD = "1_00d";
85     public static final String JavaDoc ERRPARSETEMPLATE = "0_00e";
86     public static final String JavaDoc CANTREADHEADER = "0_00f";
87     public static final String JavaDoc ILLEGALHEADER = "0_010";
88     public static final String JavaDoc FILETOOSHORT = "0_011";
89     public static final String JavaDoc FILETOOBIG = "0_012";
90     public static final String JavaDoc ERRWRITINGFILE = "1_013";
91     public static final String JavaDoc ERRREADINGFILE = "1_014";
92     public static final String JavaDoc FILENOTFOUND = "1_015";
93     public static final String JavaDoc UNKNOWNERROR = "1_016";
94     public static final String JavaDoc REENCODINGJPEG = "3_018";
95     public static final String JavaDoc INVLEXTERNALFONT = "1_019";
96     public static final String JavaDoc CLIPORDEFSYM = "1_01a";
97     public static final String JavaDoc ROWSORCOLS = "1_01b";
98     public static final String JavaDoc BORDERTOOTHICK = "1_01c";
99     public static final String JavaDoc PROCESSREQUEST = "3_01d";
100     public static final String JavaDoc ERRREADINGGIF = "1_01e";
101     public static final String JavaDoc ERRREADINGJPG = "1_01f";
102     public static final String JavaDoc ERRDOCMD = "1_020";
103     public static final String JavaDoc ERRREADINGPNG = "1_021";
104     public static final String JavaDoc UNSUPMEDIA = "1_022";
105     public static final String JavaDoc NOTEXT = "1_023";
106     public static final String JavaDoc CONNECTINGTO = "3_024";
107     public static final String JavaDoc RETRIEVINGCONTENT = "3_025";
108     public static final String JavaDoc INVLMP3LAYER = "1_026";
109     public static final String JavaDoc INVLMP3 = "1_027";
110     public static final String JavaDoc INVLMP3FREQUENCY = "1_028";
111     public static final String JavaDoc NOGRAPHCONTEXT = "1_029";
112     public static final String JavaDoc NOMATCHINGCONTEXTS = "1_02a";
113     public static final String JavaDoc EXPECTSTDCONTEXT = "1_02b";
114     public static final String JavaDoc ERRSETPROPERTY = "1_02e";
115     public static final String JavaDoc CANTLOADPROPERTIES = "1_02f";
116     public static final String JavaDoc CANTLOADSYSPROPS = "1_030";
117     public static final String JavaDoc SQLQUERY = "3_031";
118     public static final String JavaDoc BADHIGHORLOW = "1_032";
119     public static final String JavaDoc PROCESSERROR = "1_033";
120     public static final String JavaDoc REQUESTFROM = "3_034";
121     public static final String JavaDoc COLNOTFOUNDCMD1 = "1_035";
122     public static final String JavaDoc RESCALINGJPEG = "3_036";
123     public static final String JavaDoc JSERROR = "1_037";
124     public static final String JavaDoc SENDERROR = "1_038";
125     public static final String JavaDoc INLINECMDNOTFOUND = "1_039";
126     public static final String JavaDoc INLINECMDERROR = "1_03a";
127     public static final String JavaDoc CMDINSTNOTFOUND = "1_03b";
128     public static final String JavaDoc SERVERSTARTED = "3_03c";
129     public static final String JavaDoc ASASMREQFLASH5 = "2_03d";
130
131     private static final Object JavaDoc[][] contents = {
132         {INFINITELOOP , "Infinite loop in script processing"},
133         {GENCMDERR , "Generator command ''{0}'' can be applied to instance only"},
134         {UNKNOWNTAG , "Unknown tag {0} found"},
135         {UNKNOWNGENTEXT , "Unknown generator text subtag {0} found"},
136         {CMDNOTFOUND , "Generator Command ''{0}'' not found"},
137         {CMDNOTCREATED , "Error creating Generator Command ''{0}''"},
138         {ERRCMDFILEREAD , "Error reading file ''{0}'' in command {1}"},
139         {CMDSCRIPTNOTFOUND , "Script ''{0}'' not found in command {1}"},
140         {INVALRATEVALUE , "Invalid rate {0} in command SetMovieParameters"},
141         {INVALURL , "Invalid url ''{0}''"},
142         {ERRDATAREAD , "Error reading data from datasource ''{0}'' in command {1}"},
143         {INVALDATASOURCE , "Invalid datasource ''{0}'' in command {1}"},
144         {INVALALPHA , "Invalid percent value {0} in command {1}"},
145         {COLNOTFOUNDCMD , "Command {0}: Column {1} not found in datasource {2}"},
146         {COLNOTFOUNDCMD1 , "Command {0}: One of the following columns are required in datasource: {1}"},
147         {ERRPARSETEMPLATE , "Error parsing template ''{0}''"},
148         {CANTREADHEADER , "Cannot read the header of template ''{0}''"},
149         {ILLEGALHEADER , "Template ''{0}'' has illegal header - not a Shockwave Flash File"},
150         {FILETOOSHORT , "Template ''{0}'' size is too short"},
151         {FILETOOBIG , "Template ''{0}'' too big to fit into memory"},
152         {ERRWRITINGFILE , "Error writing file ''{0}''"},
153         {ERRREADINGFILE , "Error reading file ''{0}''"},
154         {FILENOTFOUND , "File ''{0}'' not found"},
155         {UNKNOWNERROR , "Unexpected exception caught, please send the log file to developers"},
156         {REENCODINGJPEG , "reEncoding JPEG image with quality {0}"},
157         {RESCALINGJPEG , "reScaling JPEG image with quality {2}, new width={0}, height={1}"},
158         {INVLEXTERNALFONT , "Cannot find any fonts in file ''{0}''"},
159         {CLIPORDEFSYM , "Table object has to have either Clip column or DefaultSymbol"},
160         {ROWSORCOLS , "Invalid number of rows or columns in command {0}"},
161         {BORDERTOOTHICK , "Border is too thick in Table command"},
162         {PROCESSREQUEST , "Processed file ''{0}'', output size {1} bytes, processing time {2}ms, total time {3}ms"},
163         {ERRREADINGGIF , "Error reading GIF stream"},
164         {ERRREADINGJPG , "Error reading JPEG stream"},
165         {ERRDOCMD , "Error occured in file ''{0}'', movie clip ''{1}'', frame ''{2}'', command ''{3}''"},
166         {ERRREADINGPNG , "Error reading PNG stream"},
167         {UNSUPMEDIA , "Unsupported media file ''{0}''"},
168         {NOTEXT , "No text for 'InsertText' command"},
169         {CONNECTINGTO , "Connecting to {0} ..."},
170         {RETRIEVINGCONTENT , "Retrieving content of {0} ..."},
171         {INVLMP3LAYER , "Invalid MP3 - only MPEG Audio Layer 3 supported"},
172         {INVLMP3 , "Invalid MP3 header"},
173         {INVLMP3FREQUENCY , "Invalid MP3 frequency - must be 11025Hz, 22050Hz or 44100Hz"},
174         {NOGRAPHCONTEXT , "Current context has no GraphContext ancestor"},
175         {NOMATCHINGCONTEXTS , "No ancestor provided a match for ''{0}''"},
176         {EXPECTSTDCONTEXT , "Text (tabular) context has been expected"},
177         {ERRSETPROPERTY , "Please set property 'org.openlaszlo.iv.flash.installDir' to the directory where the JGenerator is installed"},
178         {CANTLOADPROPERTIES , "Cannot load properties file"},
179         {CANTLOADSYSPROPS , "Cannot retrieve system properties, using defaults"},
180         {SQLQUERY , "SQL Query \n driver: {0}\n url: {1}\n user/password: {2}/{3}\n query: {4}"},
181         {BADHIGHORLOW , "Command {0}: Either HIGH or LOW is not extreme value in row {1} of datasource {2}"},
182         {PROCESSERROR , "Error processing template ''{0}''"},
183         {SENDERROR , "Error writing to output stream during processing of template ''{0}''"},
184         {REQUESTFROM , "Processing request from ''{0}''"},
185         {JSERROR , "JavaScript: {0}"},
186         {INLINECMDNOTFOUND , "Inline command {0} not found"},
187         {INLINECMDERROR , "Error executing inline command {0}"},
188         {CMDINSTNOTFOUND , "Could not find an instance for command {0}. Set parameter 'instancename'."},
189         {SERVERSTARTED , "JGenerator servlet started."},
190         {ASASMREQFLASH5 , "ASAssembler requires SWF version to be 5+"},
191     };
192
193     public Object JavaDoc[][] getContents() {
194         return contents;
195     }
196
197     public static String JavaDoc get( String JavaDoc key ) {
198         return bundle.getString(key);
199     }
200
201     private static ResourceBundle bundle;
202
203     public static ResourceBundle getInstance() {
204         return bundle;
205     }
206
207     static {
208         bundle = ResourceBundle.getBundle( Resource.class.getName() );
209     }
210
211 }
212
213
Popular Tags