Class EffGroupAssistant
- All Implemented Interfaces:
Externalizable,Serializable,RemoteAccess,wt.services.applicationcontext.ApplicationContextChild
EffGroups, converting EffRanges to and from Strings, and adding
the Effs associated to EffManagedVersions to EffGroups.
Provides client- and server-side APIs to assign Effs to EffManagedVersions. This assistant
provides a client/customization-friendly API to work with Effs without interacting with the data model
directly.
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionstatic WTCollectionappendEffGroups(WTCollection effRecordables, EffGroup[] effGroups) Adds the EffGroups to each of the EffManagedVersions.static WTCollectionappendEffGroups(WTCollection effRecordables, EffGroup[] effGroups, ChangeActivityIfc authorizedBy) Adds the EffGroups to each of the EffManagedVersions.static WTCollectionappendEffGroupsQuietly(WTCollection effRecordables, EffGroup[] effGroups) Adds the EffGroups to each of the EffManagedVersions.protected static WTCollectionappendEffGroupsQuietly(WTCollection effRecordables, EffGroup[] effGroups, ChangeActivityIfc authorizedBy) Adds the EffGroups to each of the EffManagedVersions.protected static EffRecordableappendEffVector(EffRecordable effRecordable) Adds the effectivities represented by the EffGroups in the effVector to the EffManagedVersion.static EffRecordableappendEffVector(EffRecordable effRecordable, ChangeActivityIfc authorizedBy) Adds the effectivities represented by the EffGroups in the effVector to the EffManagedVersion.static WTCollectionappendEffVector(WTCollection effRecordables) Adds the effectivities represented by the EffGroups in the effVector to the EffManagedVersions.protected static WTCollectionappendEffVector(WTCollection effRecordables, ChangeActivityIfc authorizedBy) Adds the effectivities represented by the EffGroups in the effVector to the EffManagedVersions.static WTCollectionappendEffVectorQuietly(WTCollection effRecordables) Adds the effectivities represented by the EffGroups in the effVector to the EffManagedVersions.protected static WTCollectionappendEffVectorQuietly(WTCollection effRecordables, ChangeActivityIfc authorizedBy) Adds the effectivities represented by the EffGroups in the effVector to the EffManagedVersions.static StringeffRangesToRange(EffRange[] effRanges) Converts an array of EffRanges to a string representation of them.static StringgetDash()Gets the value of the attribute: dash; The string value representing the dash for the range.static Map<WTReference,Collection<EffGroup>> getEffGroups(WTCollection recordableReferences) RetrievesEffGroupobjects for the passed in EffRecordable references.static Map<WTReference,Collection<EffGroup>> getEffGroups(WTCollection recordableReferences, boolean populateAuditInfo) RetrievesEffGroupobjects for the passed in EffRecordable references.static Map<WTReference,Collection<EffGroup>> getEffGroups(WTCollection recordableReferences, boolean populateAuditInfo, Class type) RetrievesEffGroupobjects for the passed in EffRecordable references.static StringGets the value of the attribute: separator; The string value representing the separator for the range.static EffGroup[]getValidEffGroups(ObjectReference effContext) Gets all the EffGroups (based on the valid Effs) for this context, and assigns the contex to it.static EffGroup[]getValidEffGroups(WTReference target, ObjectReference effContext) Gets all the EffGroups (based on the valid Effs) for this context, and assigns the context and the version to it.static EffRecordablepopulateEffVector(EffRecordable effRecordable) Populate the effVector of the EffManagedVersion by querying the database for all the version's effectivities and converting them to EffGroups.static WTCollectionpopulateEffVector(WTCollection effRecordables) Populate the effVectors of the EffManagedVersions by querying the database for all the version's effectivities and converting them to EffGroups.static WTCollectionpopulateEffVectorWithoutRefreshing(WTCollection effRecordables) Populate the effVectors of the EffManagedVersions by querying the database for all the version's effectivities and converting them to EffGroups.static EffRange[]rangeToEffRanges(Class effRange, String range) Converts a range to an array of EffRanges.static EffRecordablereplaceEffVector(EffRecordable effRecordable) Replaces the current effectivities stored in the DB for this EffManagedVersion with the effectivities represented in the EffGroups in the effVector.static EffRecordablereplaceEffVector(EffRecordable effRecordable, ChangeActivityIfc authorizedBy) Replaces the current effectivities stored in the DB for this EffManagedVersion with the effectivities represented in the EffGroups in the effVector.static WTCollectionreplaceEffVector(WTCollection effRecordables) Replaces the current effectivities stored in the DB for these EffManagedVersions with the effectivities represented in the EffGroups in the effVector.static WTCollectionreplaceEffVector(WTCollection effRecordables, ChangeActivityIfc authorizedBy) Replaces the current effectivities stored in the DB for these EffManagedVersions with the effectivities represented in the EffGroups in the effVector.static WTCollectionreplaceEffVectorQuietly(WTCollection effRecordables) Replaces the current effectivities stored in the DB for these EffManagedVersions with the effectivities represented in the EffGroups in the effVector.static WTCollectionreplaceEffVectorQuietly(WTCollection effRecordables, ChangeActivityIfc authorizedBy) Replaces the current effectivities stored in the DB for these EffManagedVersions with the effectivities represented in the EffGroups in the effVector.static voidvalidateRange(Class effRange, String range) Validates the range.
-
Method Details
-
getSeparator
Gets the value of the attribute: separator; The string value representing the separator for the range. For example, the comma in the following string is the separator "8, 10".
The value for the separator is locale-specific and is obtained from effResource's SEPARATOR constant.
Supported API: true- Returns:
- String
- See Also:
-
effResource
-
getDash
Gets the value of the attribute: dash; The string value representing the dash for the range. For example, the hyphen in the following string is the dash "8- 10".
The value for the separator is locale-specific and is obtained from effResource's DASH constant.
Supported API: true- Returns:
- String
- See Also:
-
effResource
-
getValidEffGroups
Gets all the EffGroups (based on the valid Effs) for this context, and assigns the context and the version to it.
Supported API: true- Parameters:
target-effContext-- Returns:
- EffGroup[]
-
getValidEffGroups
Gets all the EffGroups (based on the valid Effs) for this context, and assigns the contex to it.
Supported API: true- Parameters:
effContext-- Returns:
- EffGroup[]
-
rangeToEffRanges
public static EffRange[] rangeToEffRanges(Class effRange, String range) throws WTPropertyVetoException Converts a range to an array of EffRanges.
The following range would be converted to start-end values as follows:
8, 10-12, 15-
8-8
10-12
15-
Supported API: true- Parameters:
effRange-range-- Returns:
- EffRange[]
- Throws:
WTPropertyVetoException- See Also:
-
effRangesToRange
Converts an array of EffRanges to a string representation of them.
Supported API: true- Parameters:
effRanges-- Returns:
- String
- Throws:
WTPropertyVetoException- See Also:
-
validateRange
Validates the range.
Supported API: true- Parameters:
effRange-range-- Throws:
WTPropertyVetoException- See Also:
-
populateEffVector
Populate the effVector of the EffManagedVersion by querying the database for all the version's effectivities and converting them to EffGroups. The version is refreshed.
Supported API: true- Parameters:
effRecordable-- Returns:
- EffRecordable
- Throws:
WTException
-
populateEffVector
Populate the effVectors of the EffManagedVersions by querying the database for all the version's effectivities and converting them to EffGroups. The versions are refreshed.
Supported API: true- Parameters:
effRecordables-- Returns:
- WTCollection
- Throws:
WTException
-
replaceEffVector
public static EffRecordable replaceEffVector(EffRecordable effRecordable, ChangeActivityIfc authorizedBy) throws WTException Replaces the current effectivities stored in the DB for this EffManagedVersion with the effectivities represented in the EffGroups in the effVector. populateEffVector should be used to get the existing ones first, then the user would edit the contents by adding and deleting EffGroups and updating the ranges. This allows simple interaction without batch containers. Returns a fully-populated effVector.Dispatches EffGroupAssistantEvent's PRE_REPLACE_EFF_VECTOR and POST_REPLACE_EFF_VECTOR.
Supported API: true- Parameters:
effRecordable-authorizedBy-- Returns:
- EffRecordable
- Throws:
WTException- See Also:
-
replaceEffVector
public static WTCollection replaceEffVector(WTCollection effRecordables, ChangeActivityIfc authorizedBy) throws WTException Replaces the current effectivities stored in the DB for these EffManagedVersions with the effectivities represented in the EffGroups in the effVector. populateEffVector should be used to get the existing ones first, then the user would edit the contents by adding and deleting EffGroups and updating the ranges. This allows simple interaction without batch containers. Returns a fully-populated effVector in each EffManagedVersion.Dispatches EffGroupAssistantEvent's PRE_REPLACE_EFF_VECTOR and POST_REPLACE_EFF_VECTOR.
Supported API: true- Parameters:
effRecordables-authorizedBy-- Returns:
- WTCollection
- Throws:
WTException- See Also:
-
appendEffVector
public static EffRecordable appendEffVector(EffRecordable effRecordable, ChangeActivityIfc authorizedBy) throws WTException Adds the effectivities represented by the EffGroups in the effVector to the EffManagedVersion. Returns a fully-populated effVector.Dispatches EffGroupAssistantEvent's PRE_APPEND_EFF_VECTOR and POST_APPEND_EFF_VECTOR.
Supported API: true- Parameters:
effRecordable-authorizedBy-- Returns:
- EffRecordable
- Throws:
WTException- See Also:
-
appendEffVector
protected static WTCollection appendEffVector(WTCollection effRecordables, ChangeActivityIfc authorizedBy) throws WTException Adds the effectivities represented by the EffGroups in the effVector to the EffManagedVersions. Returns a fully-populated effVector in each EffManagedVersion.Emits EffGroupAssistantEvent's PRE_APPEND_EFF_VECTOR and POST_APPEND_EFF_VECTOR.
Supported API: true- Parameters:
effRecordables-authorizedBy-- Returns:
- WTCollection
- Throws:
WTException- See Also:
-
appendEffGroups
public static WTCollection appendEffGroups(WTCollection effRecordables, EffGroup[] effGroups, ChangeActivityIfc authorizedBy) throws WTException Adds the EffGroups to each of the EffManagedVersions. Returns a fully-populated effVector in each EffManagedVersion.Emits EffGroupAssistantEvent's PRE_APPEND_EFF_GROUPS and POST_APPEND_EFF_GROUPS.
Supported API: true- Parameters:
effRecordables-effGroups-authorizedBy-- Returns:
- WTCollection
- Throws:
WTException- See Also:
-
populateEffVectorWithoutRefreshing
public static WTCollection populateEffVectorWithoutRefreshing(WTCollection effRecordables) throws WTException Populate the effVectors of the EffManagedVersions by querying the database for all the version's effectivities and converting them to EffGroups. The versions are not refreshed.
Supported API: true- Parameters:
effRecordables-- Returns:
- WTCollection
- Throws:
WTException
-
replaceEffVectorQuietly
public static WTCollection replaceEffVectorQuietly(WTCollection effRecordables, ChangeActivityIfc authorizedBy) throws WTException Replaces the current effectivities stored in the DB for these EffManagedVersions with the effectivities represented in the EffGroups in the effVector. populateEffVector should be used to get the existing ones first, then the user would edit the contents by adding and deleting EffGroups and updating the ranges. This allows simple interaction without batch containers. Returns a fully-populated effVector in each EffManagedVersion.No events are emitted by this call.
Supported API: true- Parameters:
effRecordables-authorizedBy-- Returns:
- WTCollection
- Throws:
WTException
-
appendEffVectorQuietly
protected static WTCollection appendEffVectorQuietly(WTCollection effRecordables, ChangeActivityIfc authorizedBy) throws WTException Adds the effectivities represented by the EffGroups in the effVector to the EffManagedVersions. Returns a fully-populated effVector in each EffManagedVersion.No events are emitted by this call.
Supported API: true- Parameters:
effRecordables-authorizedBy-- Returns:
- WTCollection
- Throws:
WTException
-
appendEffGroupsQuietly
protected static WTCollection appendEffGroupsQuietly(WTCollection effRecordables, EffGroup[] effGroups, ChangeActivityIfc authorizedBy) throws WTException Adds the EffGroups to each of the EffManagedVersions. Returns a fully-populated effVector in each EffManagedVersion.No events are emitted by this call.
Supported API: true- Parameters:
effRecordables-effGroups-authorizedBy-- Returns:
- WTCollection
- Throws:
WTException
-
replaceEffVector
Replaces the current effectivities stored in the DB for this EffManagedVersion with the effectivities represented in the EffGroups in the effVector. populateEffVector should be used to get the existing ones first, then the user would edit the contents by adding and deleting EffGroups and updating the ranges. This allows simple interaction without batch containers. Returns a fully-populated effVector.Dispatches EffGroupAssistantEvent's PRE_REPLACE_EFF_VECTOR and POST_REPLACE_EFF_VECTOR.
Supported API: true- Parameters:
effRecordable-- Returns:
- EffRecordable
- Throws:
WTException- See Also:
-
replaceEffVector
Replaces the current effectivities stored in the DB for these EffManagedVersions with the effectivities represented in the EffGroups in the effVector. populateEffVector should be used to get the existing ones first, then the user would edit the contents by adding and deleting EffGroups and updating the ranges. This allows simple interaction without batch containers. Returns a fully-populated effVector in each EffManagedVersion.Dispatches EffGroupAssistantEvent's PRE_REPLACE_EFF_VECTOR and POST_REPLACE_EFF_VECTOR.
Supported API: true- Parameters:
effRecordables-- Returns:
- WTCollection
- Throws:
WTException- See Also:
-
appendEffVector
Adds the effectivities represented by the EffGroups in the effVector to the EffManagedVersion. Returns a fully-populated effVector.Dispatches EffGroupAssistantEvent's PRE_APPEND_EFF_VECTOR and POST_APPEND_EFF_VECTOR.
Supported API: true- Parameters:
effRecordable-- Returns:
- EffRecordable
- Throws:
WTException- See Also:
-
appendEffVector
Adds the effectivities represented by the EffGroups in the effVector to the EffManagedVersions. Returns a fully-populated effVector in each EffManagedVersion.Emits EffGroupAssistantEvent's PRE_APPEND_EFF_VECTOR and POST_APPEND_EFF_VECTOR.
Supported API: true- Parameters:
effRecordables-- Returns:
- WTCollection
- Throws:
WTException- See Also:
-
appendEffGroups
public static WTCollection appendEffGroups(WTCollection effRecordables, EffGroup[] effGroups) throws WTException Adds the EffGroups to each of the EffManagedVersions. Returns a fully-populated effVector in each EffManagedVersion.Emits EffGroupAssistantEvent's PRE_APPEND_EFF_GROUPS and POST_APPEND_EFF_GROUPS.
Supported API: true- Parameters:
effRecordables-effGroups-- Returns:
- WTCollection
- Throws:
WTException- See Also:
-
replaceEffVectorQuietly
Replaces the current effectivities stored in the DB for these EffManagedVersions with the effectivities represented in the EffGroups in the effVector. populateEffVector should be used to get the existing ones first, then the user would edit the contents by adding and deleting EffGroups and updating the ranges. This allows simple interaction without batch containers. Returns a fully-populated effVector in each EffManagedVersion.No events are emitted by this call.
Supported API: true- Parameters:
effRecordables-- Returns:
- WTCollection
- Throws:
WTException
-
appendEffVectorQuietly
Adds the effectivities represented by the EffGroups in the effVector to the EffManagedVersions. Returns a fully-populated effVector in each EffManagedVersion.No events are emitted by this call.
Supported API: true- Parameters:
effRecordables-- Returns:
- WTCollection
- Throws:
WTException
-
appendEffGroupsQuietly
public static WTCollection appendEffGroupsQuietly(WTCollection effRecordables, EffGroup[] effGroups) throws WTException Adds the EffGroups to each of the EffManagedVersions. Returns a fully-populated effVector in each EffManagedVersion.No events are emitted by this call.
Supported API: true- Parameters:
effRecordables-effGroups-- Returns:
- WTCollection
- Throws:
WTException
-
getEffGroups
public static Map<WTReference,Collection<EffGroup>> getEffGroups(WTCollection recordableReferences) throws WTException RetrievesEffGroupobjects for the passed in EffRecordable references.
Supported API: true- Parameters:
recordableReferences- References to EffRecordable objects to retreive groups for.- Returns:
- Map<WTReference,Collection
> - Throws:
WTException
-
getEffGroups
public static Map<WTReference,Collection<EffGroup>> getEffGroups(WTCollection recordableReferences, boolean populateAuditInfo, Class type) throws WTException RetrievesEffGroupobjects for the passed in EffRecordable references.
Supported API: true- Parameters:
recordableReferences- References to EffRecordable objects to retreive groups for.populateAuditInfo-type- This represents the type of effectiivty to search for. For example, if you want Date effectivity, use WTDatedEffectivity- Returns:
- Map<WTReference,Collection
> - Throws:
WTException
-
getEffGroups
public static Map<WTReference,Collection<EffGroup>> getEffGroups(WTCollection recordableReferences, boolean populateAuditInfo) throws WTException RetrievesEffGroupobjects for the passed in EffRecordable references.
Supported API: true- Parameters:
recordableReferences- References to EffRecordable objects to retreive groups for.- Returns:
- Map<WTReference,Collection
> - Throws:
WTException
-