001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package javax.print.attribute.standard;
019:
020: import javax.print.attribute.Attribute;
021: import javax.print.attribute.EnumSyntax;
022:
023: /*
024: * Table values are obtained from RFC2911: Internet Printing Protocol/1.1:
025: * Model and Semantics, section 4.3.8, http://ietf.org/rfc/rfc2911.txt?number=2911
026: */
027: public class JobStateReason extends EnumSyntax implements Attribute {
028: private static final long serialVersionUID = -8765894420449009168L;
029:
030: public static final JobStateReason JOB_INCOMING = new JobStateReason(
031: 0);
032:
033: public static final JobStateReason JOB_DATA_INSUFFICIENT = new JobStateReason(
034: 1);
035:
036: public static final JobStateReason DOCUMENT_ACCESS_ERROR = new JobStateReason(
037: 2);
038:
039: public static final JobStateReason SUBMISSION_INTERRUPTED = new JobStateReason(
040: 3);
041:
042: public static final JobStateReason JOB_OUTGOING = new JobStateReason(
043: 4);
044:
045: public static final JobStateReason JOB_HOLD_UNTIL_SPECIFIED = new JobStateReason(
046: 5);
047:
048: public static final JobStateReason RESOURCES_ARE_NOT_READY = new JobStateReason(
049: 6);
050:
051: public static final JobStateReason PRINTER_STOPPED_PARTLY = new JobStateReason(
052: 7);
053:
054: public static final JobStateReason PRINTER_STOPPED = new JobStateReason(
055: 8);
056:
057: public static final JobStateReason JOB_INTERPRETING = new JobStateReason(
058: 9);
059:
060: public static final JobStateReason JOB_QUEUED = new JobStateReason(
061: 10);
062:
063: public static final JobStateReason JOB_TRANSFORMING = new JobStateReason(
064: 11);
065:
066: public static final JobStateReason JOB_QUEUED_FOR_MARKER = new JobStateReason(
067: 12);
068:
069: public static final JobStateReason JOB_PRINTING = new JobStateReason(
070: 13);
071:
072: public static final JobStateReason JOB_CANCELED_BY_USER = new JobStateReason(
073: 14);
074:
075: public static final JobStateReason JOB_CANCELED_BY_OPERATOR = new JobStateReason(
076: 15);
077:
078: public static final JobStateReason JOB_CANCELED_AT_DEVICE = new JobStateReason(
079: 16);
080:
081: public static final JobStateReason ABORTED_BY_SYSTEM = new JobStateReason(
082: 17);
083:
084: public static final JobStateReason UNSUPPORTED_COMPRESSION = new JobStateReason(
085: 18);
086:
087: public static final JobStateReason COMPRESSION_ERROR = new JobStateReason(
088: 19);
089:
090: public static final JobStateReason UNSUPPORTED_DOCUMENT_FORMAT = new JobStateReason(
091: 20);
092:
093: public static final JobStateReason DOCUMENT_FORMAT_ERROR = new JobStateReason(
094: 21);
095:
096: public static final JobStateReason PROCESSING_TO_STOP_POINT = new JobStateReason(
097: 22);
098:
099: public static final JobStateReason SERVICE_OFF_LINE = new JobStateReason(
100: 23);
101:
102: public static final JobStateReason JOB_COMPLETED_SUCCESSFULLY = new JobStateReason(
103: 24);
104:
105: public static final JobStateReason JOB_COMPLETED_WITH_WARNINGS = new JobStateReason(
106: 25);
107:
108: public static final JobStateReason JOB_COMPLETED_WITH_ERRORS = new JobStateReason(
109: 26);
110:
111: public static final JobStateReason JOB_RESTARTABLE = new JobStateReason(
112: 27);
113:
114: public static final JobStateReason QUEUED_IN_DEVICE = new JobStateReason(
115: 28);
116:
117: private static final JobStateReason[] enumValueTable = {
118: JOB_INCOMING, JOB_DATA_INSUFFICIENT, DOCUMENT_ACCESS_ERROR,
119: SUBMISSION_INTERRUPTED, JOB_OUTGOING,
120: JOB_HOLD_UNTIL_SPECIFIED, RESOURCES_ARE_NOT_READY,
121: PRINTER_STOPPED_PARTLY, PRINTER_STOPPED, JOB_INTERPRETING,
122: JOB_QUEUED, JOB_TRANSFORMING, JOB_QUEUED_FOR_MARKER,
123: JOB_PRINTING, JOB_CANCELED_BY_USER,
124: JOB_CANCELED_BY_OPERATOR, JOB_CANCELED_AT_DEVICE,
125: ABORTED_BY_SYSTEM, UNSUPPORTED_COMPRESSION,
126: COMPRESSION_ERROR, UNSUPPORTED_DOCUMENT_FORMAT,
127: DOCUMENT_FORMAT_ERROR, PROCESSING_TO_STOP_POINT,
128: SERVICE_OFF_LINE, JOB_COMPLETED_SUCCESSFULLY,
129: JOB_COMPLETED_WITH_WARNINGS, JOB_COMPLETED_WITH_ERRORS,
130: JOB_RESTARTABLE, QUEUED_IN_DEVICE };
131:
132: private static final String[] stringTable = { "job-incoming",
133: "job-data-insufficient", "document-access-error",
134: "submission-interrupted", "job-outgoing",
135: "job-hold-until-specified", "resources-are-not-ready",
136: "printer-stopped-partly", "printer-stopped",
137: "job-interpreting", "job-queued", "job-transforming",
138: "job-queued-for-marker", "job-printing",
139: "job-canceled-by-user", "job-canceled-by-operator",
140: "job-canceled-at-device", "aborted-by-system",
141: "unsupported-compression", "compression-error",
142: "unsupported-document-format", "document-format-error",
143: "processing-to-stop-point", "service-off-line",
144: "job-completed-successfully",
145: "job-completed-with-warnings", "job-completed-with-errors",
146: "job-restartable", "queued-in-device" };
147:
148: protected JobStateReason(int value) {
149: super (value);
150: }
151:
152: @Override
153: protected EnumSyntax[] getEnumValueTable() {
154: return enumValueTable.clone();
155: }
156:
157: public final Class<? extends Attribute> getCategory() {
158: return JobStateReason.class;
159: }
160:
161: public final String getName() {
162: return "job-state-reason";
163: }
164:
165: @Override
166: protected String[] getStringTable() {
167: return stringTable.clone();
168: }
169: }
|