wt.eff
Class EffHelper

java.lang.Object
  extended by wt.eff.EffHelper
All Implemented Interfaces:
Externalizable, Serializable, wt.services.applicationcontext.ApplicationContextChild

public class EffHelper
extends Object
implements wt.services.applicationcontext.ApplicationContextChild, Externalizable

This helper is used to access an implementation of EffService via the static reference EffHelper.service. Other functionality is provided by EffConfigSpecAssistant and EffGroupAssistant.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
static EffService service
          

Supported API: true
 
Method Summary
static boolean equals(Eff e1, Eff e2)
          Returns true if and only if the argument Eff objects are equal (that is, their respective range values are equal).
static Class getEffRange(Class effClass)
          For a given Eff class, returns the valid EffRange class.
static Class getEffRangeType(Class rangeClass)
          For a given EffRange class, returns the datatype for start/end.
static Class<? extends EffForm>[] getValidEffForms(EffContext effContext)
          Returns array of valid EffForm classes for the passed in EffContext.
static Class[] getValidEffs(Class parentType, EffContext context)
          Returns all EffRecord classes that are valid in the given context and of the specified parent type.
static Class[] getValidEffs(EffContext context)
          Returns all Eff classes that are valid in the given context.
static boolean isContextRequired(Class effClass)
          Returns true if the Eff class requires a context (has cardinality 1).
static boolean isCurrent(Eff eff)
          Returns true if and only if the argument Eff object is current (i.e., it has not been factually deleted and thus relegated to effectivity history).
static boolean isLegacy(Eff eff)
          Returns true if and only if the argument Eff object is legacy (i.e., it does not reference a valid creation EffChangeAudit object).
static boolean isValidEffTarget(Changeable2 changeable)
          Returns true if the changeable passed in is a valid effectivity target, and false otherwise.
static boolean isValidEffTarget(EffManagedVersion effManagedVersion)
          Returns true if the object passed in is a valid effectivity target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

service

public static final EffService service


Supported API: true

Method Detail

getValidEffs

public static Class[] getValidEffs(EffContext context)
Returns all Eff classes that are valid in the given context. If context is null, returns only effs that are optional (have a 0..1 cardinality). The ValidEffsDelegate is used to process this.

Supported API: true

Parameters:
context -
Returns:
Class[]

getValidEffs

public static Class[] getValidEffs(Class parentType,
                                   EffContext context)
Returns all EffRecord classes that are valid in the given context and of the specified parent type. If context is null, returns only eff record types that are optional (have a 0..1 cardinality). The ValidEffsDelegate is used to process this.

Supported API: true

Parameters:
parentType -
context -
Returns:
Class[]

getEffRange

public static Class getEffRange(Class effClass)
For a given Eff class, returns the valid EffRange class.

Supported API: true

Parameters:
effClass -
Returns:
Class

getEffRangeType

public static Class getEffRangeType(Class rangeClass)
For a given EffRange class, returns the datatype for start/end.

Supported API: true

Parameters:
rangeClass -
Returns:
Class

isContextRequired

public static boolean isContextRequired(Class effClass)
Returns true if the Eff class requires a context (has cardinality 1).

Supported API: true

Parameters:
effClass -
Returns:
boolean

isCurrent

public static boolean isCurrent(Eff eff)
Returns true if and only if the argument Eff object is current (i.e., it has not been factually deleted and thus relegated to effectivity history).

Supported API: true

Parameters:
eff - Eff object whose status as current or historical is to be determined -- may not be null
Returns:
boolean

isLegacy

public static boolean isLegacy(Eff eff)
Returns true if and only if the argument Eff object is legacy (i.e., it does not reference a valid creation EffChangeAudit object).

Supported API: true

Parameters:
eff - Eff object whose status as legacy is to be determined -- may not be null
Returns:
boolean

equals

public static boolean equals(Eff e1,
                             Eff e2)
Returns true if and only if the argument Eff objects are equal (that is, their respective range values are equal).

Supported API: true

Parameters:
e1 - Eff object to be compared to the other Eff argument for equality -- may not be null
e2 - Eff object to be compared to the other Eff argument for equality -- may not be null
Returns:
boolean

isValidEffTarget

public static boolean isValidEffTarget(Changeable2 changeable)
Returns true if the changeable passed in is a valid effectivity target, and false otherwise. If the changeable implements EffManagedVersion, the method will delegate to the overloaded method taking an EffManagedVersion. Returns false otherwise.



Supported API: true

Parameters:
changeable - Changeable2 participating in change-related association
Returns:
boolean

isValidEffTarget

public static boolean isValidEffTarget(EffManagedVersion effManagedVersion)
Returns true if the object passed in is a valid effectivity target. For parts with its nonEffective attribute set to true, the method returns false.



Supported API: true

Parameters:
effManagedVersion - Some EffManagedVersion object.
Returns:
boolean

getValidEffForms

public static Class<? extends EffForm>[] getValidEffForms(EffContext effContext)
Returns array of valid EffForm classes for the passed in EffContext. If the context is not null, a call to the ValidEffsDelegate will be made to obtain the valid forms for the context. The default delegate bases the result on the trace code of WTPartMaster contexts, and returns a default set for other contexts. If the context is null, a set of valid forms for non-contextual effectivity forms is returned.



Supported API: true

Parameters:
effContext - effectivity context; may be null
Returns:
Class[]