Oracle Secure Global Desktop Web Services API Documentation
Release 4.7

E21396-02

com.tarantella.tta.webservices.client.views
Class PrintJobsView

java.lang.Object
  extended by java.util.Observable
      extended by com.tarantella.tta.webservices.client.views.PrintJobsView
All Implemented Interfaces:
java.io.Serializable

public class PrintJobsView
extends java.util.Observable

The class maintains a view of jobs in the print queue.

See Also:
Serialized Form

Field Summary
static java.lang.String EVENT_ADD_JOB
          Name of event to add a job.
static java.lang.String EVENT_CANCEL_ALL_JOBS
          Name of event to cancel all jobs.
static java.lang.String EVENT_CANCEL_JOB
          Name of event to cancel a job.
static java.lang.String EVENT_PAUSE_QUEUE
          Name of event to pause the application's print queue.
static java.lang.String EVENT_PRINT_JOB
          Name of event to print a job.
static java.lang.String EVENT_REMOVE_JOB
          Name of event to remove a job.
static java.lang.String EVENT_RESTART_QUEUE
          Name of event to restart the application's print queue.
 
Method Summary
 void addPrintJob(java.lang.String printJobName, java.lang.String[] attributes)
          Looks-up a print job and adds it to the cache.
 java.lang.String cancelAllJobs()
          Cancels all print jobs.
 java.lang.String cancelJobs(java.lang.String[] printJobNames)
          Cancels selected print jobs.
 int countJobs()
          Counts existing print jobs.
 void generateView(java.lang.String[] attributes, boolean forceRefresh)
          Generates and caches a view of print jobs.
 java.lang.String getAbsoluteURL(IResponse obj)
          Gets the absolute URL of an SGD document.
 IResponse getPrintJob(java.lang.String printJobName)
          Gets a print job from the cache.
 int getPrintJobCount()
          Gets the number of print jobs in the cache.
 java.util.Enumeration getPrintJobEnumeration()
          Gets an enumeration of print jobs in the cache.
 java.util.ArrayList<WSObject> getPrintJobs()
          Gets a list of print jobs in the cache.
 java.lang.String getPrintQueueStatus()
          Gets the status of the user's print queue.
 java.util.Enumeration<IResponse> getSortedEnumeration(java.util.Enumeration enm, java.lang.String attName)
          Gets an enumeration of IResponse objects, sorted by the value of the attribute.
 java.lang.String lookupFullName(java.lang.String hashName)
          Looks up the full name based on the hash name.
 java.lang.String lookupJobs(java.lang.String[] printJobNames, java.lang.String[] desiredAttributes)
          Looks-up print jobs.
 java.lang.String printAllJobs()
          Sends all print jobs to the printer.
 java.lang.String printJobs(java.lang.String[] printJobNames)
          Sends selected print jobs to the printer.
 boolean processEvent(java.lang.String eventName, java.lang.String eventAction, java.lang.String eventData)
          Processes events affecting this view.
 java.lang.String search(java.lang.String searchSpec, java.lang.String[] desiredAttributes)
          Searches for print jobs.
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EVENT_PRINT_JOB

public static final java.lang.String EVENT_PRINT_JOB
Name of event to print a job.

See Also:
Constant Field Values

EVENT_RESTART_QUEUE

public static final java.lang.String EVENT_RESTART_QUEUE
Name of event to restart the application's print queue.

See Also:
Constant Field Values

EVENT_PAUSE_QUEUE

public static final java.lang.String EVENT_PAUSE_QUEUE
Name of event to pause the application's print queue.

See Also:
Constant Field Values

EVENT_ADD_JOB

public static final java.lang.String EVENT_ADD_JOB
Name of event to add a job.

See Also:
Constant Field Values

EVENT_CANCEL_JOB

public static final java.lang.String EVENT_CANCEL_JOB
Name of event to cancel a job.

See Also:
Constant Field Values

EVENT_CANCEL_ALL_JOBS

public static final java.lang.String EVENT_CANCEL_ALL_JOBS
Name of event to cancel all jobs.

See Also:
Constant Field Values

EVENT_REMOVE_JOB

public static final java.lang.String EVENT_REMOVE_JOB
Name of event to remove a job.

See Also:
Constant Field Values
Method Detail

generateView

public void generateView(java.lang.String[] attributes,
                         boolean forceRefresh)
                  throws java.rmi.RemoteException
Generates and caches a view of print jobs.

Parameters:
attributes - The attributes desired in the response
forceRefresh - Flag controlling how the request is serviced.
true request must be sent to the server
false request may be serviced from the cached view
Throws:
java.rmi.RemoteException - On receipt of a SOAP fault.
Since:
1.0

cancelAllJobs

public java.lang.String cancelAllJobs()
                               throws java.rmi.RemoteException
Cancels all print jobs.

Returns:
See ITarantellaPrint.cancelAllJobs(String).
Throws:
java.rmi.RemoteException - On receipt of a SOAP fault.
Since:
1.0

cancelJobs

public java.lang.String cancelJobs(java.lang.String[] printJobNames)
                            throws java.rmi.RemoteException
Cancels selected print jobs.

Parameters:
printJobNames - Array of print job IDs.
Returns:
See ITarantellaPrint.cancelJobs(String, String[]).
Throws:
java.rmi.RemoteException - On receipt of a SOAP fault.
Since:
1.0

countJobs

public int countJobs()
              throws java.rmi.RemoteException
Counts existing print jobs. This call involves a round-trip to the server. Use getPrintJobCount() to get the cached count.

Returns:
See ITarantellaPrint.countJobs(String).
Throws:
java.rmi.RemoteException - On receipt of a SOAP fault.
Since:
1.0

lookupJobs

public java.lang.String lookupJobs(java.lang.String[] printJobNames,
                                   java.lang.String[] desiredAttributes)
                            throws java.rmi.RemoteException
Looks-up print jobs.

Parameters:
printJobNames - Array of print job IDs.
desiredAttributes - Array of attributes wanted in the response.
Returns:
See ITarantellaPrint.lookupJobs(String, String[], String[]).
Throws:
java.rmi.RemoteException - On receipt of a SOAP fault.
Since:
1.0

printAllJobs

public java.lang.String printAllJobs()
                              throws java.rmi.RemoteException
Sends all print jobs to the printer.

Returns:
See ITarantellaPrint.printAllJobs(String)
Throws:
java.rmi.RemoteException - On receipt of a SOAP fault.
Since:
1.0

printJobs

public java.lang.String printJobs(java.lang.String[] printJobNames)
                           throws java.rmi.RemoteException
Sends selected print jobs to the printer.

Parameters:
printJobNames - Array of print job IDs.
Returns:
See ITarantellaPrint.printJobs(String, String[]).
Throws:
java.rmi.RemoteException - On receipt of a SOAP fault.
Since:
1.0

search

public java.lang.String search(java.lang.String searchSpec,
                               java.lang.String[] desiredAttributes)
                        throws java.rmi.RemoteException
Searches for print jobs.

Parameters:
searchSpec - Array of print job IDs.
desiredAttributes - Array of attributes wanted in the response.
Returns:
See ITarantellaPrint.search(String, String, String[]).
Throws:
java.rmi.RemoteException - On receipt of a SOAP fault.
Since:
1.0

getPrintQueueStatus

public java.lang.String getPrintQueueStatus()
                                     throws java.rmi.RemoteException
Gets the status of the user's print queue. This is the application's view of the print queue and not the status of print queues on the server. Typically, it is unset, or in a paused or resumed state.

Returns:
The status of the print queue or null if not set.
Throws:
java.rmi.RemoteException - On receipt of a SOAP fault.
Since:
1.0

addPrintJob

public void addPrintJob(java.lang.String printJobName,
                        java.lang.String[] attributes)
                 throws java.rmi.RemoteException
Looks-up a print job and adds it to the cache.

Parameters:
printJobName - Print job IDs.
attributes - Array of attributes wanted in the response.
Throws:
java.rmi.RemoteException - On receipt of a SOAP fault.
Since:
1.0

getPrintJobCount

public int getPrintJobCount()
Gets the number of print jobs in the cache. Use countJobs() to get the number of jobs in the print system on the SGD server.

Returns:
The number of print jobs in the cache.
Since:
1.0

getPrintJob

public IResponse getPrintJob(java.lang.String printJobName)
Gets a print job from the cache.

Parameters:
printJobName - Print job ID.
Returns:
The print job or null if it does not exist.
Since:
1.0

getPrintJobEnumeration

public java.util.Enumeration getPrintJobEnumeration()
Gets an enumeration of print jobs in the cache.

Returns:
An enumeration of print jobs in the cache.
Since:
1.0

getPrintJobs

public java.util.ArrayList<WSObject> getPrintJobs()
Gets a list of print jobs in the cache.

Returns:
A list of print jobs in the cache.
Since:
1.1

processEvent

public boolean processEvent(java.lang.String eventName,
                            java.lang.String eventAction,
                            java.lang.String eventData)
                     throws java.rmi.RemoteException
Processes events affecting this view. If the view is unable to process the event, the local cache may be invalid. It is the responsibility of the caller to refresh the cache in these circumstances.

Parameters:
eventName - Name of the event. Currently, no events are supported.
eventAction - Event action
eventData - Event data
Returns:
Currently, always false
true if the event was processed and the view updated
false if the event was not processed leaving the view corrupt
Throws:
java.rmi.RemoteException - On receipt of a SOAP fault.
Since:
1.0

lookupFullName

public java.lang.String lookupFullName(java.lang.String hashName)
Looks up the full name based on the hash name.

Parameters:
hashName - The hash name of the object.
Returns:
The full name of the object.
Since:
1.1

getAbsoluteURL

public java.lang.String getAbsoluteURL(IResponse obj)
Gets the absolute URL of an SGD document. This is a dummy implementation that can be overridden in sub-classes.

Parameters:
obj - The document object.
Returns:
The absolute URL.
Since:
1.1

getSortedEnumeration

public java.util.Enumeration<IResponse> getSortedEnumeration(java.util.Enumeration enm,
                                                             java.lang.String attName)
Gets an enumeration of IResponse objects, sorted by the value of the attribute.

Parameters:
enm - Initial enumeration
attName - Name of the attribute on which to sort
Returns:
The sorted enumeration.
Since:
1.3

Oracle Secure Global Desktop Web Services API Documentation
Release 4.7

E21396-02

Copyright © 2012, 2013, Oracle and/or its affiliates. All rights reserved.