wt.dataops.purge
Class StandardPurgeService

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.dataops.purge.StandardPurgeService
All Implemented Interfaces:
Manager, NetFactor, PurgeService, Serializable

public class StandardPurgeService
extends StandardManager
implements PurgeService, Serializable

Use the newStandardPurgeService static factory method(s), not the StandardPurgeService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static boolean EXECUTE_QUEUES
           
private static String QUEUE_NAME
           
private static String RESOURCE
           
private static boolean VERBOSE
           
 
Fields inherited from class wt.services.StandardManager
 
Fields inherited from interface wt.services.Manager
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE
 
Constructor Summary
StandardPurgeService()
           
 
Method Summary
protected static void addQueueEntry()
           
private static boolean checkExistsQueueEntry()
           
static void cleanupCancelledPurgeRecords(String message)
           
 String getConceptualClassname()
          Deprecated.  
private static Timestamp getFutureTime()
          This will run every midnight.
static StandardPurgeService newStandardPurgeService()
          Default factory for the class.
protected  void performStartupProcess()
          Dummy method to be overridden by subclasses.
private  WTHashSet processObjects(Object[] objects, WTHashSet copyOfIterationsToBePurged, WTHashSet iterationsNotPurged)
           
 PurgeResult purge(PurgeRecord purgeRecord, WTCollection objectsToPurge, ConflictResolution[] resolutions, Locale locale)
          Performs the purge operation on the collection of objects passed.
private  void registerListeners()
           
private  void validateTaskEventRemove(DataMaintRecord record, TaskEvent taskEvent)
           
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, registerEvents, setManagerService, shutdown, shutdownFailure, shutdownSuccess, shuttingDown, started, startedErrors, startingUp, startup, startupFailure, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

VERBOSE

private static final boolean VERBOSE

EXECUTE_QUEUES

private static boolean EXECUTE_QUEUES

QUEUE_NAME

private static final String QUEUE_NAME
See Also:
Constant Field Values
Constructor Detail

StandardPurgeService

public StandardPurgeService()
Method Detail

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Overrides:
getConceptualClassname in class StandardManager
Returns:
String

performStartupProcess

protected void performStartupProcess()
                              throws ManagerException
Dummy method to be overridden by subclasses. Subclasses should override this method and provide startup processing.

Supported API: false

Overrides:
performStartupProcess in class StandardManager
Throws:
ManagerException

newStandardPurgeService

public static StandardPurgeService newStandardPurgeService()
                                                    throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardPurgeService
Throws:
WTException

purge

public PurgeResult purge(PurgeRecord purgeRecord,
                         WTCollection objectsToPurge,
                         ConflictResolution[] resolutions,
                         Locale locale)
                  throws WTException
Performs the purge operation on the collection of objects passed. The operation will try to purge as many of the objects as possible. The operation will create log of the operation and the log of objects deleted using the locale passed. Return PurgeResult containing the status of purge operation and objects that could not be purged.

Supported API: false

Specified by:
purge in interface PurgeService
Parameters:
purgeRecord - Purge record to be used for creating log and operand list log
objectsToPurge - Collection of objects to be purged
resolutions - User specified resolutions for overridable conflicts
locale - Locale to be used for the messages in logs.
Returns:
PurgeResult
Throws:
WTException

registerListeners

private void registerListeners()

validateTaskEventRemove

private void validateTaskEventRemove(DataMaintRecord record,
                                     TaskEvent taskEvent)
                              throws WTException
Throws:
WTException

processObjects

private WTHashSet processObjects(Object[] objects,
                                 WTHashSet copyOfIterationsToBePurged,
                                 WTHashSet iterationsNotPurged)
                          throws WTException
Throws:
WTException

addQueueEntry

protected static void addQueueEntry()
                             throws WTException
Throws:
WTException

cleanupCancelledPurgeRecords

public static void cleanupCancelledPurgeRecords(String message)
                                         throws WTException
Throws:
WTException

getFutureTime

private static Timestamp getFutureTime()
This will run every midnight.


checkExistsQueueEntry

private static boolean checkExistsQueueEntry()
                                      throws WTException
Throws:
WTException