com.ptc.wvs.server.schedule
Class ScheduleJobs

java.lang.Object
  extended bycom.ptc.wvs.server.schedule.ScheduleJobs

public class ScheduleJobs
extends Object

Helper methods for the customization of WVS schedule publish jobs



Supported API: true


Nested Class Summary
static class ScheduleJobs.Server
           
 
Field Summary
static String CONTAINER_REF
           
private static DateFormat dateFormat
           
static String DELETE_COMPLETED
           
static String DELETE_COMPLETED_SUCCESSFUL
           
static String GENERATE_3D_THUMBNAILS
           
static String GENERATE_LATEST_3D_THUMBNAILS
           
static String GENERATE_LATEST_THUMBNAILS
           
static String GENERATE_THUMBNAILS
           
private static WVSProperties properties
           
static String REGENERATE_LATEST_THUMBNAILS
           
static String REGENERATE_THUMBNAILS
           
private static String RESOURCE
           
private static boolean SERVER
           
private static String SERVER_CLASS
           
private static boolean testonly
           
private static boolean VERBOSE
           
 
Constructor Summary
ScheduleJobs()
           
 
Method Summary
static String add3DThumbnails()
          Returns a String to indicate to add 3D thumbnails for all representation that do not have a 3D thumbnail but already have a 2D thumbnail

Supported API: false
static String addLatest3DThumbnails()
          Returns a String to indicate to add 3D thumbnails for all representation that do not have a 3D thumbnail but already have a 2D thumbnail, and who's Representable is a latest interation

Supported API: false
static QueryResult allDefaultDerivedImages()
          Returns QuerySpec to determine all default DerivedImages which have been generated from an EPMDocument, and hence can be re-generated

Supported API: false
static QuerySpec allEPMDocuments()
          Returns QuerySpec to determine all EPMDocuments in the database

Supported API: false
static QueryResult allEPMDocumentsNoRepresentation()
          Returns QueryResult of all the EPMDocuments that does not have a default Representation associated

Supported API: false
private static QueryResult allEPMDocumentsNoRepresentation(boolean onlyLatest)
           
static QueryResult allLatestEPMDocumentsNoRepresentation()
          Returns QueryResult of all the latest EPMDocuments that does not have a default Representation associated

Supported API: false
static QueryResult allLatestWTDocuments()
           
static QueryResult allLatestWTDocumentsNoRepresentation()
           
static QuerySpec allWTDocuments()
           
static QueryResult allWTDocumentsInternal(boolean onlyLatest, boolean onlyWithNoRep)
           
static QueryResult allWTDocumentsNoRepresentation()
           
static QuerySpec allWTPartNoDefaultDerivedImage()
          Returns QuerySpec to determine all EPMDocuments with no default Representation (Derived Image)

Supported API: false
static String deleteCompletedJobs()
          Returns a String to indicate to delete all completed jobs

Supported API: false
static String deleteCompletedSuccessfulJobs()
          Returns a String to indicate to delete all completed and successful jobs

Supported API: false
static void doBatchJob(String jobString)
          Initiates a batch job

Supported API: false
static void doBatchJob(String targetClass, String targetMethod, String targetPublish)
          Initiates a batch job, by executing the targetMethod specified in the class file, the should return a QuerySpec which is then used to find objects or a QueryResult of objects which are sent to the publisher

Supported API: false
static void doBatchJob(String targetClass, String targetMethod, String targetPublish, Boolean listOnlyObj)
           
static void doBatchJob(String targetClass, String targetMethod, String targetPublish, Boolean listOnlyObj, String containerRef, String logFileName)
          Initiates a batch job, by executing the targetMethod specified in the class file, the should return a QuerySpec which is then used to find objects or a QueryResult of objects which are sent to the publisher

Supported API: false
static String generateLatestThumbnails()
          Returns a String to indicate to generate thumbnails for all representation that do not have a thumbnail and who's Representable is a latest interation

Supported API: false
static String generateThumbnails()
          Returns a String to indicate to generate thumbnails for all representation that do not have a thumbnail

Supported API: false
private static void generateThumbnailsInternal(boolean latestOnly, boolean listOnly, StringBuffer logBuffer, PrintWriter pw, boolean add3D, boolean regenerate)
           
static WTContainerRef getCurrentContainer()
          Returns the WTContainerRef of the current container context for the schedule job.
private static void login(String username, String password)
           
static void logMessage(StringBuffer logBuffer, PrintWriter pw, String msg)
           
static void main(String[] args)
           
static QueryResult outOfDateDerivedImages()
          Returns QuerySpec to determine all DerivedImages which are marked as being out of date

Supported API: false
static String regenerateLatestThumbnails()
          Returns a String to indicate to regenerate thumbnails for all representation and who's Representable is a latest interation

Supported API: false
static String regenerateThumbnails()
          Returns a String to indicate to regenerate thumbnails for all representation

Supported API: false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

DELETE_COMPLETED

public static final String DELETE_COMPLETED
See Also:
Constant Field Values

DELETE_COMPLETED_SUCCESSFUL

public static final String DELETE_COMPLETED_SUCCESSFUL
See Also:
Constant Field Values

GENERATE_LATEST_THUMBNAILS

public static final String GENERATE_LATEST_THUMBNAILS
See Also:
Constant Field Values

GENERATE_THUMBNAILS

public static final String GENERATE_THUMBNAILS
See Also:
Constant Field Values

GENERATE_LATEST_3D_THUMBNAILS

public static final String GENERATE_LATEST_3D_THUMBNAILS
See Also:
Constant Field Values

GENERATE_3D_THUMBNAILS

public static final String GENERATE_3D_THUMBNAILS
See Also:
Constant Field Values

REGENERATE_LATEST_THUMBNAILS

public static final String REGENERATE_LATEST_THUMBNAILS
See Also:
Constant Field Values

REGENERATE_THUMBNAILS

public static final String REGENERATE_THUMBNAILS
See Also:
Constant Field Values

CONTAINER_REF

public static final String CONTAINER_REF
See Also:
Constant Field Values

SERVER_CLASS

private static final String SERVER_CLASS

SERVER

private static final boolean SERVER

properties

private static WVSProperties properties

testonly

private static boolean testonly

VERBOSE

private static boolean VERBOSE

dateFormat

private static DateFormat dateFormat
Constructor Detail

ScheduleJobs

public ScheduleJobs()
Method Detail

doBatchJob

public static void doBatchJob(String jobString)
Initiates a batch job

Supported API: false

Parameters:
jobString - The schedule job as defined in wvs.properties

doBatchJob

public static void doBatchJob(String targetClass,
                              String targetMethod,
                              String targetPublish)
Initiates a batch job, by executing the targetMethod specified in the class file, the should return a QuerySpec which is then used to find objects or a QueryResult of objects which are sent to the publisher

Supported API: false

Parameters:
targetClass - The target class
targetMethod - The target method
targetPublish - The target description

doBatchJob

public static void doBatchJob(String targetClass,
                              String targetMethod,
                              String targetPublish,
                              Boolean listOnlyObj)

doBatchJob

public static void doBatchJob(String targetClass,
                              String targetMethod,
                              String targetPublish,
                              Boolean listOnlyObj,
                              String containerRef,
                              String logFileName)
Initiates a batch job, by executing the targetMethod specified in the class file, the should return a QuerySpec which is then used to find objects or a QueryResult of objects which are sent to the publisher

Supported API: false

Parameters:
targetClass - The target class
targetMethod - The target method
targetPublish - The target description

logMessage

public static void logMessage(StringBuffer logBuffer,
                              PrintWriter pw,
                              String msg)

login

private static void login(String username,
                          String password)

getCurrentContainer

public static WTContainerRef getCurrentContainer()
Returns the WTContainerRef of the current container context for the schedule job.

Supported API: true

Returns:
WTContainerRef

allWTDocuments

public static QuerySpec allWTDocuments()

allLatestWTDocuments

public static QueryResult allLatestWTDocuments()

allWTDocumentsNoRepresentation

public static QueryResult allWTDocumentsNoRepresentation()

allLatestWTDocumentsNoRepresentation

public static QueryResult allLatestWTDocumentsNoRepresentation()

allWTDocumentsInternal

public static QueryResult allWTDocumentsInternal(boolean onlyLatest,
                                                 boolean onlyWithNoRep)

allEPMDocuments

public static QuerySpec allEPMDocuments()
Returns QuerySpec to determine all EPMDocuments in the database

Supported API: false

Returns:
QuerySpec To find all EPMDocuments

allWTPartNoDefaultDerivedImage

public static QuerySpec allWTPartNoDefaultDerivedImage()
Returns QuerySpec to determine all EPMDocuments with no default Representation (Derived Image)

Supported API: false

Returns:
QuerySpec To find all EPMDocuments

allDefaultDerivedImages

public static QueryResult allDefaultDerivedImages()
Returns QuerySpec to determine all default DerivedImages which have been generated from an EPMDocument, and hence can be re-generated

Supported API: false

Returns:
QueryResult To find all defualt DerivedImages that can be re-generated

outOfDateDerivedImages

public static QueryResult outOfDateDerivedImages()
Returns QuerySpec to determine all DerivedImages which are marked as being out of date

Supported API: false

Returns:
QueryResult To find all DerivedImages that are out of date

deleteCompletedSuccessfulJobs

public static String deleteCompletedSuccessfulJobs()
Returns a String to indicate to delete all completed and successful jobs

Supported API: false

Returns:
String delete completed and successful

deleteCompletedJobs

public static String deleteCompletedJobs()
Returns a String to indicate to delete all completed jobs

Supported API: false

Returns:
String delete completed

generateLatestThumbnails

public static String generateLatestThumbnails()
Returns a String to indicate to generate thumbnails for all representation that do not have a thumbnail and who's Representable is a latest interation

Supported API: false

Returns:
String generate latest thumbnails

generateThumbnails

public static String generateThumbnails()
Returns a String to indicate to generate thumbnails for all representation that do not have a thumbnail

Supported API: false

Returns:
String generate thumbnails

addLatest3DThumbnails

public static String addLatest3DThumbnails()
Returns a String to indicate to add 3D thumbnails for all representation that do not have a 3D thumbnail but already have a 2D thumbnail, and who's Representable is a latest interation

Supported API: false

Returns:
String generate latest thumbnails

add3DThumbnails

public static String add3DThumbnails()
Returns a String to indicate to add 3D thumbnails for all representation that do not have a 3D thumbnail but already have a 2D thumbnail

Supported API: false

Returns:
String generate thumbnails

regenerateLatestThumbnails

public static String regenerateLatestThumbnails()
Returns a String to indicate to regenerate thumbnails for all representation and who's Representable is a latest interation

Supported API: false

Returns:
String regenerate latest thumbnails

regenerateThumbnails

public static String regenerateThumbnails()
Returns a String to indicate to regenerate thumbnails for all representation

Supported API: false

Returns:
String regenerate thumbnails

generateThumbnailsInternal

private static void generateThumbnailsInternal(boolean latestOnly,
                                               boolean listOnly,
                                               StringBuffer logBuffer,
                                               PrintWriter pw,
                                               boolean add3D,
                                               boolean regenerate)

allEPMDocumentsNoRepresentation

public static QueryResult allEPMDocumentsNoRepresentation()
Returns QueryResult of all the EPMDocuments that does not have a default Representation associated

Supported API: false

Returns:
QueryResult EPMDocuments

allLatestEPMDocumentsNoRepresentation

public static QueryResult allLatestEPMDocumentsNoRepresentation()
Returns QueryResult of all the latest EPMDocuments that does not have a default Representation associated

Supported API: false

Returns:
QueryResult EPMDocuments

allEPMDocumentsNoRepresentation

private static QueryResult allEPMDocumentsNoRepresentation(boolean onlyLatest)

main

public static void main(String[] args)