- java.lang.Object
-
- javax.print.attribute.EnumSyntax
-
- javax.print.attribute.standard.Severity
-
- All Implemented Interfaces:
Serializable,Cloneable,Attribute
public final class Severity extends EnumSyntax implements Attribute
ClassSeverityis a printing attribute class, an enumeration, that denotes the severity of aPrinterStateReasonattribute.Instances of
Severitydo not appear in a Print Service's attribute set directly. Rather, aPrinterStateReasonsattribute appears in the Print Service's attribute set. ThePrinterStateReasonsattribute contains zero, one, or more than onePrinterStateReasonobjects which pertain to the Print Service's status, and eachPrinterStateReasonobject is associated with a Severity level ofREPORT(least severe),WARNING, orERROR(most severe). The printer adds aPrinterStateReasonobject to the Print Service'sPrinterStateReasonsattribute when the corresponding condition becomes true of the printer, and the printer removes thePrinterStateReasonobject again when the corresponding condition becomes false, regardless of whether the Print Service's overallPrinterStatealso changed.IPP Compatibility:
Severity.toString()returns either "error", "warning", or "report". The string values returned by each individualPrinterStateReasonand associatedSeverityobject'stoString()methods, concatenated together with a hyphen ("-") in between, gives the IPP keyword value for aPrinterStateReasons. The category name returned bygetName()gives the IPP attribute name.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static SeverityERRORIndicates that thePrinterStateReasonis an "error" (most severe).static SeverityREPORTIndicates that thePrinterStateReasonis a "report" (least severe).static SeverityWARNINGIndicates that thePrinterStateReasonis a "warning."
-
Constructor Summary
Constructors Modifier Constructor Description protectedSeverity(int value)Construct a new severity enumeration value with the given integer value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<? extends Attribute>getCategory()Get the printing attribute class which is to be used as the "category" for this printing attribute value.protected EnumSyntax[]getEnumValueTable()Returns the enumeration value table for classSeverity.StringgetName()Get the name of the category of which this attribute value is an instance.protected String[]getStringTable()Returns the string table for classSeverity.-
Methods declared in class javax.print.attribute.EnumSyntax
clone, getOffset, getValue, hashCode, readResolve, toString
-
-
-
-
Field Detail
-
REPORT
public static final Severity REPORT
Indicates that thePrinterStateReasonis a "report" (least severe). An implementation may choose to omit some or all reports. Some reports specify finer granularity about the printer state; others serve as a precursor to a warning. A report must contain nothing that could affect the printed output.
-
WARNING
public static final Severity WARNING
Indicates that thePrinterStateReasonis a "warning." An implementation may choose to omit some or all warnings. Warnings serve as a precursor to an error. A warning must contain nothing that prevents a job from completing, though in some cases the output may be of lower quality.
-
ERROR
public static final Severity ERROR
Indicates that thePrinterStateReasonis an "error" (most severe). An implementation must include all errors. If this attribute contains one or more errors, the printer'sPrinterStatemust beSTOPPED.
-
-
Method Detail
-
getStringTable
protected String[] getStringTable()
Returns the string table for classSeverity.- Overrides:
getStringTablein classEnumSyntax- Returns:
- the string table
-
getEnumValueTable
protected EnumSyntax[] getEnumValueTable()
Returns the enumeration value table for classSeverity.- Overrides:
getEnumValueTablein classEnumSyntax- Returns:
- the value table
-
getCategory
public final Class<? extends Attribute> getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.For class
Severity, the category is classSeverityitself.- Specified by:
getCategoryin interfaceAttribute- Returns:
- printing attribute class (category), an instance of class
java.lang.Class
-
-