|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Observable com.ibm.etools.iseries.subsystems.qsys.jobs.JobTicketManager
public class JobTicketManager
A JobTicketManager is responsible for managing the set of JobTickets found in the workbench. It updates them with new status when requested by either a user or a timer. It will cause them to be persisted and deleted when necessary.
There is a single instance of this manager in the workbench which is created during workbench initialization. This instance can be retrieved using JobTicketManager.getDefault().
A JobTicketManager implements the Observable interface and can tell observers when a change in its state occurs. This may be useful in designing a user interface that updates when the JobTickets being managed by this JobTicketManager are updated.
Field Summary | |
---|---|
static String |
Copyright
|
static Integer |
CURRENT_TICKET
Argument used when notifying observers of a change to the current JobTicket (this is actually a way for us to notify the table view to select a JobTicket that was just added. |
static Integer |
INTERVAL
Argument used when notifying observers of a change in the interval. |
static int |
NEVER
The value used to set the timer to never automatically refresh. |
static String |
PREF_BuildMonitorRefreshInterval
The name of the preference that stores the refresh interval. |
static Integer |
TICKETS
Argument used when notifying observers of a change in the tickets. |
Method Summary | |
---|---|
boolean |
add(JobTicket ticket)
Adds a new JobTicket to those being managed. |
void |
commitInterval()
Commits the manager to begin refreshing at the set interval. |
JobTicket |
getCurrentTicket()
Get the current JobTicket, this is the last JobTicket added to the JobTicketManager |
static JobTicketManager |
getDefault()
Returns the singletime JobTicketManager for this workbench. |
int |
getInterval()
Returns the interval value known by this manager. |
JobTicket[] |
getTickets()
Returns all the tickets known by this manager. |
static void |
initDefaults(IPreferenceStore store)
Initializes the default preferences for all JobTicketManagers. |
void |
refresh()
Refreshes all the unfinished tickets being managed by this job manager. |
void |
remove(JobTicket ticket)
Removes a JobTicket from those being managed. |
void |
removeAll()
Removes all JobTickets from this manager. |
void |
resetTimer()
Schedules the refresh task so that it will be automatically run. |
void |
setInterval(int interval)
Sets the interval value for this manager. |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String Copyright
public static final Integer TICKETS
public static final Integer INTERVAL
public static final Integer CURRENT_TICKET
public static final String PREF_BuildMonitorRefreshInterval
public static final int NEVER
Method Detail |
---|
public static JobTicketManager getDefault()
public static void initDefaults(IPreferenceStore store)
Invoked during plugin initialization. Not meant to be called by clients.
public void resetTimer()
Called by the user interface when a refresh has been performed.
public boolean add(JobTicket ticket)
JobTicket ticket = new JobTicket(project, timeStamp, jobName, jobUser,
jobNumber, JobTicket.Queued, connectionName, systemName, tag);
JobTicketManager.getDefault().add(ticket);
public void remove(JobTicket ticket)
This is typically invoked by the user interface when a ticket is selected and removed by a user.
public void removeAll()
This is typically invoked by the user interface when a ticket is selected and removed by a user.
public void refresh()
Usually run by the user interface as the result of a user requested "refresh" action.
Clients are not expected to invoke this as it is invoked by the user interface or a timer.
public JobTicket[] getTickets()
Used by the user interface to present the remembered jobs to the user.
public int getInterval()
The value is expressed in seconds.
public void setInterval(int interval)
Setting the interval notifies all observers the the interval setting has been changed. However, the interval must be committed to affect the refresh rate of this manager.
The value is expressed in seconds.
public void commitInterval()
public JobTicket getCurrentTicket()
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |