Classes
These are the Windchill ESI classes that support effectivity publication:
Windchill ESI Effectivity Release Support Objects
ESIEffectivityHandlerFactory
Creates an instance of ESIEffectivityHandler. The class provides these methods:
newESIEffectivityHandler() : ESIEffectivityHandler
Obtains the name of the ESIEffectivityHandler implementation class to instantiate from Windchill ESI preferences. Creates a new instance and returns it to the caller.
ESIEffectivityHandler
An interface that defines the methods that must be available on a Windchill ESI effectivity handler. The interface has these methods:
getLatestEffectivity(part : EffManagedVersion) : Eff
Returns the latest non-product-specific Date Effectivity that is associated with an object (of type EffManagedVersion).
isReleased(assn : ESITargetAssociation) : boolean
Given an ESITargetAssociation containing an Eff and an ESITarget, returns true if the Eff has been released to the ESITarget.
getLatestEffectivity(emv: EffManagedVersion, type: int) : Eff
Returns the latest effectivity of a given type that is associated with a given object (of type EffManagedVersion).
getLatestEffectivities(emv: EffManagedVersion) : Eff[]
Fetches the latest date, serial number and lot number effectivities associated with a given object (of type EffManagedVersion), stores them in an array of Effs and returns the array to the caller.
isReleased(emv: EffManagedVersion, target: ESITarget, type: int) : boolean
Returns true if the latest effectivity of the passed type associated with the given object (of type EffManagedVersion) is also the effectivity (of the same type) that was last exported to a given distribution target, or if the given object does not have any effectivity of the given type associated to it.
getClassForEffectivityType(type: int) : Class
Returns the Class instance corresponding to the type of effectivity that is passed to it.
isCompEffReleased(part: WTPart, assn: ESITargetAssociation, root: WTPart, navCriteria: NavigationCriteria) : boolean
Lets the caller know if the latest serial or lot effectivity associated with any of the components in the passed BOM is already published. Also, it validates the serial/lot effectivity assigned to each component in the BOM - if the effectivity on any of the components is found to be invalid, an exception is thrown.
validateUnitEffOnChangeable(part: WTPart, changeables: Hashtable<WTPart, String>, contextIterations: Hashtable<WTPart, String>, navCriteria: navigationCriteria) : int
Lets the caller know if the latest unit effectivity associated with the passed part is valid. Throws as exception if an error occurred during the validation. Returns an integer value that indicates whether the unit effectivity on the passed part is valid or not.
initialize()
Initializes the effectivity handler instance appropriately so it does not contain previously stored (and possibly stale) data.
ESIEffectivityHandlerImpl
The default implementation of the Windchill ESI effectivity handler interface. The class has these available methods:
getLatestEffectivity(part : EffManagedVersion) : Eff
Returns the latest non-product-specific Date Effectivity that is associated with an object.
isReleased(assn : ESITargetAssociation) : boolean
Checks if the latest date effectivity associated with the given object (of type EffManagedVersion) is also the date effectivity that was last exported to the given distribution target, or if the given object does not have any date effectivity assigned to it. The object and the distribution target are worked out from the passed ESITargetAssociation instance. If the input object is a process plan, it performs the above said checks for serial and lot effectivity as well. The method returns a true if all the performed checks succeed; it returns a false otherwise.
getLastExportedEffectivity(part : WTPart, target : ESITarget) : Eff
This is a protected method that returns the last published Eff object that is associated with a given WTPart and a given ESITarget. The method delegates the work to ESITransactionUtility.latestEffExport().
getLatestEffectivity (emv : EffManagedVersion, type: int) : Eff
Returns the latest Effectivity of a given type that is associated with an object. The method tries to fetch the required information from cache to start with, failing which it invokes EffHelper.service.getEffs(). The PersistInfo associated with each Eff instance is looked up to determine the latest among the multiple Eff instances (of the given type) that getEffs() may return. The latest Eff instance fetched is then cached, so it may be fetched conveniently from the cache during a subsequent call, without having to hit the database.
getLatestEffectivities(emv: EffManagedVersion) : Eff[]
Fetches the latest date, serial number and lot number effectivities associated with a given object (of type EffManagedVersion), stores them in an array of Eff instances, and returns the array to the caller. Some of the elements in the output array could be null, depending on whether or not the given object has the given type of effectivity associated with it.
isReleased(emv: EffManagedVersion, target: ESITarget, type: int) : boolean
Returns a true, if the latest effectivity of the passed type associated with the given object (of type EffManagedVersion) is also the effectivity (of the same type) that was last exported to the given distribution target, or if the given object does not have any effectivity of the given type assigned to it.
getClassForEffectivityType(type: int) : Class
Returns the Class instance corresponding to the type of effectivity that is passed to it.
getLastExportedEffectivity(emv : EffManagedVersion, target : ESITarget, type: int) : Eff
Returns an Eff instance of the passed type that was last exported to the given distribution target for the given object (of type EffManagedVersion). The method tries to fetch the required information from cache to start with, and if this fails, it invokes ESITransactionUtility.latestEffExport(EffManagedVersion emv, ESITarget target, int type), an overloaded version that takes the additional argument type.
isCompEffReleased(part: WTPart, assn: ESITargetAssociation, root: WTPart, navCriteria: NavigationCriteria) : boolean
Lets the caller know if the latest serial or lot effectivity associated with any of the components in the passed BOM is already published. Besides, it validates the serial/lot effectivity assigned to each component in the BOM - if the effectivity on any of the components is found invalid, an exception is thrown.
validateUnitEffOnChangeable(part: WTPart, changeables: Hashtable<WTPart, String>, contextIterations: Hashtable<WTPart, String>, navCriteria: NavigationCriteria) : int
Lets the caller know if the latest unit effectivity associated with the passed part is valid. Throws as exception if an error occurred during the validation. Returns a value that indicates whether or not the unit effectivity associated with the passed part is valid.
* 
Part of the validation that occurs depends on the value of the Windchill ESI preference Validate Effectivity Context. See section Configurable Options for more information.
initialize()
Initializes the effectivity handler instance appropriately so it does not contain previously stored (and possibly stale) data. The default implementation does this by clearing the contents of certain collections that cache effectivity information.
Was this helpful?