summaryrefslogtreecommitdiff
path: root/libjava/classpath/javax/print/attribute/standard/PrinterStateReason.java
blob: c3838b26521b28e46a59f791fe81f79a94668fe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
/* PrinterStateReason.java --
   Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.

This file is part of GNU Classpath.

GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING.  If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.

Linking this library statically or dynamically with other modules is
making a combined work based on this library.  Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.

As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module.  An independent module is a module which is not derived from
or based on this library.  If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so.  If you do not wish to do so, delete this
exception statement from your version. */


package javax.print.attribute.standard;

import javax.print.attribute.Attribute;
import javax.print.attribute.EnumSyntax;

/**
 * The <code>PrinterStateReason</code> attribute provides additional
 * information about the current state of the printer device. Its always part
 * of the {@link javax.print.attribute.standard.PrinterStateReasons}
 * printing attribute.
 * <p>
 * <b>IPP Compatibility:</b> PrinterStateReason is not an IPP 1.1
 * attribute itself but used inside the <code>PrinterStateReasons</code>
 * attribute.
 * </p>
 *
 * @author Michael Koch (konqueror@gmx.de)
 * @author Wolfgang Baer (WBaer@gmx.de)
 */
public class PrinterStateReason extends EnumSyntax
  implements Attribute
{
  private static final long serialVersionUID = -1623720656201472593L;

  /**
   * Any state other state not listed here.
   */
  public static final PrinterStateReason OTHER = new PrinterStateReason(0);

  /**
   * A media tray has run out of media.
   */
  public static final PrinterStateReason MEDIA_NEEDED =
    new PrinterStateReason(1);

  /**
   * A media jam occured in the printer device.
   */
  public static final PrinterStateReason MEDIA_JAM = new PrinterStateReason(2);

  /**
   * Indicates that the printer has been paused by the pause printer
   * operation and is currently moving to the pause state.
   */
  public static final PrinterStateReason MOVING_TO_PAUSED =
    new PrinterStateReason(3);

  /**
   * The printer device has be paused by the pause printer operation.
   */
  public static final PrinterStateReason PAUSED = new PrinterStateReason(4);

  /**
   * The printer device has been shutdown or removed from service.
   */
  public static final PrinterStateReason SHUTDOWN = new PrinterStateReason(5);

  /**
   * The printer object is connecting to the device. If a printer
   * device is on the network the printer object may be unable to connect.
   */
  public static final PrinterStateReason CONNECTING_TO_DEVICE =
    new PrinterStateReason(6);

  /**
   * The connection to the device has timed out.
   */
  public static final PrinterStateReason TIMED_OUT = new PrinterStateReason(7);

  /**
   * The printer object is stopping the printer device.
   */
  public static final PrinterStateReason STOPPING = new PrinterStateReason(8);

  /**
   * The printer object has stopped partly. A printer object may control
   * several physical output devices (e.g. a printer class in CUPS) and
   * stop only some of the devices.
   */
  public static final PrinterStateReason STOPPED_PARTLY =
    new PrinterStateReason(9);

  /**
   * The printer device is low on toner.
   */
  public static final PrinterStateReason TONER_LOW =
    new PrinterStateReason(10);

  /**
   * The printer device is out of toner.
   */
  public static final PrinterStateReason TONER_EMPTY =
    new PrinterStateReason(11);

  /**
   * The printers spool area is currently full. The printer is
   * currently not able to accept jobs.
   */
  public static final PrinterStateReason SPOOL_AREA_FULL =
    new PrinterStateReason(12);

  /**
   * One or more covers of the printer device are open.
   */
  public static final PrinterStateReason COVER_OPEN =
    new PrinterStateReason(13);

  /**
   * One or more interlocks of the printer device are open.
   */
  public static final PrinterStateReason INTERLOCK_OPEN =
    new PrinterStateReason(14);

  /**
   * One or more doors of the printer device are open.
   */
  public static final PrinterStateReason DOOR_OPEN =
    new PrinterStateReason(15);

  /**
   * One or more input trays are missing in the printer device.
   */
  public static final PrinterStateReason INPUT_TRAY_MISSING =
    new PrinterStateReason(16);

  /**
   * The printer device is low on media.
   */
  public static final PrinterStateReason MEDIA_LOW =
    new PrinterStateReason(17);

  /**
   * The printer device is out of media.
   */
  public static final PrinterStateReason MEDIA_EMPTY =
    new PrinterStateReason(18);

  /**
   * One or more output trays are missing in the printer device.
   */
  public static final PrinterStateReason OUTPUT_TRAY_MISSING =
    new PrinterStateReason(19);

  /**
   * One or more output areas of the printer device are almost full.
   */
  public static final PrinterStateReason OUTPUT_AREA_ALMOST_FULL =
    new PrinterStateReason(20);

  /**
   * One or more output areas of the printer device are full.
   */
  public static final PrinterStateReason OUTPUT_AREA_FULL =
    new PrinterStateReason(21);

  /**
   * The printer device is low on marker supply.
   */
  public static final PrinterStateReason MARKER_SUPPLY_LOW =
    new PrinterStateReason(22);

  /**
   * The printer device is out of marker supply.
   */
  public static final PrinterStateReason MARKER_SUPPLY_EMPTY =
    new PrinterStateReason(23);

  /**
   * The marker waste bin of the printer device is almost full.
   */
  public static final PrinterStateReason MARKER_WASTE_ALMOST_FULL =
    new PrinterStateReason(24);

  /**
   * The marker waste bin of the printer device is full.
   */
  public static final PrinterStateReason MARKER_WASTE_FULL =
    new PrinterStateReason(25);

  /**
   * The fuser of the printer device is over temperature.
   */
  public static final PrinterStateReason FUSER_OVER_TEMP =
    new PrinterStateReason(26);

  /**
   * The fuser of the printer device is under the needed temperature.
   */
  public static final PrinterStateReason FUSER_UNDER_TEMP =
    new PrinterStateReason(27);

  /**
   * The optical photo conductor is near its end of life (EOL).
   */
  public static final PrinterStateReason OPC_NEAR_EOL =
    new PrinterStateReason(28);

  /**
   * The optical photo conductor has reached its end of life.
   */
  public static final PrinterStateReason OPC_LIFE_OVER =
    new PrinterStateReason(29);

  /**
   * The printer device is low on developer.
   */
  public static final PrinterStateReason DEVELOPER_LOW =
    new PrinterStateReason(30);

  /**
   * The printer device is out of developer.
   */
  public static final PrinterStateReason DEVELOPER_EMPTY =
    new PrinterStateReason(31);

  /**
   * An interpreter resource (e.g. font) is unavailable.
   */
  public static final PrinterStateReason INTERPRETER_RESOURCE_UNAVAILABLE =
    new PrinterStateReason(32);

  private static final String[] stringTable =
    { "other", "media-needed",  "media-jam", "moving-to-paused", "paused",
    "shutdown", "connecting-to-device", "timed-out", "stopping",
    "stopped-partly", "toner-low", "toner-empty", "spool-area-full",
    "cover-open", "interlock-open", "door-open", "input-tray-missing",
    "media-low", "media-empty", "output-tray-missing", "output-area-almost-full",
    "output-area-full", "marker-supply-low", "marker-supply-empty",
    "marker-waste-almost-full", "marker-waste-full", "fuser-over-temp",
    "fuser-under-temp", "opc-near-eol", "opc-life-over", "developer-low",
    "developer-empty", "interpreter-resource-unavailable" };

  private static final PrinterStateReason[] enumValueTable =
    { OTHER, MEDIA_NEEDED, MEDIA_JAM, MOVING_TO_PAUSED, PAUSED, SHUTDOWN,
    CONNECTING_TO_DEVICE, TIMED_OUT, STOPPING, STOPPED_PARTLY, TONER_LOW,
    TONER_EMPTY, SPOOL_AREA_FULL, COVER_OPEN, INTERLOCK_OPEN, DOOR_OPEN,
    INPUT_TRAY_MISSING, MEDIA_LOW, MEDIA_EMPTY, OUTPUT_TRAY_MISSING,
    OUTPUT_AREA_ALMOST_FULL, OUTPUT_AREA_FULL, MARKER_SUPPLY_LOW,
    MARKER_SUPPLY_EMPTY, MARKER_WASTE_ALMOST_FULL, MARKER_WASTE_FULL,
    FUSER_OVER_TEMP, FUSER_UNDER_TEMP, OPC_NEAR_EOL, OPC_LIFE_OVER,
    DEVELOPER_LOW, DEVELOPER_EMPTY, INTERPRETER_RESOURCE_UNAVAILABLE };

  /**
   * Constructs a <code>PrinterStateReason</code> object.
   *
   * @param value the enum value.
   */
  protected PrinterStateReason(int value)
  {
    super(value);
  }

  /**
   * Returns category of this class.
   *
   * @return The class <code>PrintStateReason</code> itself.
   */
  public Class< ? extends Attribute> getCategory()
  {
    return PrinterStateReason.class;
  }

  /**
   * Returns the name of this attribute.
   *
   * @return The name "printer-state-reason".
   */
  public final String getName()
  {
    return "printer-state-reason";
  }

  /**
   * Returns a table with the enumeration values represented as strings
   * for this object.
   *
   * @return The enumeration values as strings.
   */
  protected String[] getStringTable()
  {
    return stringTable;
  }

  /**
   * Returns a table with the enumeration values for this object.
   *
   * @return The enumeration values.
   */
  protected EnumSyntax[] getEnumValueTable()
  {
    return enumValueTable;
  }
}