Determines the printing attribute values a client can specify in
the given category when setting up a job for this print service. A
printing
attribute value is an instance of a class that implements interface
Attribute
.
If flavor
is null and attributes
is null
or is an empty set, this method returns all the printing attribute
values this Print Service supports for any possible job. If
flavor
is not null or attributes
is not
an empty set, this method returns just the printing attribute values
that are compatible with the given doc flavor and/or set of attributes.
That is, a null return value may indicate that specifying this attribute
is incompatible with the specified DocFlavor.
Also if DocFlavor is not null it must be a flavor supported by this
PrintService, else IllegalArgumentException will be thrown.
If the attributes
parameter contains an Attribute whose
category is the same as the category
parameter, the service
must ignore this attribute in the AttributeSet.
DocAttribute
s which are to be specified on the
Doc
must be included in this set to accurately
represent the context.
This method returns an Object because different printing attribute
categories indicate the supported attribute values in different ways.
The documentation for each printing attribute in package javax.print.attribute.standard
describes how each attribute indicates its supported values. Possible
ways of indicating support include:
-
Return a single instance of the attribute category to indicate that any
value is legal -- used, for example, by an attribute whose value is an
arbitrary text string. (The value of the returned attribute object is
irrelevant.)
-
Return an array of one or more instances of the attribute category,
containing the legal values -- used, for example, by an attribute with
a list of enumerated values. The type of the array is an array of the
specified attribute category type as returned by its
getCategory(Class)
.
-
Return a single object (of some class other than the attribute category)
that indicates bounds on the legal values -- used, for example, by an
integer-valued attribute that must lie within a certain range.
Returns:
Object indicating supported values for category
,
or null if this Print Service does not support specifying a
doc-level or job-level attribute in category
in
a Print Request.
Parameters:
- category - Printing attribute category to test. It must be a
{@link java.lang.Class Class} that implements
interface {@link
javax.print.attribute.Attribute Attribute}.
- flavor - Doc flavor for a supposed job, or null.
- attributes - Set of printing attributes for a supposed job
(both job-level attributes and document-level
attributes), or null.
Throws:
- NullPointerException - (unchecked exception) Thrown if category
is null.
- IllegalArgumentException - (unchecked exception) Thrown if category
is not a
{@link java.lang.Class Class} that implements interface {@link
javax.print.attribute.Attribute Attribute}, or
DocFlavor
is not supported by this service.