1 /*
2 * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25 package javax.print.attribute.standard;
26
27 import javax.print.attribute.EnumSyntax;
28 import javax.print.attribute.Attribute;
29
30 /**
31 * Class PrinterStateReason is a printing attribute class, an enumeration,
32 * that provides additional information about the printer's current state,
33 * i.e., information that augments the value of the printer's
34 * {@link PrinterState PrinterState} attribute.
35 * Class PrinterStateReason defines standard printer
36 * state reason values. A Print Service implementation only needs to report
37 * those printer state reasons which are appropriate for the particular
38 * implementation; it does not have to report every defined printer state
39 * reason.
40 * <P>
41 * Instances of PrinterStateReason do not appear in a Print Service's
42 * attribute set directly.
43 * Rather, a {@link PrinterStateReasons PrinterStateReasons}
44 * attribute appears in the Print Service's attribute set. The {@link
45 * PrinterStateReasons PrinterStateReasons} attribute contains zero, one, or
46 * more than one PrinterStateReason objects which pertain to the
47 * Print Service's status, and each PrinterStateReason object is
48 * associated with a {@link Severity Severity} level of REPORT (least severe),
49 * WARNING, or ERROR (most severe). The printer adds a PrinterStateReason
50 * object to the Print Service's
51 * {@link PrinterStateReasons PrinterStateReasons} attribute when the
52 * corresponding condition becomes true of the printer, and the printer
53 * removes the PrinterStateReason object again when the corresponding
54 * condition becomes false, regardless of whether the Print Service's overall
55 * {@link PrinterState PrinterState} also changed.
56 * <P>
57 * <B>IPP Compatibility:</B>
58 * The string values returned by each individual {@link PrinterStateReason} and
59 * associated {@link Severity} object's {@code toString()}
60 * methods, concatenated together with a hyphen ({@code "-"}) in
61 * between, gives the IPP keyword value for a {@link PrinterStateReasons}.
62 * The category name returned by {@code getName()} gives the IPP
63 * attribute name.
64 *
65 * @author Alan Kaminsky
66 */
67 public class PrinterStateReason extends EnumSyntax implements Attribute {
68
69 private static final long serialVersionUID = -1623720656201472593L;
70
71 /**
72 * The printer has detected an error other than ones listed below.
73 */
74 public static final PrinterStateReason OTHER = new PrinterStateReason(0);
75
76 /**
77 * A tray has run out of media.
78 */
79 public static final PrinterStateReason
80 MEDIA_NEEDED = new PrinterStateReason(1);
81
82 /**
83 * The device has a media jam.
84 */
85 public static final PrinterStateReason
86 MEDIA_JAM = new PrinterStateReason(2);
87
88 /**
89 * Someone has paused the printer, but the device(s) are taking an
90 * appreciable time to stop. Later, when all output has stopped,
91 * the {@link PrinterState PrinterState} becomes STOPPED,
92 * and the PAUSED value replaces
93 * the MOVING_TO_PAUSED value in the {@link PrinterStateReasons
94 * PrinterStateReasons} attribute. This value must be supported if the
95 * printer can be paused and the implementation takes significant time to
96 * pause a device in certain circumstances.
97 */
98 public static final PrinterStateReason
99 MOVING_TO_PAUSED = new PrinterStateReason(3);
100
101 /**
102 * Someone has paused the printer and the printer's {@link PrinterState
103 * PrinterState} is STOPPED. In this state, a printer must not produce
104 * printed output, but it must perform other operations requested by a
105 * client. If a printer had been printing a job when the printer was
106 * paused,
107 * the Printer must resume printing that job when the printer is no longer
108 * paused and leave no evidence in the printed output of such a pause.
109 * This value must be supported if the printer can be paused.
110 */
111 public static final PrinterStateReason
112 PAUSED = new PrinterStateReason(4);
113
114 /**
115 * Someone has removed a printer from service, and the device may be
116 * powered down or physically removed.
117 * In this state, a printer must not produce
118 * printed output, and unless the printer is realized by a print server
119 * that is still active, the printer must perform no other operations
120 * requested by a client.
121 * If a printer had been printing a job when it was shut down,
122 * the printer need not resume printing that job when the printer is no
123 * longer shut down. If the printer resumes printing such a job, it may
124 * leave evidence in the printed output of such a shutdown, e.g. the part
125 * printed before the shutdown may be printed a second time after the
126 * shutdown.
127 */
128 public static final PrinterStateReason
129 SHUTDOWN = new PrinterStateReason(5);
130
131 /**
132 * The printer has scheduled a job on the output device and is in the
133 * process of connecting to a shared network output device (and might not
134 * be able to actually start printing the job for an arbitrarily long time
135 * depending on the usage of the output device by other servers on the
136 * network).
137 */
138 public static final PrinterStateReason
139 CONNECTING_TO_DEVICE = new PrinterStateReason(6);
140
141 /**
142 * The server was able to connect to the output device (or is always
143 * connected), but was unable to get a response from the output device.
144 */
145 public static final PrinterStateReason
146 TIMED_OUT = new PrinterStateReason(7);
147
148 /**
149 * The printer is in the process of stopping the device and will be
150 * stopped in a while.
151 * When the device is stopped, the printer will change the
152 * {@link PrinterState PrinterState} to STOPPED. The STOPPING reason is
153 * never an error, even for a printer with a single output device. When an
154 * output device ceases accepting jobs, the printer's {@link
155 * PrinterStateReasons PrinterStateReasons} will have this reason while
156 * the output device completes printing.
157 */
158 public static final PrinterStateReason
159 STOPPING = new PrinterStateReason(8);
160
161 /**
162 * When a printer controls more than one output device, this reason
163 * indicates that one or more output devices are stopped. If the reason's
164 * severity is a report, fewer than half of the output devices are
165 * stopped.
166 * If the reason's severity is a warning, half or more but fewer than
167 * all of the output devices are stopped.
168 */
169 public static final PrinterStateReason
170 STOPPED_PARTLY = new PrinterStateReason(9);
171
172 /**
173 * The device is low on toner.
174 */
175 public static final PrinterStateReason
176 TONER_LOW = new PrinterStateReason(10);
177
178 /**
179 * The device is out of toner.
180 */
181 public static final PrinterStateReason
182 TONER_EMPTY = new PrinterStateReason(11);
183
184 /**
185 * The limit of persistent storage allocated for spooling has been
186 * reached.
187 * The printer is temporarily unable to accept more jobs. The printer will
188 * remove this reason when it is able to accept more jobs.
189 * This value should be used by a non-spooling printer that only
190 * accepts one or a small number
191 * jobs at a time or a spooling printer that has filled the spool space.
192 */
193 public static final PrinterStateReason
194 SPOOL_AREA_FULL = new PrinterStateReason(12);
195
196 /**
197 * One or more covers on the device are open.
198 */
199 public static final PrinterStateReason
200 COVER_OPEN = new PrinterStateReason(13);
201
202 /**
203 * One or more interlock devices on the printer are unlocked.
204 */
205 public static final PrinterStateReason
206 INTERLOCK_OPEN = new PrinterStateReason(14);
207
208 /**
209 * One or more doors on the device are open.
210 */
219
220 /**
221 * At least one input tray is low on media.
222 */
223 public static final PrinterStateReason
224 MEDIA_LOW = new PrinterStateReason(17);
225
226 /**
227 * At least one input tray is empty.
228 */
229 public static final PrinterStateReason
230 MEDIA_EMPTY = new PrinterStateReason(18);
231
232 /**
233 * One or more output trays are not in the device.
234 */
235 public static final PrinterStateReason
236 OUTPUT_TRAY_MISSING = new PrinterStateReason(19);
237
238 /**
239 * One or more output areas are almost full
240 * (e.g. tray, stacker, collator).
241 */
242 public static final PrinterStateReason
243 OUTPUT_AREA_ALMOST_FULL = new PrinterStateReason(20);
244
245 /**
246 * One or more output areas are full (e.g. tray, stacker, collator).
247 */
248 public static final PrinterStateReason
249 OUTPUT_AREA_FULL = new PrinterStateReason(21);
250
251 /**
252 * The device is low on at least one marker supply (e.g. toner, ink,
253 * ribbon).
254 */
255 public static final PrinterStateReason
256 MARKER_SUPPLY_LOW = new PrinterStateReason(22);
257
258 /**
259 * The device is out of at least one marker supply (e.g. toner, ink,
260 * ribbon).
300
301 /**
302 * The device is low on developer.
303 */
304 public static final PrinterStateReason
305 DEVELOPER_LOW = new PrinterStateReason(30);
306
307 /**
308 * The device is out of developer.
309 */
310 public static final PrinterStateReason
311 DEVELOPER_EMPTY = new PrinterStateReason(31);
312
313 /**
314 * An interpreter resource is unavailable (e.g., font, form).
315 */
316 public static final PrinterStateReason
317 INTERPRETER_RESOURCE_UNAVAILABLE = new PrinterStateReason(32);
318
319 /**
320 * Construct a new printer state reason enumeration value with
321 * the given integer value.
322 *
323 * @param value Integer value.
324 */
325 protected PrinterStateReason(int value) {
326 super (value);
327 }
328
329 private static final String[] myStringTable = {
330 "other",
331 "media-needed",
332 "media-jam",
333 "moving-to-paused",
334 "paused",
335 "shutdown",
336 "connecting-to-device",
337 "timed-out",
338 "stopping",
339 "stopped-partly",
340 "toner-low",
341 "toner-empty",
342 "spool-area-full",
343 "cover-open",
344 "interlock-open",
345 "door-open",
346 "input-tray-missing",
347 "media-low",
348 "media-empty",
349 "output-tray-missing",
350 "output-area-almost-full",
351 "output-area-full",
352 "marker-supply-low",
353 "marker-supply-empty",
354 "marker-waste-almost-full",
355 "marker-waste-full",
356 "fuser-over-temp",
357 "fuser-under-temp",
358 "opc-near-eol",
359 "opc-life-over",
360 "developer-low",
361 "developer-empty",
362 "interpreter-resource-unavailable"
363 };
364
365 private static final PrinterStateReason[] myEnumValueTable = {
366 OTHER,
367 MEDIA_NEEDED,
368 MEDIA_JAM,
369 MOVING_TO_PAUSED,
370 PAUSED,
371 SHUTDOWN,
372 CONNECTING_TO_DEVICE,
373 TIMED_OUT,
374 STOPPING,
375 STOPPED_PARTLY,
376 TONER_LOW,
377 TONER_EMPTY,
378 SPOOL_AREA_FULL,
379 COVER_OPEN,
380 INTERLOCK_OPEN,
381 DOOR_OPEN,
382 INPUT_TRAY_MISSING,
383 MEDIA_LOW,
384 MEDIA_EMPTY,
385 OUTPUT_TRAY_MISSING,
386 OUTPUT_AREA_ALMOST_FULL,
387 OUTPUT_AREA_FULL,
388 MARKER_SUPPLY_LOW,
389 MARKER_SUPPLY_EMPTY,
390 MARKER_WASTE_ALMOST_FULL,
391 MARKER_WASTE_FULL,
392 FUSER_OVER_TEMP,
393 FUSER_UNDER_TEMP,
394 OPC_NEAR_EOL,
395 OPC_LIFE_OVER,
396 DEVELOPER_LOW,
397 DEVELOPER_EMPTY,
398 INTERPRETER_RESOURCE_UNAVAILABLE
399 };
400
401 /**
402 * Returns the string table for class PrinterStateReason.
403 */
404 protected String[] getStringTable() {
405 return myStringTable.clone();
406 }
407
408 /**
409 * Returns the enumeration value table for class PrinterStateReason.
410 */
411 protected EnumSyntax[] getEnumValueTable() {
412 return (EnumSyntax[])myEnumValueTable.clone();
413 }
414
415
416 /**
417 * Get the printing attribute class which is to be used as the "category"
418 * for this printing attribute value.
419 * <P>
420 * For class PrinterStateReason and any vendor-defined subclasses, the
421 * category is class PrinterStateReason itself.
422 *
423 * @return Printing attribute class (category), an instance of class
424 * {@link java.lang.Class java.lang.Class}.
425 */
426 public final Class<? extends Attribute> getCategory() {
427 return PrinterStateReason.class;
428 }
429
430 /**
431 * Get the name of the category of which this attribute value is an
432 * instance.
433 * <P>
434 * For class PrinterStateReason and any vendor-defined subclasses, the
435 * category name is {@code "printer-state-reason"}.
436 *
437 * @return Attribute category name.
438 */
439 public final String getName() {
440 return "printer-state-reason";
441 }
442
443 }
|
1 /*
2 * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package javax.print.attribute.standard;
27
28 import javax.print.attribute.Attribute;
29 import javax.print.attribute.EnumSyntax;
30
31 /**
32 * Class {@code PrinterStateReason} is a printing attribute class, an
33 * enumeration, that provides additional information about the printer's current
34 * state, i.e., information that augments the value of the printer's
35 * {@link PrinterState PrinterState} attribute. Class PrinterStateReason defines
36 * standard printer state reason values. A Print Service implementation only
37 * needs to report those printer state reasons which are appropriate for the
38 * particular implementation; it does not have to report every defined printer
39 * state reason.
40 * <p>
41 * Instances of {@code PrinterStateReason} do not appear in a Print Service's
42 * attribute set directly. Rather, a
43 * {@link PrinterStateReasons PrinterStateReasons} attribute appears in the
44 * Print Service's attribute set. The
45 * {@link PrinterStateReasons PrinterStateReasons} attribute contains zero, one,
46 * or more than one {@code PrinterStateReason} objects which pertain to the
47 * Print Service's status, and each PrinterStateReason object is associated with
48 * a {@link Severity Severity} level of {@code REPORT} (least severe),
49 * {@code WARNING}, or {@code ERROR} (most severe). The printer adds a
50 * {@code PrinterStateReason} object to the Print Service's
51 * {@link PrinterStateReasons PrinterStateReasons} attribute when the
52 * corresponding condition becomes true of the printer, and the printer removes
53 * the {@code PrinterStateReason} object again when the corresponding condition
54 * becomes false, regardless of whether the Print Service's overall
55 * {@link PrinterState PrinterState} also changed.
56 * <p>
57 * <b>IPP Compatibility:</b> The string values returned by each individual
58 * {@link PrinterStateReason} and associated {@link Severity} object's
59 * {@code toString()} methods, concatenated together with a hyphen ({@code "-"})
60 * in between, gives the IPP keyword value for a {@link PrinterStateReasons}.
61 * The category name returned by {@code getName()} gives the IPP attribute name.
62 *
63 * @author Alan Kaminsky
64 */
65 public class PrinterStateReason extends EnumSyntax implements Attribute {
66
67 /**
68 * Use serialVersionUID from JDK 1.4 for interoperability.
69 */
70 private static final long serialVersionUID = -1623720656201472593L;
71
72 /**
73 * The printer has detected an error other than ones listed below.
74 */
75 public static final PrinterStateReason OTHER = new PrinterStateReason(0);
76
77 /**
78 * A tray has run out of media.
79 */
80 public static final PrinterStateReason
81 MEDIA_NEEDED = new PrinterStateReason(1);
82
83 /**
84 * The device has a media jam.
85 */
86 public static final PrinterStateReason
87 MEDIA_JAM = new PrinterStateReason(2);
88
89 /**
90 * Someone has paused the printer, but the device(s) are taking an
91 * appreciable time to stop. Later, when all output has stopped, the
92 * {@link PrinterState PrinterState} becomes {@code STOPPED}, and the
93 * {@code PAUSED} value replaces the {@code MOVING_TO_PAUSED} value in the
94 * {@link PrinterStateReasons PrinterStateReasons} attribute. This value
95 * must be supported if the printer can be paused and the implementation
96 * takes significant time to pause a device in certain circumstances.
97 */
98 public static final PrinterStateReason
99 MOVING_TO_PAUSED = new PrinterStateReason(3);
100
101 /**
102 * Someone has paused the printer and the printer's
103 * {@link PrinterState PrinterState} is {@code STOPPED}. In this state, a
104 * printer must not produce printed output, but it must perform other
105 * operations requested by a client. If a printer had been printing a job
106 * when the printer was paused, the {@code Printer} must resume printing
107 * that job when the printer is no longer paused and leave no evidence in
108 * the printed output of such a pause. This value must be supported if the
109 * printer can be paused.
110 */
111 public static final PrinterStateReason
112 PAUSED = new PrinterStateReason(4);
113
114 /**
115 * Someone has removed a printer from service, and the device may be powered
116 * down or physically removed. In this state, a printer must not produce
117 * printed output, and unless the printer is realized by a print server that
118 * is still active, the printer must perform no other operations requested
119 * by a client. If a printer had been printing a job when it was shut down,
120 * the printer need not resume printing that job when the printer is no
121 * longer shut down. If the printer resumes printing such a job, it may
122 * leave evidence in the printed output of such a shutdown, e.g. the part
123 * printed before the shutdown may be printed a second time after the
124 * shutdown.
125 */
126 public static final PrinterStateReason
127 SHUTDOWN = new PrinterStateReason(5);
128
129 /**
130 * The printer has scheduled a job on the output device and is in the
131 * process of connecting to a shared network output device (and might not be
132 * able to actually start printing the job for an arbitrarily long time
133 * depending on the usage of the output device by other servers on the
134 * network).
135 */
136 public static final PrinterStateReason
137 CONNECTING_TO_DEVICE = new PrinterStateReason(6);
138
139 /**
140 * The server was able to connect to the output device (or is always
141 * connected), but was unable to get a response from the output device.
142 */
143 public static final PrinterStateReason
144 TIMED_OUT = new PrinterStateReason(7);
145
146 /**
147 * The printer is in the process of stopping the device and will be stopped
148 * in a while. When the device is stopped, the printer will change the
149 * {@link PrinterState PrinterState} to {@code STOPPED}. The
150 * {@code STOPPING} reason is never an error, even for a printer with a
151 * single output device. When an output device ceases accepting jobs, the
152 * printer's {@link PrinterStateReasons PrinterStateReasons} will have this
153 * reason while the output device completes printing.
154 */
155 public static final PrinterStateReason
156 STOPPING = new PrinterStateReason(8);
157
158 /**
159 * When a printer controls more than one output device, this reason
160 * indicates that one or more output devices are stopped. If the reason's
161 * severity is a report, fewer than half of the output devices are stopped.
162 * If the reason's severity is a warning, half or more but fewer than all of
163 * the output devices are stopped.
164 */
165 public static final PrinterStateReason
166 STOPPED_PARTLY = new PrinterStateReason(9);
167
168 /**
169 * The device is low on toner.
170 */
171 public static final PrinterStateReason
172 TONER_LOW = new PrinterStateReason(10);
173
174 /**
175 * The device is out of toner.
176 */
177 public static final PrinterStateReason
178 TONER_EMPTY = new PrinterStateReason(11);
179
180 /**
181 * The limit of persistent storage allocated for spooling has been reached.
182 * The printer is temporarily unable to accept more jobs. The printer will
183 * remove this reason when it is able to accept more jobs. This value should
184 * be used by a non-spooling printer that only accepts one or a small number
185 * jobs at a time or a spooling printer that has filled the spool space.
186 */
187 public static final PrinterStateReason
188 SPOOL_AREA_FULL = new PrinterStateReason(12);
189
190 /**
191 * One or more covers on the device are open.
192 */
193 public static final PrinterStateReason
194 COVER_OPEN = new PrinterStateReason(13);
195
196 /**
197 * One or more interlock devices on the printer are unlocked.
198 */
199 public static final PrinterStateReason
200 INTERLOCK_OPEN = new PrinterStateReason(14);
201
202 /**
203 * One or more doors on the device are open.
204 */
213
214 /**
215 * At least one input tray is low on media.
216 */
217 public static final PrinterStateReason
218 MEDIA_LOW = new PrinterStateReason(17);
219
220 /**
221 * At least one input tray is empty.
222 */
223 public static final PrinterStateReason
224 MEDIA_EMPTY = new PrinterStateReason(18);
225
226 /**
227 * One or more output trays are not in the device.
228 */
229 public static final PrinterStateReason
230 OUTPUT_TRAY_MISSING = new PrinterStateReason(19);
231
232 /**
233 * One or more output areas are almost full (e.g. tray, stacker, collator).
234 */
235 public static final PrinterStateReason
236 OUTPUT_AREA_ALMOST_FULL = new PrinterStateReason(20);
237
238 /**
239 * One or more output areas are full (e.g. tray, stacker, collator).
240 */
241 public static final PrinterStateReason
242 OUTPUT_AREA_FULL = new PrinterStateReason(21);
243
244 /**
245 * The device is low on at least one marker supply (e.g. toner, ink,
246 * ribbon).
247 */
248 public static final PrinterStateReason
249 MARKER_SUPPLY_LOW = new PrinterStateReason(22);
250
251 /**
252 * The device is out of at least one marker supply (e.g. toner, ink,
253 * ribbon).
293
294 /**
295 * The device is low on developer.
296 */
297 public static final PrinterStateReason
298 DEVELOPER_LOW = new PrinterStateReason(30);
299
300 /**
301 * The device is out of developer.
302 */
303 public static final PrinterStateReason
304 DEVELOPER_EMPTY = new PrinterStateReason(31);
305
306 /**
307 * An interpreter resource is unavailable (e.g., font, form).
308 */
309 public static final PrinterStateReason
310 INTERPRETER_RESOURCE_UNAVAILABLE = new PrinterStateReason(32);
311
312 /**
313 * Construct a new printer state reason enumeration value with the given
314 * integer value.
315 *
316 * @param value Integer value
317 */
318 protected PrinterStateReason(int value) {
319 super (value);
320 }
321
322 /**
323 * The string table for class {@code PrinterStateReason}.
324 */
325 private static final String[] myStringTable = {
326 "other",
327 "media-needed",
328 "media-jam",
329 "moving-to-paused",
330 "paused",
331 "shutdown",
332 "connecting-to-device",
333 "timed-out",
334 "stopping",
335 "stopped-partly",
336 "toner-low",
337 "toner-empty",
338 "spool-area-full",
339 "cover-open",
340 "interlock-open",
341 "door-open",
342 "input-tray-missing",
343 "media-low",
344 "media-empty",
345 "output-tray-missing",
346 "output-area-almost-full",
347 "output-area-full",
348 "marker-supply-low",
349 "marker-supply-empty",
350 "marker-waste-almost-full",
351 "marker-waste-full",
352 "fuser-over-temp",
353 "fuser-under-temp",
354 "opc-near-eol",
355 "opc-life-over",
356 "developer-low",
357 "developer-empty",
358 "interpreter-resource-unavailable"
359 };
360
361 /**
362 * The enumeration value table for class {@code PrinterStateReason}.
363 */
364 private static final PrinterStateReason[] myEnumValueTable = {
365 OTHER,
366 MEDIA_NEEDED,
367 MEDIA_JAM,
368 MOVING_TO_PAUSED,
369 PAUSED,
370 SHUTDOWN,
371 CONNECTING_TO_DEVICE,
372 TIMED_OUT,
373 STOPPING,
374 STOPPED_PARTLY,
375 TONER_LOW,
376 TONER_EMPTY,
377 SPOOL_AREA_FULL,
378 COVER_OPEN,
379 INTERLOCK_OPEN,
380 DOOR_OPEN,
381 INPUT_TRAY_MISSING,
382 MEDIA_LOW,
383 MEDIA_EMPTY,
384 OUTPUT_TRAY_MISSING,
385 OUTPUT_AREA_ALMOST_FULL,
386 OUTPUT_AREA_FULL,
387 MARKER_SUPPLY_LOW,
388 MARKER_SUPPLY_EMPTY,
389 MARKER_WASTE_ALMOST_FULL,
390 MARKER_WASTE_FULL,
391 FUSER_OVER_TEMP,
392 FUSER_UNDER_TEMP,
393 OPC_NEAR_EOL,
394 OPC_LIFE_OVER,
395 DEVELOPER_LOW,
396 DEVELOPER_EMPTY,
397 INTERPRETER_RESOURCE_UNAVAILABLE
398 };
399
400 /**
401 * Returns the string table for class {@code PrinterStateReason}.
402 */
403 protected String[] getStringTable() {
404 return myStringTable.clone();
405 }
406
407 /**
408 * Returns the enumeration value table for class {@code PrinterStateReason}.
409 */
410 protected EnumSyntax[] getEnumValueTable() {
411 return (EnumSyntax[])myEnumValueTable.clone();
412 }
413
414 /**
415 * Get the printing attribute class which is to be used as the "category"
416 * for this printing attribute value.
417 * <p>
418 * For class {@code PrinterStateReason} and any vendor-defined subclasses,
419 * the category is class {@code PrinterStateReason} itself.
420 *
421 * @return printing attribute class (category), an instance of class
422 * {@link Class java.lang.Class}
423 */
424 public final Class<? extends Attribute> getCategory() {
425 return PrinterStateReason.class;
426 }
427
428 /**
429 * Get the name of the category of which this attribute value is an
430 * instance.
431 * <p>
432 * For class {@code PrinterStateReason} and any vendor-defined subclasses,
433 * the category name is {@code "printer-state-reason"}.
434 *
435 * @return attribute category name
436 */
437 public final String getName() {
438 return "printer-state-reason";
439 }
440 }
|