wt.effectivity
Class StandardEffectivityService

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.effectivity.StandardEffectivityService
All Implemented Interfaces:
EffectivityService, Manager, NetFactor, Serializable

public class StandardEffectivityService
extends StandardManager
implements EffectivityService, Serializable

Standard server-side implementation of the EffectivityService interfaces. The public, static methods in this class are accessed through the syntax:

 EffectivityHelper.service.[method] 

Use the newStandardEffectivityService static factory method(s), not the StandardEffectivityService 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 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
StandardEffectivityService()
           
 
Method Summary
 ConfigurationItem findConfigurationItem(String configItemName)
          Retrieve a Configuration Item by name.
 String getConceptualClassname()
          Deprecated.  
 QueryResult getEffectivities(ConfigurationItem configItem)
          Retrieves the Effectivity objects which reference the given ConfigurationItem object.
 QueryResult getEffectivities(EffectivityHolder effectivityHolder)
          Retrieves the Effectivity objects for the given EffectivityHolder object.
 WTProductInstance getWTProductInstance(String configItemName, String serialNumber)
          Returns the product instance for this configuration item and serial number, or null if it does not exist.
static StandardEffectivityService newStandardEffectivityService()
          Default factory for the class.
 TransactionResult persistEffectivityBatch(TransactionContainer aTran)
          Perform Insert, Modify, or Delete operations on any number of Effectivity objects.
private static void processAssertion(Assertion asser)
          Helper method of persistEffectivityBatch for processing a single assertion from the TransactionBatchContainer.
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, performStartupProcess, 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
Constructor Detail

StandardEffectivityService

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

newStandardEffectivityService

public static StandardEffectivityService newStandardEffectivityService()
                                                                throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardEffectivityService
Throws:
WTException

getEffectivities

public QueryResult getEffectivities(EffectivityHolder effectivityHolder)
                             throws WTException
Retrieves the Effectivity objects for the given EffectivityHolder object.

Supported API: false

Specified by:
getEffectivities in interface EffectivityService
Parameters:
effectivityHolder - An object which implements the EffectivityHolder interface.
Returns:
QueryResult
Throws:
WTException
See Also:
Effectivity

persistEffectivityBatch

public TransactionResult persistEffectivityBatch(TransactionContainer aTran)
                                          throws WTException
Perform Insert, Modify, or Delete operations on any number of Effectivity objects. The passed TransactionContainer will contain a add, delete, or replace assertion for each Effectivity object. Below is example code for setting up a TransactionContainer to pass to this method:
 TransactionContainer effectivityTransaction = BatchContainerFactory.instantiateTransactionContainer();

 BatchContainer mainBatchContainer = BatchContainerFactory.instantiateGeneralBatchContainer(effectivityTransaction,
 "main");

 // Create a new Serial Numbered Effectivity
 mainBatchContainer.add(aSerialNumberedEffectivity);

 // Modify an existing Lot Effectivity
 mainBatchContainer.replace(aLotEffectivity);

 // Delete an existing Dated Effectivity
 mainBatchContainer.populate(aDatedEffectivity);
 mainBatchContainer.remove(aDatedEffectivity);

 


Supported API: false

Specified by:
persistEffectivityBatch in interface EffectivityService
Parameters:
aTran - A TransactionContainer containing any number of add, replace or delete assertions for Effectivity objects.
Returns:
TransactionResult
Throws:
WTException
See Also:
TransactionContainer

findConfigurationItem

public ConfigurationItem findConfigurationItem(String configItemName)
                                        throws WTException,
                                               ConfigItemNotFoundException
Retrieve a Configuration Item by name.

Supported API: false

Specified by:
findConfigurationItem in interface EffectivityService
Parameters:
configItemName - The name of the Configuration Item.
Returns:
ConfigurationItem
Throws:
WTException
ConfigItemNotFoundException
See Also:
ConfigurationItem

getEffectivities

public QueryResult getEffectivities(ConfigurationItem configItem)
                             throws WTException
Retrieves the Effectivity objects which reference the given ConfigurationItem object.

Supported API: false

Specified by:
getEffectivities in interface EffectivityService
Parameters:
configItem - A Configuration Item.
Returns:
QueryResult
Throws:
WTException
See Also:
Effectivity

getWTProductInstance

public WTProductInstance getWTProductInstance(String configItemName,
                                              String serialNumber)
                                       throws WTException
Returns the product instance for this configuration item and serial number, or null if it does not exist.

Supported API: false

Specified by:
getWTProductInstance in interface EffectivityService
Parameters:
configItemName -
serialNumber -
Returns:
WTProductInstance
Throws:
WTException

processAssertion

private static void processAssertion(Assertion asser)
                              throws WTException
Helper method of persistEffectivityBatch for processing a single assertion from the TransactionBatchContainer.

Parameters:
asser - An add, replace or delete assertion.
Throws:
WTException - If the assertion container is not a BatchContainer, of if the assertion target is not an Effectivity object.