< prev index next >

src/java.desktop/share/classes/javax/print/attribute/standard/PrinterStateReason.java

Print this page




  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()</CODE>
  60  * methods, concatenated together with a hyphen (<CODE>"-"</CODE>) in
  61  * between, gives the IPP keyword value for a {@link PrinterStateReasons}.
  62  * The category name returned by <CODE>getName()</CODE> 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     /**


 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"</CODE>.
 436      *
 437      * @return  Attribute category name.
 438      */
 439     public final String getName() {
 440         return "printer-state-reason";
 441     }
 442 
 443 }


  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     /**


 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 }
< prev index next >