JobStateReason.java revision 0
0N/A * Copyright 2000-2004 Sun Microsystems, Inc. All Rights Reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. Sun designates this 0N/A * particular file as subject to the "Classpath" exception as provided 0N/A * by Sun in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A * CA 95054 USA or visit www.sun.com if you need additional information or 0N/A * have any questions. 0N/A * Class JobStateReason is a printing attribute class, an enumeration, that 0N/A * provides additional information about the job's current state, i.e., 0N/A * information that augments the value of the job's {@link JobState JobState} 0N/A * attribute. Class JobStateReason defines standard job state reason values. A 0N/A * Print Service implementation only needs to report those job state 0N/A * reasons which are appropriate for the particular implementation; it does not 0N/A * have to report every defined job state reason. 0N/A * Instances of JobStateReason do not appear in a Print Job's attribute set 0N/A * directly. Rather, a {@link JobStateReasons JobStateReasons} attribute appears 0N/A * in the Print Job's attribute set. The {@link JobStateReasons JobStateReasons} 0N/A * attribute contains zero, one, or more than one JobStateReason objects which 0N/A * pertain to the Print Job's status. The printer adds a JobStateReason object 0N/A * to the Print Job's {@link JobStateReasons JobStateReasons} attribute when the 0N/A * corresponding condition becomes true of the Print Job, and the printer 0N/A * removes the JobStateReason object again when the corresponding condition 0N/A * becomes false, regardless of whether the Print Job's overall {@link JobState 0N/A * JobState} also changed. 0N/A * <B>IPP Compatibility:</B> The category name returned by 0N/A * <CODE>getName()</CODE> is the IPP attribute name. The enumeration's 0N/A * integer value is the IPP enum value. The <code>toString()</code> method 0N/A * returns the IPP string representation of the attribute value. 0N/A * @author Alan Kaminsky 0N/A * The printer has created the Print Job, but the printer has not finished 0N/A * accessing or accepting all the print data yet. 0N/A * The printer has created the Print Job, but the printer is expecting 0N/A * additional print data before it can move the job into the PROCESSING 0N/A * state. If a printer starts processing before it has received all data, 0N/A * the printer removes the JOB_DATA_INSUFFICIENT reason, but the 0N/A * JOB_INCOMING reason remains. If a printer starts processing after it 0N/A * has received all data, the printer removes the JOB_DATA_INSUFFICIENT 0N/A * and JOB_INCOMING reasons at the same time. 0N/A * The Printer could not access one or more documents passed by reference 0N/A * (i.e., the print data representation object is a URL). This reason is 0N/A * intended to cover any file access problem,including file does not exist 0N/A * and access denied because of an access control problem. Whether the 0N/A * printer aborts the job and moves the job to the ABORTED job state or 0N/A * prints all documents that are accessible and moves the job to the 0N/A * COMPLETED job state and adds the COMPLETED_WITH_ERRORS reason to the 0N/A * job's {@link JobStateReasons JobStateReasons} attribute depends on 0N/A * implementation and/or site policy. This value should be supported if 0N/A * the printer supports doc flavors with URL print data representation 0N/A * The job was not completely submitted for some unforeseen reason. 0N/A * Possibilities include (1) the printer has crashed before the job was 0N/A * fully submitted by the client, (2) the printer or the document transfer 0N/A * method has crashed in some non-recoverable way before the document data 0N/A * was entirely transferred to the printer, (3) the client crashed before 0N/A * the job was fully submitted. 0N/A * The printer is transmitting the job to the output device. 0N/A * The value of the job's {@link JobHoldUntil JobHoldUntil} attribute was 0N/A * specified with a date-time that is still in the future. The job must 0N/A * not be a candidate for processing until this reason is removed and 0N/A * no other reasons to hold the job. This value should be supported if the 0N/A * {@link JobHoldUntil JobHoldUntil} job template attribute is supported. 0N/A * At least one of the resources needed by the job, such as media, fonts, 0N/A * resource objects, etc., is not ready on any of the physical printers 0N/A * for which the job is a candidate. This condition may be detected 0N/A * when the job is accepted, or subsequently while the job is pending 0N/A * or processing, depending on implementation. 0N/A * The job may remain in its current state or 0N/A * be moved to the PENDING_HELD state, depending on implementation and/or 0N/A * job scheduling policy. 0N/A * The value of the printer's {@link PrinterStateReasons 0N/A * PrinterStateReasons} attribute contains a {@link PrinterStateReason 0N/A * PrinterStateReason} value of STOPPED_PARTLY. 0N/A * The value of the printer's {@link PrinterState PrinterState} attribute 0N/A * The job is in the PROCESSING state, but more specifically, the printer 0N/A * ia interpreting the document data. 0N/A * The job is in the PROCESSING state, but more specifically, the printer 0N/A * has queued the document data. 0N/A * The job is in the PROCESSING state, but more specifically, the printer 0N/A * is interpreting document data and producing another electronic 0N/A * The job is in the PENDING_HELD, PENDING, or PROCESSING state, but more 0N/A * specifically, the printer has completed enough processing of the document 0N/A * to be able to start marking and the job is waiting for the marker. 0N/A * Systems that require human intervention to release jobs put the job into 0N/A * the PENDING_HELD job state. Systems that automatically select a job to 0N/A * use the marker put the job into the PENDING job state or keep the job 0N/A * in the PROCESSING job state while waiting for the marker, depending on 0N/A * implementation. All implementations put the job into (or back into) the 0N/A * PROCESSING state when marking does begin. 0N/A * The output device is marking media. This value is useful for printers 0N/A * which spend a great deal of time processing (1) when no marking is 0N/A * happening and then want to show that marking is now happening or (2) when 0N/A * the job is in the process of being canceled or aborted while the job 0N/A * remains in the PROCESSING state, but the marking has not yet stopped so 0N/A * that impression or sheet counts are still increasing for the job. 0N/A * The job was canceled by the owner of the job, i.e., by a user whose 0N/A * authenticated identity is the same as the value of the originating user 0N/A * that created the Print Job, or by some other authorized end-user, such as 0N/A * a member of the job owner's security group. This value should be 0N/A * The job was canceled by the operator, i.e., by a user who has been 0N/A * authenticated as having operator privileges (whether local or remote). If 0N/A * the security policy is to allow anyone to cancel anyone's job, then this 0N/A * value may be used when the job is canceled by someone other than the 0N/A * owner of the job. For such a security policy, in effect, everyone is an 0N/A * operator as far as canceling jobs is concerned. This value should be 0N/A * supported if the implementation permits canceling by someone other than 0N/A * the owner of the job. 0N/A * The job was canceled by an unidentified local user, i.e., a user at a 0N/A * console at the device. This value should be supported if the 0N/A * implementation supports canceling jobs at the console. 0N/A * The job was aborted by the system. Either the job (1) is in the process 0N/A * of being aborted, (2) has been aborted by the system and placed in the 0N/A * ABORTED state, or (3) has been aborted by the system and placed in the 0N/A * PENDING_HELD state, so that a user or operator can manually try the job 0N/A * again. This value should be supported. 0N/A * The job was aborted by the system because the printer determined while 0N/A * attempting to decompress the document's data that the compression is 0N/A * actually not among those supported by the printer. This value must be 0N/A * supported, since {@link Compression Compression} is a required doc 0N/A * description attribute. 0N/A * The job was aborted by the system because the printer encountered an 0N/A * error in the document data while decompressing it. If the printer posts 0N/A * this reason, the document data has already passed any tests that would 0N/A * have led to the UNSUPPORTED_COMPRESSION job state reason. 0N/A * The job was aborted by the system because the document data's document 0N/A * format (doc flavor) is not among those supported by the printer. If the 0N/A * client specifies a doc flavor with a MIME type of 0N/A * the printer cannot determine the document data's actual format through 0N/A * auto-sensing (even if the printer supports the document format if 0N/A * specified explicitly). This value must be supported, since a doc flavor 0N/A * is required to be specified for each doc. 0N/A * The job was aborted by the system because the printer encountered an 0N/A * error in the document data while processing it. If the printer posts this 0N/A * reason, the document data has already passed any tests that would have 0N/A * led to the UNSUPPORTED_DOCUMENT_FORMAT job state reason. 0N/A * The requester has canceled the job or the printer has aborted the job, 0N/A * but the printer is still performing some actions on the job until a 0N/A * If the implementation requires some measurable time to cancel the job in 0N/A * the PROCESSING or PROCESSING_STOPPED job states, the printer must use 0N/A * this reason to indicate that the printer is still performing some actions 0N/A * on the job while the job remains in the PROCESSING or PROCESSING_STOPPED 0N/A * state. After all the job's job description attributes have stopped 0N/A * incrementing, the printer moves the job from the PROCESSING state to the 0N/A * CANCELED or ABORTED job states. 0N/A * The printer is off-line and accepting no jobs. All PENDING jobs are put 0N/A * into the PENDING_HELD state. This situation could be true if the 0N/A * service's or document transform's input is impaired or broken. 0N/A * The job completed successfully. This value should be supported. 0N/A * The job completed with warnings. This value should be supported if the 0N/A * implementation detects warnings. 0N/A * The job completed with errors (and possibly warnings too). This value 0N/A * should be supported if the implementation detects errors. 0N/A * This job is retained and is currently able to be restarted. If 0N/A * JOB_RESTARTABLE is contained in the job's {@link JobStateReasons 0N/A * JobStateReasons} attribute, then the printer must accept a request to 0N/A * restart that job. This value should be supported if restarting jobs is 0N/A * supported. <I>[The capability for restarting jobs is not in the Java 0N/A * Print Service API at present.]</I> 0N/A * The job has been forwarded to a device or print system that is unable to 0N/A * send back status. The printer sets the job's {@link JobState JobState} 0N/A * attribute to COMPLETED and adds the QUEUED_IN_DEVICE reason to the job's 0N/A * {@link JobStateReasons JobStateReasons} attribute to indicate that the 0N/A * printer has no additional information about the job and never will have 0N/A * any better information. 0N/A * Construct a new job state reason enumeration value with the given 0N/A * @param value Integer value. 0N/A "job-data-insufficient",
0N/A "document-access-error",
0N/A "submission-interrupted",
0N/A "job-hold-until-specified",
0N/A "resources-are-not-ready",
0N/A "printer-stopped-partly",
0N/A "job-queued-for-marker",
0N/A "job-canceled-by-user",
0N/A "job-canceled-by-operator",
0N/A "job-canceled-at-device",
0N/A "aborted-by-system",
0N/A "unsupported-compression",
0N/A "compression-error",
0N/A "unsupported-document-format",
0N/A "document-format-error",
0N/A "processing-to-stop-point",
0N/A "job-completed-successfully",
0N/A "job-completed-with-warnings",
0N/A "job-completed-with-errors",
0N/A "queued-in-device"};
0N/A * Returns the string table for class JobStateReason. 0N/A * Returns the enumeration value table for class JobStateReason. 0N/A * Get the printing attribute class which is to be used as the "category" 0N/A * for this printing attribute value. 0N/A * For class JobStateReason and any vendor-defined subclasses, the 0N/A * category is class JobStateReason itself. 0N/A * @return Printing attribute class (category), an instance of class 0N/A * {@link java.lang.Class java.lang.Class}. 0N/A * Get the name of the category of which this attribute value is an 0N/A * For class JobStateReason and any vendor-defined subclasses, the 0N/A * category name is <CODE>"job-state-reason"</CODE>. 0N/A * @return Attribute category name. 0N/A return "job-state-reason";