33 * <P>
34 * Instances of Severity do not appear in a Print Service's attribute set
35 * directly. Rather, a {@link PrinterStateReasons PrinterStateReasons}
36 * attribute appears in the Print Service's attribute set.
37 * The {@link PrinterStateReasons
38 * PrinterStateReasons} attribute contains zero, one, or more than one {@link
39 * PrinterStateReason PrinterStateReason} objects which pertain to the Print
40 * Service's status, and each {@link PrinterStateReason PrinterStateReason}
41 * object is associated with a Severity level of REPORT (least severe),
42 * WARNING, or ERROR (most severe).
43 * The printer adds a {@link PrinterStateReason
44 * PrinterStateReason} object to the Print Service's
45 * {@link PrinterStateReasons PrinterStateReasons} attribute when the
46 * corresponding condition becomes true
47 * of the printer, and the printer removes the {@link PrinterStateReason
48 * PrinterStateReason} object again when the corresponding condition becomes
49 * false, regardless of whether the Print Service's overall
50 * {@link PrinterState PrinterState} also changed.
51 * <P>
52 * <B>IPP Compatibility:</B>
53 * <code>Severity.toString()</code> returns either "error", "warning", or
54 * "report". The string values returned by
55 * each individual {@link PrinterStateReason} and
56 * associated {@link Severity} object's <CODE>toString()</CODE>
57 * methods, concatenated together with a hyphen (<CODE>"-"</CODE>) in
58 * between, gives the IPP keyword value for a {@link PrinterStateReasons}.
59 * The category name returned by <CODE>getName()</CODE> gives the IPP
60 * attribute name.
61 *
62 * @author Alan Kaminsky
63 */
64 public final class Severity extends EnumSyntax implements Attribute {
65
66 private static final long serialVersionUID = 8781881462717925380L;
67
68 /**
69 * Indicates that the {@link PrinterStateReason PrinterStateReason} is a
70 * "report" (least severe). An implementation may choose to omit some or
71 * all reports.
72 * Some reports specify finer granularity about the printer state;
73 * others serve as a precursor to a warning. A report must contain nothing
74 * that could affect the printed output.
75 */
76 public static final Severity REPORT = new Severity (0);
77
78 /**
79 * Indicates that the {@link PrinterStateReason PrinterStateReason} is a
129 }
130
131
132 /**
133 * Get the printing attribute class which is to be used as the "category"
134 * for this printing attribute value.
135 * <P>
136 * For class Severity, the category is class Severity itself.
137 *
138 * @return Printing attribute class (category), an instance of class
139 * {@link java.lang.Class java.lang.Class}.
140 */
141 public final Class<? extends Attribute> getCategory() {
142 return Severity.class;
143 }
144
145 /**
146 * Get the name of the category of which this attribute value is an
147 * instance.
148 * <P>
149 * For class Severit, the category name is <CODE>"severity"</CODE>.
150 *
151 * @return Attribute category name.
152 */
153 public final String getName() {
154 return "severity";
155 }
156
157 }
|
33 * <P>
34 * Instances of Severity do not appear in a Print Service's attribute set
35 * directly. Rather, a {@link PrinterStateReasons PrinterStateReasons}
36 * attribute appears in the Print Service's attribute set.
37 * The {@link PrinterStateReasons
38 * PrinterStateReasons} attribute contains zero, one, or more than one {@link
39 * PrinterStateReason PrinterStateReason} objects which pertain to the Print
40 * Service's status, and each {@link PrinterStateReason PrinterStateReason}
41 * object is associated with a Severity level of REPORT (least severe),
42 * WARNING, or ERROR (most severe).
43 * The printer adds a {@link PrinterStateReason
44 * PrinterStateReason} object to the Print Service's
45 * {@link PrinterStateReasons PrinterStateReasons} attribute when the
46 * corresponding condition becomes true
47 * of the printer, and the printer removes the {@link PrinterStateReason
48 * PrinterStateReason} object again when the corresponding condition becomes
49 * false, regardless of whether the Print Service's overall
50 * {@link PrinterState PrinterState} also changed.
51 * <P>
52 * <B>IPP Compatibility:</B>
53 * {@code Severity.toString()} returns either "error", "warning", or
54 * "report". The string values returned by
55 * each individual {@link PrinterStateReason} and
56 * associated {@link Severity} object's {@code toString()}
57 * methods, concatenated together with a hyphen ({@code "-"}) in
58 * between, gives the IPP keyword value for a {@link PrinterStateReasons}.
59 * The category name returned by {@code getName()} gives the IPP
60 * attribute name.
61 *
62 * @author Alan Kaminsky
63 */
64 public final class Severity extends EnumSyntax implements Attribute {
65
66 private static final long serialVersionUID = 8781881462717925380L;
67
68 /**
69 * Indicates that the {@link PrinterStateReason PrinterStateReason} is a
70 * "report" (least severe). An implementation may choose to omit some or
71 * all reports.
72 * Some reports specify finer granularity about the printer state;
73 * others serve as a precursor to a warning. A report must contain nothing
74 * that could affect the printed output.
75 */
76 public static final Severity REPORT = new Severity (0);
77
78 /**
79 * Indicates that the {@link PrinterStateReason PrinterStateReason} is a
129 }
130
131
132 /**
133 * Get the printing attribute class which is to be used as the "category"
134 * for this printing attribute value.
135 * <P>
136 * For class Severity, the category is class Severity itself.
137 *
138 * @return Printing attribute class (category), an instance of class
139 * {@link java.lang.Class java.lang.Class}.
140 */
141 public final Class<? extends Attribute> getCategory() {
142 return Severity.class;
143 }
144
145 /**
146 * Get the name of the category of which this attribute value is an
147 * instance.
148 * <P>
149 * For class Severit, the category name is {@code "severity"}.
150 *
151 * @return Attribute category name.
152 */
153 public final String getName() {
154 return "severity";
155 }
156
157 }
|