1 /*
2 * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
26
27 import java.util.Locale;
28
29 import javax.print.attribute.Attribute;
30 import javax.print.attribute.TextSyntax;
31 import javax.print.attribute.PrintJobAttribute;
32
33 /**
34 * Class OutputDeviceAssigned is a printing attribute class, a text attribute,
35 * that identifies the output device to which the service has assigned this
36 * job. If an output device implements an embedded Print Service instance, the
37 * printer need not set this attribute. If a print server implements a
38 * Print Service instance, the value may be empty (zero- length string) or not
39 * returned until the service assigns an output device to the job. This
40 * attribute is particularly useful when a single service supports multiple
41 * devices (so called "fan-out").
42 * <P>
43 * <B>IPP Compatibility:</B> The string value gives the IPP name value. The
44 * locale gives the IPP natural language. The category name returned by
45 * <CODE>getName()</CODE> gives the IPP attribute name.
46 * <P>
47 *
48 * @author Alan Kaminsky
49 */
50 public final class OutputDeviceAssigned extends TextSyntax
51 implements PrintJobAttribute {
52
53 private static final long serialVersionUID = 5486733778854271081L;
54
55 /**
56 * Constructs a new output device assigned attribute with the given device
57 * name and locale.
58 *
59 * @param deviceName Device name.
60 * @param locale Natural language of the text string. null
61 * is interpreted to mean the default locale as returned
62 * by <code>Locale.getDefault()</code>
63 *
64 * @exception NullPointerException
65 * (unchecked exception) Thrown if <CODE>deviceName</CODE> is null.
66 */
|
1 /*
2 * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
26
27 import java.util.Locale;
28
29 import javax.print.attribute.Attribute;
30 import javax.print.attribute.TextSyntax;
31 import javax.print.attribute.PrintJobAttribute;
32
33 /**
34 * Class OutputDeviceAssigned is a printing attribute class, a text attribute,
35 * that identifies the output device to which the service has assigned this
36 * job. If an output device implements an embedded Print Service instance, the
37 * printer need not set this attribute. If a print server implements a
38 * Print Service instance, the value may be empty (zero- length string) or not
39 * returned until the service assigns an output device to the job. This
40 * attribute is particularly useful when a single service supports multiple
41 * devices (so called "fan-out").
42 * <P>
43 * <B>IPP Compatibility:</B> The string value gives the IPP name value. The
44 * locale gives the IPP natural language. The category name returned by
45 * <CODE>getName()</CODE> gives the IPP attribute name.
46 *
47 * @author Alan Kaminsky
48 */
49 public final class OutputDeviceAssigned extends TextSyntax
50 implements PrintJobAttribute {
51
52 private static final long serialVersionUID = 5486733778854271081L;
53
54 /**
55 * Constructs a new output device assigned attribute with the given device
56 * name and locale.
57 *
58 * @param deviceName Device name.
59 * @param locale Natural language of the text string. null
60 * is interpreted to mean the default locale as returned
61 * by <code>Locale.getDefault()</code>
62 *
63 * @exception NullPointerException
64 * (unchecked exception) Thrown if <CODE>deviceName</CODE> is null.
65 */
|