summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/javax/print/attribute/standard/Severity.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/javax/print/attribute/standard/Severity.java')
-rw-r--r--libjava/classpath/javax/print/attribute/standard/Severity.java60
1 files changed, 56 insertions, 4 deletions
diff --git a/libjava/classpath/javax/print/attribute/standard/Severity.java b/libjava/classpath/javax/print/attribute/standard/Severity.java
index c34ed3e29fa..5569816de8e 100644
--- a/libjava/classpath/javax/print/attribute/standard/Severity.java
+++ b/libjava/classpath/javax/print/attribute/standard/Severity.java
@@ -1,5 +1,5 @@
/* Severity.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,19 +42,50 @@ import javax.print.attribute.EnumSyntax;
/**
+ * The <code>Severity</code> printing attribute specifies the severity
+ * for a <code>PrinterStateReason</code> attribute.
+ * <p>
+ * This attribute does not appear in the attribute set of a print service
+ * itself. Its used inside the <code>PrinterStateReasons</code>
+ * attribute which contains <code>PrinterStateReason</code> objects which
+ * informs about the print service's status.
+ * </p>
+ * <p>
+ * <b>IPP Compatibility:</b> Severity is not an IPP attribute on its own
+ * but used in the PrinterStateReason attribute to indicate the severity.
+ * </p>
+ *
* @author Michael Koch (konqueror@gmx.de)
+ * @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class Severity extends EnumSyntax
implements Attribute
{
private static final long serialVersionUID = 8781881462717925380L;
+ /**
+ * Indicates that the reason is a report.
+ */
public static final Severity REPORT = new Severity(0);
+
+ /**
+ * Indicates that the reason is a warning.
+ */
public static final Severity WARNING = new Severity(1);
+
+ /**
+ * Indicates that the reason is an error.
+ */
public static final Severity ERROR = new Severity(2);
+ private static final String[] stringTable = { "report", "warning", "error" };
+
+ private static final Severity[] enumValueTable = { REPORT, WARNING, ERROR };
+
/**
* Constructs a <code>Severity</code> object.
+ *
+ * @param value the enum value.
*/
protected Severity(int value)
{
@@ -64,7 +95,7 @@ public final class Severity extends EnumSyntax
/**
* Returns category of this class.
*
- * @return the class <code>Severity</code> itself
+ * @return The class <code>Severity</code> itself.
*/
public Class getCategory()
{
@@ -72,12 +103,33 @@ public final class Severity extends EnumSyntax
}
/**
- * Returns name of this class.
+ * Returns the name of this attribute.
*
- * @return the string "severity"
+ * @return The name "severity".
*/
public String getName()
{
return "severity";
}
+
+ /**
+ * Returns a table with the enumeration values represented as strings
+ * for this object.
+ *
+ * @return The enumeration values as strings.
+ */
+ protected String[] getStringTable()
+ {
+ return stringTable;
+ }
+
+ /**
+ * Returns a table with the enumeration values for this object.
+ *
+ * @return The enumeration values.
+ */
+ protected EnumSyntax[] getEnumValueTable()
+ {
+ return enumValueTable;
+ }
}
OpenPOWER on IntegriCloud