|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.wvs.server.publish.PublishQueueHelper
PublishQueueHelper works with the ProcessingQueues that the Windchill Visualization Service uses to queue jobs for conversion.
Jobs are initially submitted to the PublisherQueue. When a job executes in this queue, it looks for a free ProcessingQueue whose name is of the form PublisherQueue'Number'. The numbers of the queue need not be sequential. When a free queue is located, the executing job in the PublisherQueue, submits itself to the PublisherQueue'Number' queue, where PublishJob should execute immediately. Completed jobs in the PublisherQueue are not kept. PublisherQueue'Number' * completed jobs are kept, so that log information can be accessed.
Supported API: false
Extendable: true
Field Summary | |
static String |
AVAILABLE_TIMES
|
private static String[] |
busyItems
Locates the next available PublisherQueue'N' Supported API: false |
private static int |
DISPLAY_LIMIT
|
private static char |
END_ENTRY_CHAR
|
private static String |
FIRST_ENTRY
|
private static int |
FREE_QUEUE_SLEEP
|
private static String |
NBSP
|
private static String |
NEXT_ENTRY
|
private static String |
NEXT_ENTRY_RIGHT
|
private static Integer |
NUMBER_OF_QUEUES
|
private static String |
QUEUE_DEFAULT_VAL
|
static String |
QUEUE_HIGH_SUFFIX
|
static String |
QUEUE_LOW_SUFFIX
|
static String |
QUEUE_MEDIUM_SUFFIX
|
static String |
QUEUE_NAME
The name of the processing queue |
static String |
QUEUE_NAME_HIGH
|
static String |
QUEUE_NAME_LOW
|
static String |
QUEUE_NAME_MEDIUM
|
static String |
QUEUE_PRIORITIES
|
private static String |
QUEUE_VAL_SEP
|
private static Hashtable |
queuePriorities
|
private static String |
RESOURCE
|
private static String |
ROW_ENTRY
|
private static String |
TABLEEVENROWBG
|
private static String |
TABLEODDROWBG
|
private static boolean |
VERBOSE
|
private static WVSProperties |
wvsProperties
|
Fields inherited from interface wt.method.RemoteAccess |
versionID |
Constructor Summary | |
PublishQueueHelper()
|
Method Summary | |
private static Boolean |
addEntry(WtQueue queue,
Collection collection)
Adds a job to the specified queue Supported API: false |
private static Boolean |
addEntry(WtQueue queue,
PublishJob publishJob)
|
static void |
addPublishEntry(Collection collection)
|
static Boolean |
addPublishEntry(PublishJob publishJob)
First ensures that the Publisher queues exists, then adds a job to the base queue QUEUE_NAME Supported API: false |
static void |
addToFreeQueue(PublishJob publishJob)
Adds the publish job to the next free PublisherQueue'n' Supported API: false |
static Map |
createMultiQueue(String queueName,
Integer nqueues)
Creates all the PublisherQueue's Typically : PublisherQueue, PublisherQueue1 ... |
static WtQueue |
createQueue(String queueName)
Creates a new processing queue. |
static void |
deleteQueueEntry(boolean deleteWaiting,
boolean deleteOnlySuccess,
String cRef)
Deletes All Queue Entries accessible to the user |
static void |
deleteQueueEntry(String cRef)
Deletes All Queue Entries accessible to the user Supported API: false |
static void |
deleteQueueEntry(String queueNo,
String queueEntryNo)
Deletes a Queue Entry Supported API: false |
static String |
displayQueueEntry(String queueNo,
String queueEntryNo,
Boolean refresh,
Locale locale)
Returns an HTML table of the details of a queue entry Supported API: false |
private static PublishJob |
extractPublishJob(QueueEntry queueEntry)
Extracts the PublishJob from the QueueENtry Supported API: false |
private static WtQueue |
findAvailableQueue(String queueName)
|
private static int |
formatQueueEntry(StringBuffer buf,
QueueEntry queueEntry,
String queueNo,
boolean waitingJob,
boolean urlLinks,
boolean details,
boolean onlyFailures,
WTPrincipal entryPrincipal,
String bcol,
String[] statusDisplay,
ArrayList containers,
boolean containerWasSpecified,
int count,
String trailId,
String addArgs,
Locale locale)
Produces an HTML table entry for the specified Queue Entry Supported API: false |
static QueryResult |
getAllQueueEntries()
Queries all the queues with a name like QUEUE_NAME, and orders the result by the Queue ntry Number Supported API: false |
private static long |
getExecutingJobNumber(String queueName)
Returns the entry number of the executing job in the queue QUEUE_NAME Supported API: false |
static Hashtable |
getPublisherQueueAvailableTimes()
reads PublisherQueue available time from wvs.properties used by WorkerOnlineStatus, to start and stop queues Supported API: false |
static QueryResult |
getQueueEntries(WtQueue queue)
|
private static String |
getQueueNameForPublishJob(int requestType,
int requestSource)
|
static String |
getStatistics(Boolean refresh,
Boolean OnlyFailures,
Boolean DisplayAll,
String cRef,
Locale locale)
Returns an HTML table of the Publisher Queue entries Supported API: false |
private static String[] |
getStatusDisplay(Locale locale)
|
private static String |
getStrings(File file)
Returns the strings from the executing log file Supported API: false |
private static int |
getValidQueueNumber(ProcessingQueue wtqueue)
Extracts the queue number. |
private static QueryResult |
getWaitingQueueEntries()
Queries the queue ordered by the Queue Entry Number Supported API: false |
static Boolean |
processPublisherQueueAvailableTimes(String queueName,
Boolean ns)
|
private static Enumeration |
queueEntries(ProcessingQueue queue,
String queueEntryNo)
Returns the Queue Entry from the specified queue and entry number there should be either 0 or 1 in the result Supported API: false |
private static String |
statusDisplayMessage(String statusCode,
PublishJob publishJob,
String[] statusDisplay)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final Integer NUMBER_OF_QUEUES
private static boolean VERBOSE
private static int FREE_QUEUE_SLEEP
private static int DISPLAY_LIMIT
private static String TABLEODDROWBG
private static String TABLEEVENROWBG
private static WVSProperties wvsProperties
private static Hashtable queuePriorities
public static final String QUEUE_NAME
public static final String QUEUE_LOW_SUFFIX
public static final String QUEUE_NAME_LOW
public static final String QUEUE_MEDIUM_SUFFIX
public static final String QUEUE_NAME_MEDIUM
public static final String QUEUE_HIGH_SUFFIX
public static final String QUEUE_NAME_HIGH
public static final String AVAILABLE_TIMES
public static final String QUEUE_PRIORITIES
private static final String QUEUE_VAL_SEP
private static final String QUEUE_DEFAULT_VAL
private static final String[] busyItems
private static final String ROW_ENTRY
private static final String FIRST_ENTRY
private static final String NEXT_ENTRY_RIGHT
private static final String NEXT_ENTRY
private static final char END_ENTRY_CHAR
private static final String NBSP
Constructor Detail |
public PublishQueueHelper()
Method Detail |
public static Map createMultiQueue(String queueName, Integer nqueues)
queueName
- The name of the base queue (QUEUE_NAME)nqueues
- The number of queues to create which will process a PublishJob
public static WtQueue createQueue(String queueName)
queueName
- The name of the queue
private static String getQueueNameForPublishJob(int requestType, int requestSource)
public static void addPublishEntry(Collection collection)
public static Boolean addPublishEntry(PublishJob publishJob)
publishJob
- The job to publish
private static Boolean addEntry(WtQueue queue, Collection collection)
private static Boolean addEntry(WtQueue queue, PublishJob publishJob)
private static QueryResult getWaitingQueueEntries() throws WTException
WTException
public static QueryResult getQueueEntries(WtQueue queue) throws WTException
WTException
public static QueryResult getAllQueueEntries() throws WTException
WTException
public static String getStatistics(Boolean refresh, Boolean OnlyFailures, Boolean DisplayAll, String cRef, Locale locale)
refresh
- TRUE if table is automatically refreshinglocale
- the client locale for the data
public static String displayQueueEntry(String queueNo, String queueEntryNo, Boolean refresh, Locale locale)
queueNo
- The Publisher Queue Numberrefresh
- TRUE if table is automatically refreshing
public static void deleteQueueEntry(String queueNo, String queueEntryNo)
queueNo
- The Publisher Queue Numberpublic static void deleteQueueEntry(String cRef)
public static void deleteQueueEntry(boolean deleteWaiting, boolean deleteOnlySuccess, String cRef)
deleteWaiting
- - deletes jobs waiting to executedeleteOnlySuccess
- - only delete completed jobs that were also successfull
public static void addToFreeQueue(PublishJob publishJob)
private static WtQueue findAvailableQueue(String queueName)
public static Hashtable getPublisherQueueAvailableTimes()
public static Boolean processPublisherQueueAvailableTimes(String queueName, Boolean ns)
private static int formatQueueEntry(StringBuffer buf, QueueEntry queueEntry, String queueNo, boolean waitingJob, boolean urlLinks, boolean details, boolean onlyFailures, WTPrincipal entryPrincipal, String bcol, String[] statusDisplay, ArrayList containers, boolean containerWasSpecified, int count, String trailId, String addArgs, Locale locale)
buf
- the StringBuffer to append otqueueEntry
- The queue entry to formatqueueNo
- The queue number where the entry is fromurlLinks
- if true add link to see details of jobdetails
- if true display the details of the job eg. Name, description
private static String[] getStatusDisplay(Locale locale)
private static String statusDisplayMessage(String statusCode, PublishJob publishJob, String[] statusDisplay)
private static long getExecutingJobNumber(String queueName)
private static Enumeration queueEntries(ProcessingQueue queue, String queueEntryNo) throws WTException
queue
- The queuequeueEntryNo
- The entry number with the queue
WTException
private static PublishJob extractPublishJob(QueueEntry queueEntry)
queueEntry
- The queueEntry
private static String getStrings(File file)
file
- The file
private static int getValidQueueNumber(ProcessingQueue wtqueue)
wtqueue
- The queue
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |