com.ptc.windchill.upgrade.blobrewrite
Class BackgroundBlobRewriter.Server
java.lang.Object
com.ptc.windchill.upgrade.blobrewrite.BackgroundBlobRewriter.Server
- All Implemented Interfaces:
- RemoteAccess
- Enclosing class:
- BackgroundBlobRewriter
- public static class BackgroundBlobRewriter.Server
- extends Object
- implements RemoteAccess
Accepts lightweight service requests in the MethodServer and delegates the work to static methods on the containing class.
BLOB_REWRITE_QUEUE_NAME
private static final String BLOB_REWRITE_QUEUE_NAME
- See Also:
- Constant Field Values
STDERR
private static final String STDERR
- See Also:
- Constant Field Values
log_
private PrintWriter log_
logLocation_
private String logLocation_
serverUrl_
private String serverUrl_
totalCount_
private long totalCount_
totalTime_
private long totalTime_
instance__
private static BackgroundBlobRewriter.Server instance__
BackgroundBlobRewriter.Server
private BackgroundBlobRewriter.Server()
throws WTException
queueRewriteBlobs
public static void queueRewriteBlobs()
throws WTException
- Queues a request to rewrite all blobs for each concrete persistable class.
- Throws:
WTException
rewriteBlobs
public static void rewriteBlobs(Vector class_names)
throws WTException
- Queues a request to rewrite all blobs for each concrete persistable class specified in the provided vector of String class names.
- Throws:
WTException
getInstance
private static BackgroundBlobRewriter.Server getInstance()
throws WTException
- Throws:
WTException
finalize
protected void finalize()
throws Throwable
- Throws:
Throwable
getLog
private final PrintWriter getLog()
getLogLocation
private final String getLogLocation()
getServerUrl
private final String getServerUrl()
getQueue
private ScheduleQueue getQueue()
throws WTException
- Throws:
WTException
deleteAllQueuedEntries
private void deleteAllQueuedEntries()
throws WTException
- Throws:
WTException
queueRewriteBlobsForAllPersistables
private void queueRewriteBlobsForAllPersistables()
throws WTException
- Throws:
WTException
containsBlobColumn
private boolean containsBlobColumn(ClassInfo class_info)
throws WTIntrospectionException
- Throws:
WTIntrospectionException
queueRewriteBlobsFor
private void queueRewriteBlobsFor(Vector class_names)
throws WTException
- Throws:
WTException
getCalendar
private Calendar getCalendar()
inValidOperatingPeriod
private boolean inValidOperatingPeriod(Date time)
pickNextEarliestValidScheduledTime
private Timestamp pickNextEarliestValidScheduledTime()
makeFailureNotifyee
private void makeFailureNotifyee(WTPrincipal principal)
throws WTException
- Throws:
WTException
getLocalizedTaskDescription
private String getLocalizedTaskDescription()
report
private void report(String message)
report
private void report(String message_key,
Object[] args)
warning
private void warning(String localized_message)
warning
private void warning(String message_key,
Object[] args)
emailwarning
private void emailwarning(String localized_message)
emailwarning
private void emailwarning(String message_key,
Object[] args)
rewriteBlobsFor
public void rewriteBlobsFor(Vector class_names)
throws WTException
- Process the first class name in the list, then enqueue a job to process
the remaining class names in the list. This assures that as each class
is completed, only remaining classes will be processed in the event of a
server restart.
- Throws:
WTException
rewriteBlobsInPersistables
private void rewriteBlobsInPersistables(String class_name)
throws WTException,
WTPropertyVetoException,
Throwable
- Throws:
WTException
WTPropertyVetoException
Throwable
sendQueueAdminEmail
private void sendQueueAdminEmail(String subject,
String body)
sendQueueAdmilEmailAboutFailure
private void sendQueueAdmilEmailAboutFailure(String failed_activity,
Throwable t)
findUser
private WTUser findUser(String email_or_id)
throws WTException
- Lookup a user using the email address or the id(authenticationName).
- Returns:
- the first user found or
null
if none is found
- Throws:
WTException