public class CupsPrinter extends Object
| Constructor and Description |
|---|
CupsPrinter(URL printerURL,
String printerName,
boolean isDefault)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
Get description attribute for this printer
|
List<PrintJobAttributes> |
getJobs(WhichJobsEnum whichJobs,
String user,
boolean myJobs)
Get a list of jobs
|
JobStateEnum |
getJobStatus(int jobID)
Get current status for the print job with the given ID.
|
JobStateEnum |
getJobStatus(String userName,
int jobID)
Get current status for the print job with the given ID
|
String |
getLocation()
Get location attribute for this printer
|
String |
getName()
Get name of this printer.
|
URL |
getPrinterURL()
Get the URL for this printer
|
boolean |
isDefault()
Is this the default printer
|
PrintRequestResult |
print(PrintJob printJob)
Print method
|
protected void |
setDefault(boolean isDefault) |
void |
setDescription(String description) |
void |
setLocation(String location) |
String |
toString()
Get a String representation of this printer consisting of the printer URL
and the name
|
public PrintRequestResult print(PrintJob printJob) throws Exception
printJob - Exceptionpublic List<PrintJobAttributes> getJobs(WhichJobsEnum whichJobs, String user, boolean myJobs) throws Exception
whichJobs - completed, not completed or alluser - requesting user (null will be translated to anonymous)myJobs - boolean only jobs for requesting user or all jobs for this
printer?Exceptionpublic JobStateEnum getJobStatus(int jobID) throws Exception
jobID - Exceptionpublic JobStateEnum getJobStatus(String userName, int jobID) throws Exception
userName - jobID - Exceptionpublic URL getPrinterURL()
public boolean isDefault()
protected void setDefault(boolean isDefault)
public String toString()
public String getName()
For a printer http://localhost:631/printers/printername 'printername' will be returned.
public String getLocation()
public void setLocation(String location)
public String getDescription()
public void setDescription(String description)
Copyright © 2016. All rights reserved.