wt.eff
Class StandardEffService

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.eff.StandardEffService
All Implemented Interfaces:
EffService, Manager, NetFactor, Serializable

public class StandardEffService
extends StandardManager
implements EffService, Serializable

This standard implementation of EffService implements much extra functionality via listeners defined in performStartupProcess().

In particular:

Use the newStandardEffService static factory method(s), not the StandardEffService 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: true

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static long PURGE_AUDIT_INTERVAL
           
private static String PURGE_AUDIT_METHOD
           
private static String PURGE_AUDIT_QUEUE
           
private static String RESOURCE
           
 
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
StandardEffService()
           
 
Method Summary
private  void copyEffs(WTKeyedMap effMap, int estimatedSize)
           
private  void copyEffsForward(WTValuedMap eMVWipMap)
           
private  void deleteEffConfigurationItemSolutionRefsToProductSolutions(WTCollection pSs)
           
private  void deleteProductInstancesOfEffConfigurationItems(WTCollection eCIs)
           
private  void ensureAuditPurging()
          Creates a scheduled task, if one does not already exist, to periodically purge orphaned EffChangeAudit objects.
private  QueryResult expandFKs(WTCollection refs, Class otherSide, String roleTarget)
           
 QueryResult getAllContexts()
          Return all EffContext objects in the DB.
 String getConceptualClassname()
          Deprecated.  
 EffConfigurationItem getEffConfigurationItem(String name)
          Returns the EffConfigurationItem that has this name.
 Eff[] getEffectivities(EffManagedVersion version, EffContext context, Class effType, boolean includeHistory)
          Returns a sorted array of Eff objects of the concrete type represented by the effType parameter, and related to the version and context parameters.
 QueryResult getEffs(EffManagedVersion version)
          For a given EffManagedVersion, return all Effs assigned to it.
 QueryResult getInstances(EffConfigurationItem configItem)
          Returns all ProductInstances for this EffConfigurationItem.
 ProductSolution getSolution(EffConfigurationItem effConfigurationItem)
          Gets the ProductSolution for this EffConfigurationItem, returning null if none exist.
private  void moveEffs(WTKeyedMap effMap, int estimatedSize)
           
static StandardEffService newStandardEffService()
          Default factory for the class.
protected  void performStartupProcess()
          Dummy method to be overridden by subclasses.
static void purgeOrphanedEffAudits()
          Locate and remove any EffChangeAudit objects that became 'orphaned' (unreferenced) due to one or more Eff object deletions.
private  void putEffsBack(WTValuedMap inverseEMVWipMap)
           
private  void removeEffsForEffContexts(WTCollection eCs)
           
private  void removeEffsForEffManagedVersions(WTCollection eMVs)
           
private  void removeUnreferencedAuditPurgeScheduleItems()
           
private  void undoCopyEffsForward(WTCollection workingCopies)
           
private  void verifyIncorporationDates(EffGroup[] eGs)
           
private  void verifyIncorporationDates(EffManagedVersion[] eMVs)
           
 
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

PURGE_AUDIT_QUEUE

private static final String PURGE_AUDIT_QUEUE
See Also:
Constant Field Values

PURGE_AUDIT_METHOD

private static final String PURGE_AUDIT_METHOD
See Also:
Constant Field Values

PURGE_AUDIT_INTERVAL

private static final long PURGE_AUDIT_INTERVAL
Constructor Detail

StandardEffService

public StandardEffService()
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

purgeOrphanedEffAudits

public static void purgeOrphanedEffAudits()
                                   throws WTException,
                                          WTPropertyVetoException
Locate and remove any EffChangeAudit objects that became 'orphaned' (unreferenced) due to one or more Eff object deletions.

Supported API: false

Throws:
WTException
WTPropertyVetoException

newStandardEffService

public static StandardEffService newStandardEffService()
                                                throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardEffService
Throws:
WTException

getEffs

public QueryResult getEffs(EffManagedVersion version)
                    throws WTException
For a given EffManagedVersion, return all Effs assigned to it.

Supported API: true

Specified by:
getEffs in interface EffService
Parameters:
version -
Returns:
QueryResult
Throws:
WTException

getAllContexts

public QueryResult getAllContexts()
                           throws WTException
Return all EffContext objects in the DB. The result is filtered by access control.

Supported API: true

Specified by:
getAllContexts in interface EffService
Returns:
QueryResult
Throws:
WTException

getEffConfigurationItem

public EffConfigurationItem getEffConfigurationItem(String name)
                                             throws WTException
Returns the EffConfigurationItem that has this name. If none exists, returns null.

Supported API: true

Specified by:
getEffConfigurationItem in interface EffService
Parameters:
name -
Returns:
EffConfigurationItem
Throws:
WTException

getSolution

public ProductSolution getSolution(EffConfigurationItem effConfigurationItem)
                            throws WTException
Gets the ProductSolution for this EffConfigurationItem, returning null if none exist. The solution is subject to access control.

Supported API: false

Specified by:
getSolution in interface EffService
Parameters:
effConfigurationItem -
Returns:
ProductSolution
Throws:
WTException

getInstances

public QueryResult getInstances(EffConfigurationItem configItem)
                         throws WTException
Returns all ProductInstances for this EffConfigurationItem. The instances are subject to access control.

Supported API: true

Specified by:
getInstances in interface EffService
Parameters:
configItem -
Returns:
QueryResult
Throws:
WTException

getEffectivities

public Eff[] getEffectivities(EffManagedVersion version,
                              EffContext context,
                              Class effType,
                              boolean includeHistory)
                       throws WTException
Returns a sorted array of Eff objects of the concrete type represented by the effType parameter, and related to the version and context parameters. The results are sorted in the order of creation of the Eff objects. Object reference attributes of the results are not expanded. This is an internal API to support ESI product functionality.

Supported API: false

Specified by:
getEffectivities in interface EffService
Parameters:
version - EffManagedVersion object for which related Eff objects are to be retrieved -- may not be null
context - EffContext object for which related Eff objects are to be retrieved -- may be null to signify context-free (global) effectivity
effType - Class object representing the concrete type of the Eff objects in the result set: only Eff objects of this type will be returned -- may not be null and must represent a concrete implementation of the wt.eff.Eff interface
includeHistory - boolean value indicating whether the result should include factually deleted (i.e., historical) Eff objects
Returns:
Eff[]
Throws:
WTException

performStartupProcess

protected void performStartupProcess()
                              throws ManagerException
Description copied from class: StandardManager
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

removeEffsForEffManagedVersions

private void removeEffsForEffManagedVersions(WTCollection eMVs)
                                      throws WTException
Throws:
WTException

removeEffsForEffContexts

private void removeEffsForEffContexts(WTCollection eCs)
                               throws WTException
Throws:
WTException

deleteProductInstancesOfEffConfigurationItems

private void deleteProductInstancesOfEffConfigurationItems(WTCollection eCIs)
                                                    throws WTException
Throws:
WTException

deleteEffConfigurationItemSolutionRefsToProductSolutions

private void deleteEffConfigurationItemSolutionRefsToProductSolutions(WTCollection pSs)
                                                               throws WTException
Throws:
WTException

copyEffsForward

private void copyEffsForward(WTValuedMap eMVWipMap)
                      throws WTException
Throws:
WTException

putEffsBack

private void putEffsBack(WTValuedMap inverseEMVWipMap)
                  throws WTException
Throws:
WTException

undoCopyEffsForward

private void undoCopyEffsForward(WTCollection workingCopies)
                          throws WTException
Throws:
WTException

expandFKs

private QueryResult expandFKs(WTCollection refs,
                              Class otherSide,
                              String roleTarget)
                       throws WTException
Throws:
WTException

copyEffs

private void copyEffs(WTKeyedMap effMap,
                      int estimatedSize)
               throws WTException
Throws:
WTException

moveEffs

private void moveEffs(WTKeyedMap effMap,
                      int estimatedSize)
               throws WTException
Throws:
WTException

verifyIncorporationDates

private void verifyIncorporationDates(EffManagedVersion[] eMVs)
                               throws WTException
Throws:
WTException

verifyIncorporationDates

private void verifyIncorporationDates(EffGroup[] eGs)
                               throws WTException
Throws:
WTException

ensureAuditPurging

private void ensureAuditPurging()
Creates a scheduled task, if one does not already exist, to periodically purge orphaned EffChangeAudit objects.


removeUnreferencedAuditPurgeScheduleItems

private void removeUnreferencedAuditPurgeScheduleItems()
                                                throws WTException
Throws:
WTException