2 * Copyright (C) 2003 <a href="http://www.lohndirekt.de/">lohndirekt.de</a>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 package de
.lohndirekt
.print
;
20 import java
.io
.IOException
;
22 import java
.util
.ArrayList
;
23 import java
.util
.Arrays
;
24 import java
.util
.HashSet
;
25 import java
.util
.Iterator
;
26 import java
.util
.List
;
27 import java
.util
.Locale
;
30 import java
.util
.logging
.Level
;
31 import java
.util
.logging
.Logger
;
33 import javax
.print
.DocFlavor
;
34 import javax
.print
.DocPrintJob
;
35 import javax
.print
.PrintException
;
36 import javax
.print
.PrintService
;
37 import javax
.print
.ServiceUIFactory
;
38 import javax
.print
.attribute
.*;
39 import javax
.print
.attribute
.standard
.PrinterURI
;
40 import javax
.print
.attribute
.standard
.RequestingUserName
;
41 import javax
.print
.event
.PrintServiceAttributeListener
;
43 import de
.lohndirekt
.print
.attribute
.IppAttributeName
;
44 import de
.lohndirekt
.print
.attribute
.IppStatus
;
45 import de
.lohndirekt
.print
.attribute
.auth
.RequestingUserPassword
;
46 import de
.lohndirekt
.print
.attribute
.ipp
.DocumentFormat
;
47 import de
.lohndirekt
.print
.attribute
.ipp
.jobdesc
.JobId
;
48 import de
.lohndirekt
.print
.attribute
.ipp
.printerdesc
.supported
.DocumentFormatSupported
;
49 import de
.lohndirekt
.print
.attribute
.ipp
.printerdesc
.supported
.OperationsSupported
;
56 public class IppPrintService
implements PrintService
{
58 private final Logger log
= Logger
.getLogger(this.getClass().getName());
59 private DocFlavor
[] supportedFlavors
= null;
61 private RequestingUserName requestingUserName
= null;
62 private RequestingUserPassword requestingUserPassword
= null;
63 private Map attributes
= null;
68 public IppPrintService(URI uri
) {
82 * @see javax.print.PrintService#getName()
84 public String
getName() {
85 return uri
.getPath().substring(uri
.getPath().lastIndexOf("/") + 1);
92 supportedFlavors
= null;
97 * @see javax.print.PrintService#createPrintJob()
99 public DocPrintJob
createPrintJob() {
100 return new CancelableJob(this);
104 * @see javax.print.PrintService#getAttributes()
106 public PrintServiceAttributeSet
getAttributes() {
107 PrintServiceAttributeSet set
= new HashPrintServiceAttributeSet();
108 for (Iterator mapIter
= getAllAttributes().values().iterator(); mapIter
.hasNext();) {
109 Set values
= (Set
) mapIter
.next();
110 for (Iterator listIter
= values
.iterator(); listIter
.hasNext();) {
111 Attribute attribute
= (Attribute
) listIter
.next();
112 if (attribute
instanceof PrintServiceAttribute
) {
121 * @see javax.print.PrintService#getAttribute(java.lang.Class)
123 public PrintServiceAttribute
getAttribute(Class category
) {
124 if (category
== null) {
125 throw new NullPointerException("category must not be null");
127 //TODO As CUPS seems not to support this operation-tag (requested-attributes), we need to get all attributes
128 Set attributes
= (Set
) getAllAttributes().get(category
);
129 if (attributes
!= null) {
131 return (PrintServiceAttribute
) attributes
.iterator().next();
132 } catch (ClassCastException e
) {
133 throw new IllegalArgumentException("category must be a Class that implements interface PrintServiceAttribute");
140 * @see javax.print.PrintService#getSupportedDocFlavors()
142 public DocFlavor
[] getSupportedDocFlavors() {
143 if (supportedFlavors
== null) {
144 List flavors
= new ArrayList();
145 Set flavorAttributes
=
146 (Set
) getAllAttributes().get(IppAttributeName
.DOCUMENT_FORMAT_SUPORTED
.getCategory());
147 if (flavorAttributes
!= null) {
148 for (Iterator iter
= flavorAttributes
.iterator(); iter
.hasNext();) {
149 Attribute attribute
= (Attribute
) iter
.next();
150 String mimeType
= ((DocumentFormatSupported
) attribute
).getValue();
151 if (mimeType
.equals(DocFlavor
.BYTE_ARRAY
.AUTOSENSE
.getMimeType())) {
152 flavors
.add(DocFlavor
.INPUT_STREAM
.AUTOSENSE
);
153 } else if (mimeType
.equals(DocFlavor
.BYTE_ARRAY
.GIF
.getMimeType())) {
154 flavors
.add(DocFlavor
.INPUT_STREAM
.GIF
);
155 } else if (mimeType
.equals(DocFlavor
.BYTE_ARRAY
.JPEG
.getMimeType())) {
156 flavors
.add(DocFlavor
.INPUT_STREAM
.JPEG
);
157 } else if (mimeType
.equals(DocFlavor
.BYTE_ARRAY
.PCL
.getMimeType())) {
158 flavors
.add(DocFlavor
.INPUT_STREAM
.PCL
);
159 } else if (mimeType
.equals(DocFlavor
.BYTE_ARRAY
.PDF
.getMimeType())) {
160 flavors
.add(DocFlavor
.INPUT_STREAM
.PDF
);
161 } else if (mimeType
.equals(DocFlavor
.BYTE_ARRAY
.POSTSCRIPT
.getMimeType())) {
162 flavors
.add(DocFlavor
.INPUT_STREAM
.POSTSCRIPT
);
163 } else if (mimeType
.equals(DocFlavor
.BYTE_ARRAY
.PNG
.getMimeType())) {
164 flavors
.add(DocFlavor
.INPUT_STREAM
.PNG
);
165 } else if (mimeType
.equals(DocFlavor
.BYTE_ARRAY
.TEXT_HTML_HOST
.getMimeType().substring(0, 9))) {
166 flavors
.add(DocFlavor
.INPUT_STREAM
.TEXT_HTML_HOST
);
167 } else if (mimeType
.equals(DocFlavor
.BYTE_ARRAY
.TEXT_PLAIN_HOST
.getMimeType().substring(0, 10))) {
168 flavors
.add(DocFlavor
.INPUT_STREAM
.TEXT_PLAIN_HOST
);
172 DocFlavor
[] flavorArray
= new DocFlavor
[flavors
.size()];
173 flavorArray
= (DocFlavor
[]) flavors
.toArray(flavorArray
);
174 supportedFlavors
= flavorArray
;
176 return supportedFlavors
;
180 * @see javax.print.PrintService#isDocFlavorSupported(javax.print.DocFlavor)
182 public boolean isDocFlavorSupported(DocFlavor flavor
) {
183 List supportedFlavors
= Arrays
.asList(getSupportedDocFlavors());
184 return supportedFlavors
.contains(flavor
);
188 * @see javax.print.PrintService#getSupportedAttributeCategories()
190 public Class
[] getSupportedAttributeCategories() {
191 Set supportedCategories
= new HashSet();
192 //Attributes named in 4.2 of rfc2911 are optional
193 if (getAllAttributes().containsKey(IppAttributeName
.JOB_PRIORIY_SUPPORTED
.getCategory())) {
194 supportedCategories
.add(IppAttributeName
.JOB_PRIORIY
.getCategory());
196 if (getAllAttributes().containsKey(IppAttributeName
.JOB_HOLD_UNTIL_SUPPORTED
.getCategory())) {
197 supportedCategories
.add(IppAttributeName
.JOB_HOLD_UNTIL
.getCategory());
199 if (getAllAttributes().containsKey(IppAttributeName
.JOB_SHEETS_SUPORTED
.getCategory())) {
200 supportedCategories
.add(IppAttributeName
.JOB_SHEETS
.getCategory());
202 if (getAllAttributes().containsKey(IppAttributeName
.MULTIPLE_DOCUMENT_HANDLING_SUPPORTED
.getCategory())) {
203 supportedCategories
.add(IppAttributeName
.MULTIPLE_DOCUMENT_HANDLING
.getCategory());
205 if (getAllAttributes().containsKey(IppAttributeName
.COPIES_SUPPORTED
.getCategory())) {
206 supportedCategories
.add(IppAttributeName
.COPIES
.getCategory());
208 if (getAllAttributes().containsKey(IppAttributeName
.FINISHINGS_SUPPORTED
.getCategory())) {
209 supportedCategories
.add(IppAttributeName
.FINISHINGS
.getCategory());
211 if (getAllAttributes().containsKey(IppAttributeName
.PAGE_RANGES_SUPPORTED
.getCategory())) {
212 supportedCategories
.add(IppAttributeName
.PAGE_RANGES
.getCategory());
214 if (getAllAttributes().containsKey(IppAttributeName
.SIDES_SUPPORTED
.getCategory())) {
215 supportedCategories
.add(IppAttributeName
.SIDES
.getCategory());
217 if (getAllAttributes().containsKey(IppAttributeName
.NUMBER_UP_SUPPORTED
.getCategory())) {
218 supportedCategories
.add(IppAttributeName
.NUMBER_UP
.getCategory());
220 if (getAllAttributes().containsKey(IppAttributeName
.ORIENTATION_REQUESTED_SUPPORTED
.getCategory())) {
221 supportedCategories
.add(IppAttributeName
.ORIENTATION_REQUESTED
.getCategory());
223 if (getAllAttributes().containsKey(IppAttributeName
.MEDIA_SUPPORTED
.getCategory())) {
224 supportedCategories
.add(IppAttributeName
.MEDIA
.getCategory());
226 if (getAllAttributes().containsKey(IppAttributeName
.PRINTER_RESOLUTION
.getCategory())) {
227 //printer-resolution-supported attribute currently not implemented
229 if (getAllAttributes().containsKey(IppAttributeName
.PRINT_QUALITY
.getCategory())) {
230 //print-quality-supported attribute currently not implemented
232 if (getAllAttributes().containsKey(IppAttributeName
.JOB_K_OCTETS_SUPPORTED
.getCategory())) {
233 supportedCategories
.add(IppAttributeName
.JOB_K_OCTETS
.getCategory());
235 if (getAllAttributes().containsKey(IppAttributeName
.JOB_IMPRESSIONS_SUPPORTED
.getCategory())) {
236 supportedCategories
.add(IppAttributeName
.JOB_IMPRESSIONS
.getCategory());
238 if (getAllAttributes().containsKey(IppAttributeName
.JOB_MEDIA_SHEETS_SUPPORTED
.getCategory())) {
239 supportedCategories
.add(IppAttributeName
.JOB_MEDIA_SHEETS
.getCategory());
241 //Printer object MUST support compression attribute
242 supportedCategories
.add(IppAttributeName
.COMPRESSION
.getCategory());
243 Class
[] categories
= new Class
[supportedCategories
.size()];
244 categories
= (Class
[]) supportedCategories
.toArray(categories
);
249 * @see javax.print.PrintService#isAttributeCategorySupported(java.lang.Class)
251 public boolean isAttributeCategorySupported(Class category
) {
252 return Arrays
.asList(this.getSupportedAttributeCategories()).contains(category
);
256 * @see javax.print.PrintService#getDefaultAttributeValue(java.lang.Class)
258 public Object
getDefaultAttributeValue(Class category
) {
259 //Only the attributes listed in rfc2911 4.2(Job Template Attributes) make sense here
261 if (category
.equals(IppAttributeName
.JOB_PRIORIY
.getCategory())) {
262 Attribute attr
= getAttribute(IppAttributeName
.JOB_PRIORITY_DEFAULT
.getCategory());
264 value
= new Integer(((IntegerSyntax
) attr
).getValue());
266 } else if (category
.equals(IppAttributeName
.JOB_HOLD_UNTIL
.getCategory())) {
267 Attribute attr
= getAttribute(IppAttributeName
.JOB_HOLD_UNTIL
.getCategory());
269 value
= new Integer(((TextSyntax
) attr
).getValue());
271 } else if (category
.equals(IppAttributeName
.JOB_SHEETS_DEFAULT
.getCategory())) {
272 Attribute attr
= getAttribute(IppAttributeName
.JOB_SHEETS_DEFAULT
.getCategory());
274 value
= new Integer(((TextSyntax
) attr
).getValue());
276 } else if (category
.equals(IppAttributeName
.COPIES
.getCategory())) {
277 Attribute attr
= getAttribute(IppAttributeName
.COPIES_DEFAULT
.getCategory());
279 value
= new Integer(((IntegerSyntax
) attr
).getValue());
281 } else if (category
.equals(IppAttributeName
.FINISHINGS
.getCategory())) {
282 Attribute attr
= getAttribute(IppAttributeName
.FINISHINGS_DEFAULT
.getCategory());
284 value
= new Integer(((IntegerSyntax
) attr
).toString());
286 } else if (category
.equals(IppAttributeName
.SIDES
.getCategory())) {
287 Attribute attr
= getAttribute(IppAttributeName
.SIDES_DEFAULT
.getCategory());
289 value
= new Integer(((TextSyntax
) attr
).getValue());
291 } else if (category
.equals(IppAttributeName
.NUMBER_UP
.getCategory())) {
292 Attribute attr
= getAttribute(IppAttributeName
.NUMBER_UP_DEFAULT
.getCategory());
294 value
= new Integer(((IntegerSyntax
) attr
).getValue());
296 } else if (category
.equals(IppAttributeName
.ORIENTATION_REQUESTED
.getCategory())) {
297 Attribute attr
= getAttribute(IppAttributeName
.ORIENTATION_REQUESTED_DEFAULT
.getCategory());
299 value
= ((TextSyntax
) attr
).getValue();
301 } else if (category
.equals(IppAttributeName
.MEDIA
.getCategory())) {
302 Attribute attr
= getAttribute(IppAttributeName
.MEDIA_DEFAULT
.getCategory());
304 value
= ((TextSyntax
) attr
).getValue();
306 } else if (category
.equals(IppAttributeName
.PRINTER_RESOLUTION
.getCategory())) {
307 //Cups does not support the printer-resolution-default attribute
308 } else if (category
.equals(IppAttributeName
.PRINT_QUALITY
.getCategory())) {
309 //Cups does not support the print-quality-default attribute
310 } else if (category
.equals(IppAttributeName
.MULTIPLE_DOCUMENT_HANDLING
.getCategory())) {
311 Attribute attr
= getAttribute(IppAttributeName
.MULTIPLE_DOCUMENT_HANDLING_DEFAULT
.getCategory());
313 value
= ((TextSyntax
) attr
).getValue();
320 * @see javax.print.PrintService#getSupportedAttributeValues(java.lang.Class, javax.print.DocFlavor, javax.print.attribute.AttributeSet)
322 public Object
getSupportedAttributeValues(Class category
, DocFlavor flavor
, AttributeSet attributes
) {
323 Set supportedAttributes
= new HashSet();
324 // Only the attributes listed in rfc2911 4.2(Job Template Attributes) do make sense here
325 if (category
.equals(IppAttributeName
.JOB_PRIORIY
.getCategory())) {
326 supportedAttributes
= (Set
) getAllAttributes().get(IppAttributeName
.JOB_PRIORIY_SUPPORTED
.getCategory());
327 } else if (category
.equals(IppAttributeName
.JOB_HOLD_UNTIL
.getCategory())) {
328 supportedAttributes
= (Set
) getAllAttributes().get(IppAttributeName
.JOB_HOLD_UNTIL_SUPPORTED
.getCategory());
329 } else if (category
.equals(IppAttributeName
.JOB_SHEETS
.getCategory())) {
330 supportedAttributes
= (Set
) getAllAttributes().get(IppAttributeName
.JOB_SHEETS_SUPORTED
.getCategory());
331 } else if (category
.equals(IppAttributeName
.MULTIPLE_DOCUMENT_HANDLING
.getCategory())) {
332 supportedAttributes
=
333 (Set
) getAllAttributes().get(IppAttributeName
.MULTIPLE_DOCUMENT_HANDLING_SUPPORTED
.getCategory());
334 } else if (category
.equals(IppAttributeName
.COPIES
.getCategory())) {
335 supportedAttributes
= (Set
) getAllAttributes().get(IppAttributeName
.COPIES_SUPPORTED
.getCategory());
336 } else if (category
.equals(IppAttributeName
.FINISHINGS
.getCategory())) {
337 supportedAttributes
= (Set
) getAllAttributes().get(IppAttributeName
.FINISHINGS_SUPPORTED
.getCategory());
338 } else if (category
.equals(IppAttributeName
.SIDES
.getCategory())) {
339 supportedAttributes
= (Set
) getAllAttributes().get(IppAttributeName
.SIDES_SUPPORTED
.getCategory());
342 else if (category
.equals(IppAttributeName
.NUMBER_UP
.getCategory())) {
343 supportedAttributes
= (Set
) getAllAttributes().get(IppAttributeName
.NUMBER_UP_SUPPORTED
.getCategory());
344 } else if (category
.equals(IppAttributeName
.ORIENTATION_REQUESTED
.getCategory())) {
345 supportedAttributes
=
346 (Set
) getAllAttributes().get(IppAttributeName
.ORIENTATION_REQUESTED_SUPPORTED
.getCategory());
347 } else if (category
.equals(IppAttributeName
.MEDIA
.getCategory())) {
348 supportedAttributes
= (Set
) getAllAttributes().get(IppAttributeName
.MEDIA_SUPPORTED
.getCategory());
349 } else if (category
.equals(IppAttributeName
.PRINTER_RESOLUTION
)) {
350 //printer-resolution-supported attribute currently not implemented
351 } else if (category
.equals(IppAttributeName
.PRINT_QUALITY
.getCategory())) {
352 //printer-quality-supported attribute currently not implemented
353 } else if (category
.equals(IppAttributeName
.MULTIPLE_DOCUMENT_HANDLING
.getCategory())) {
354 supportedAttributes
=
355 (Set
) getAllAttributes().get(IppAttributeName
.MULTIPLE_DOCUMENT_HANDLING_SUPPORTED
.getCategory());
356 } else if (category
.equals(IppAttributeName
.JOB_IMPRESSIONS
.getCategory())) {
357 supportedAttributes
=
358 (Set
) getAllAttributes().get(IppAttributeName
.JOB_IMPRESSIONS_SUPPORTED
.getCategory());
359 } else if (category
.equals(IppAttributeName
.JOB_K_OCTETS
.getCategory())) {
360 supportedAttributes
= (Set
) getAllAttributes().get(IppAttributeName
.JOB_K_OCTETS_SUPPORTED
.getCategory());
361 } else if (category
.equals(IppAttributeName
.JOB_MEDIA_SHEETS
.getCategory())) {
362 supportedAttributes
=
363 (Set
) getAllAttributes().get(IppAttributeName
.JOB_MEDIA_SHEETS_SUPPORTED
.getCategory());
364 } else if (category
.equals(IppAttributeName
.COMPRESSION
.getCategory())) {
365 supportedAttributes
= (Set
) getAllAttributes().get(IppAttributeName
.COMPRESSION_SUPORTED
.getCategory());
367 if (supportedAttributes
== null) {
368 supportedAttributes
= new HashSet();
370 return supportedAttributes
.toArray(new Attribute
[supportedAttributes
.size()]);
374 * @see javax.print.PrintService#isAttributeValueSupported(javax.print.attribute.Attribute, javax.print.DocFlavor, javax.print.attribute.AttributeSet)
376 public boolean isAttributeValueSupported(Attribute attrVal
, DocFlavor flavor
, AttributeSet attributes
) {
377 AttributeSet operationAttributes
= new HashAttributeSet();
378 if (flavor
!= null) {
379 operationAttributes
.add(new DocumentFormat(flavor
.getMimeType(), Locale
.getDefault()));
381 IppRequest request
= this.request(OperationsSupported
.VALIDATE_JOB
);
382 if (attributes
== null) {
383 attributes
= new HashAttributeSet();
385 attributes
.add(attrVal
);
386 Object
[] attributeArray
= attributes
.toArray();
387 PrintJobAttributeSet jobAttributes
= new HashPrintJobAttributeSet();
388 for (int i
= 0; i
< attributeArray
.length
; i
++) {
389 Attribute attribute
= (Attribute
) attributeArray
[i
];
390 //attributes-charset, attributes-natural-language etc. are not set by the user
391 if (attribute
instanceof PrintRequestAttribute
&& attribute
instanceof PrintJobAttribute
) {
392 if (attribute
.getCategory().equals(IppAttributeName
.JOB_NAME
.getCategory())
393 || attribute
.getCategory().equals(IppAttributeName
.FIDELITY
.getCategory())
394 || attribute
.getCategory().equals(IppAttributeName
.JOB_IMPRESSIONS
.getCategory())
395 || attribute
.getCategory().equals(IppAttributeName
.JOB_K_OCTETS
.getCategory())
396 || attribute
.getCategory().equals(IppAttributeName
.JOB_MEDIA_SHEETS
.getCategory())) {
397 operationAttributes
.add(attribute
);
399 attribute
.getCategory().equals(IppAttributeName
.JOB_NAME
.getCategory())
400 || attribute
.getCategory().equals(IppAttributeName
.FIDELITY
.getCategory())) {
401 //do nothing, Job Template Attributes can not be used in a Validate-Job operation
403 jobAttributes
.add(attribute
);
407 request
.addOperationAttributes(operationAttributes
);
408 request
.setJobAttributes(jobAttributes
);
409 IppResponse response
= null;
411 response
= request
.send();
412 } catch (IOException e
) {
413 log
.log(Level
.SEVERE
, e
.getMessage(), e
);
415 boolean supported
= false;
416 if (response
!= null) {
417 if (response
.getStatus().equals(IppStatus
.SUCCESSFUL_OK
)
418 || response
.getStatus().equals(IppStatus
.SUCCESSFUL_OK_CONFLICTING_ATTRIBUTES
)
419 || response
.getStatus().equals(IppStatus
.SUCCESSFUL_OK_CONFLICTING_ATTRIBUTES
)) {
427 * @see javax.print.PrintService#getUnsupportedAttributes(javax.print.DocFlavor, javax.print.attribute.AttributeSet)
429 public AttributeSet
getUnsupportedAttributes(DocFlavor flavor
, AttributeSet attributes
) {
434 * @see javax.print.PrintService#getServiceUIFactory()
436 public ServiceUIFactory
getServiceUIFactory() {
441 * @see javax.print.PrintService#addPrintServiceAttributeListener(javax.print.event.PrintServiceAttributeListener)
443 public void addPrintServiceAttributeListener(PrintServiceAttributeListener listener
) {
447 * @see javax.print.PrintService#removePrintServiceAttributeListener(javax.print.event.PrintServiceAttributeListener)
449 public void removePrintServiceAttributeListener(PrintServiceAttributeListener listener
) {
455 private Map
getAllAttributes() {
456 if (this.attributes
== null) {
457 IppRequest request
= this.request(OperationsSupported
.GET_PRINTER_ATTRIBUTES
);
458 IppResponse response
= null;
460 response
= request
.send();
461 } catch (IOException e
) {
462 log
.log(Level
.SEVERE
, e
.getMessage(), e
);
464 if (response
!= null) {
465 this.attributes
= response
.getAttributes();
468 return this.attributes
;
471 public String
toString() {
472 return this.getName();
479 protected IppRequest
request(OperationsSupported operation
) {
480 IppRequest request
= IppRequestFactory
.createIppRequest(this.uri
, operation
, this.getRequestingUserName(), this.getRequestingUserPassword());
481 AttributeSet operationAttributes
= new HashAttributeSet();
482 operationAttributes
.add(new PrinterURI(this.uri
));
483 request
.addOperationAttributes(operationAttributes
);
488 * Returns a job with the given JobId, or null if no such
491 * Use jobExists to check for a Job with this JobId.
493 * This method might return a Job which is not hold by this PrintService
494 * but the same CUPS server
497 * @return the corresponding Job wihth the given JobId, or null if no such Job exists
498 * @throws PrintException
500 //public Methods which are not part of the JPS API
501 public DocPrintJob
getJob(JobId jobId
) throws PrintException
{
502 Job job
= Job
.getJob(this, jobId
);
508 * Check for a Job with the given JobId.
510 * This method might return true, even if the printservice does not hold any
511 * job with the given JobId, but another PrintService on the same
515 * @return true if a Job with the given JobId exists, false otherwise
516 * @throws PrintException
518 public boolean jobExists(JobId jobId
) throws PrintException
{
519 return Job
.getJob(this, jobId
) != null;
523 public RequestingUserName
getRequestingUserName() {
524 return requestingUserName
;
526 public void setRequestingUserName(RequestingUserName requestingUserName
) {
527 this.requestingUserName
= requestingUserName
;
529 public RequestingUserPassword
getRequestingUserPassword() {
530 return requestingUserPassword
;
532 public void setRequestingUserPassword(
533 RequestingUserPassword requestingUserPassword
) {
534 this.requestingUserPassword
= requestingUserPassword
;