wt.eff
Class EffGroupAssistant

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

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

Assistant for getting 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

See Also:
EffGroupAssistantEvent, EffGroupRangeDelegate, Serialized Form

Method Summary
static EffRecordable[] appendEffGroups(EffRecordable[] effRecordables, EffGroup[] effGroups)
          Adds the EffGroups to each of the EffManagedVersions.
static EffRecordable[] appendEffGroups(EffRecordable[] effRecordables, EffGroup[] effGroups, ChangeActivityIfc authorizedBy)
          Adds the EffGroups to each of the EffManagedVersions.
static EffRecordable[] appendEffGroupsQuietly(EffRecordable[] effRecordables, EffGroup[] effGroups)
          Adds the EffGroups to each of the EffManagedVersions.
static EffRecordable[] appendEffGroupsQuietly(EffRecordable[] effRecordables, EffGroup[] effGroups, ChangeActivityIfc authorizedBy)
          Adds the EffGroups to each of the EffManagedVersions.
static EffRecordable appendEffVector(EffRecordable effRecordable)
          Adds the effectivities represented by the EffGroups in the effVector to the EffManagedVersion.
static EffRecordable[] appendEffVector(EffRecordable[] effRecordables)
          Adds the effectivities represented by the EffGroups in the effVector to the EffManagedVersions.
static EffRecordable[] appendEffVector(EffRecordable[] effRecordables, ChangeActivityIfc authorizedBy)
          Adds the effectivities represented by the EffGroups in the effVector to the EffManagedVersions.
static EffRecordable appendEffVector(EffRecordable effRecordable, ChangeActivityIfc authorizedBy)
          Adds the effectivities represented by the EffGroups in the effVector to the EffManagedVersion.
static EffRecordable[] appendEffVectorQuietly(EffRecordable[] effRecordables)
          Adds the effectivities represented by the EffGroups in the effVector to the EffManagedVersions.
static EffRecordable[] appendEffVectorQuietly(EffRecordable[] effRecordables, ChangeActivityIfc authorizedBy)
          Adds the effectivities represented by the EffGroups in the effVector to the EffManagedVersions.
static String effRangesToRange(EffRange[] effRanges)
          Converts an array of EffRanges to a string representation of them.
static String getDash()
          Gets the value of the attribute: dash; The string value representing the dash for the range.
static Map<WTReference,Collection<EffGroup>> getEffGroups(Collection<WTReference> recordableReferences)
          Retrieves EffGroup objects for the passed in EffRecordable references.
static String getSeparator()
          Gets the value of the attribute: separator; The string value representing the separator for the range.
static EffGroup[] getValidEffGroups(EffContext effContext)
          Gets all the EffGroups (based on the valid Effs) for this context, and assigns the contex to it.
static EffGroup[] getValidEffGroups(EffManagedVersion target, EffContext effContext)
          Gets all the EffGroups (based on the valid Effs) for this context, and assigns the context and the version to it.
static EffRecordable populateEffVector(EffRecordable effRecordable)
          Populate the effVector of the EffManagedVersion by querying the database for all the version's effectivities and converting them to EffGroups.
static EffRecordable[] populateEffVector(EffRecordable[] effRecordables)
          Populate the effVectors of the EffManagedVersions by querying the database for all the version's effectivities and converting them to EffGroups.
static EffRecordable[] populateEffVectorWithoutRefreshing(EffRecordable[] 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 EffRecordable replaceEffVector(EffRecordable effRecordable)
          Replaces the current effectivities stored in the DB for this EffManagedVersion with the effectivities represented in the EffGroups in the effVector.
static EffRecordable[] replaceEffVector(EffRecordable[] effRecordables)
          Replaces the current effectivities stored in the DB for these EffManagedVersions with the effectivities represented in the EffGroups in the effVector.
static EffRecordable[] replaceEffVector(EffRecordable[] 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 EffRecordable replaceEffVector(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 EffRecordable[] replaceEffVectorQuietly(EffRecordable[] effRecordables)
          Replaces the current effectivities stored in the DB for these EffManagedVersions with the effectivities represented in the EffGroups in the effVector.
static EffRecordable[] replaceEffVectorQuietly(EffRecordable[] 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 void validateRange(Class effRange, String range)
          Validates the range.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSeparator

public static String 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

public static String 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

public static EffGroup[] getValidEffGroups(EffManagedVersion target,
                                           EffContext effContext)
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

public static EffGroup[] getValidEffGroups(EffContext effContext)
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:
EffGroupRangeDelegate

effRangesToRange

public static String effRangesToRange(EffRange[] effRanges)
                               throws WTPropertyVetoException
Converts an array of EffRanges to a string representation of them.

Supported API: true

Parameters:
effRanges -
Returns:
String
Throws:
WTPropertyVetoException
See Also:
EffGroupRangeDelegate

validateRange

public static void validateRange(Class effRange,
                                 String range)
                          throws WTPropertyVetoException
Validates the range.

Supported API: true

Parameters:
effRange -
range -
Throws:
WTPropertyVetoException
See Also:
EffGroupRangeDelegate

populateEffVector

public static EffRecordable populateEffVector(EffRecordable effRecordable)
                                       throws WTException
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

public static EffRecordable[] populateEffVector(EffRecordable[] 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 refreshed.

Supported API: true

Parameters:
effRecordables -
Returns:
EffRecordable[]
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:
EffGroupAssistantEvent

replaceEffVector

public static EffRecordable[] replaceEffVector(EffRecordable[] 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:
EffRecordable[]
Throws:
WTException
See Also:
EffGroupAssistantEvent

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:
EffGroupAssistantEvent

appendEffVector

public static EffRecordable[] appendEffVector(EffRecordable[] 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:
EffRecordable[]
Throws:
WTException
See Also:
EffGroupAssistantEvent

appendEffGroups

public static EffRecordable[] appendEffGroups(EffRecordable[] 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:
EffRecordable[]
Throws:
WTException
See Also:
EffGroupAssistantEvent

populateEffVectorWithoutRefreshing

public static EffRecordable[] populateEffVectorWithoutRefreshing(EffRecordable[] 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:
EffRecordable[]
Throws:
WTException

replaceEffVectorQuietly

public static EffRecordable[] replaceEffVectorQuietly(EffRecordable[] 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:
EffRecordable[]
Throws:
WTException

appendEffVectorQuietly

public static EffRecordable[] appendEffVectorQuietly(EffRecordable[] 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:
EffRecordable[]
Throws:
WTException

appendEffGroupsQuietly

public static EffRecordable[] appendEffGroupsQuietly(EffRecordable[] 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:
EffRecordable[]
Throws:
WTException

replaceEffVector

public static EffRecordable replaceEffVector(EffRecordable effRecordable)
                                      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 -
Returns:
EffRecordable
Throws:
WTException
See Also:
EffGroupAssistantEvent

replaceEffVector

public static EffRecordable[] replaceEffVector(EffRecordable[] effRecordables)
                                        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 -
Returns:
EffRecordable[]
Throws:
WTException
See Also:
EffGroupAssistantEvent

appendEffVector

public static EffRecordable appendEffVector(EffRecordable effRecordable)
                                     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 -
Returns:
EffRecordable
Throws:
WTException
See Also:
EffGroupAssistantEvent

appendEffVector

public static EffRecordable[] appendEffVector(EffRecordable[] effRecordables)
                                       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 -
Returns:
EffRecordable[]
Throws:
WTException
See Also:
EffGroupAssistantEvent

appendEffGroups

public static EffRecordable[] appendEffGroups(EffRecordable[] 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:
EffRecordable[]
Throws:
WTException
See Also:
EffGroupAssistantEvent

replaceEffVectorQuietly

public static EffRecordable[] replaceEffVectorQuietly(EffRecordable[] effRecordables)
                                               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 -
Returns:
EffRecordable[]
Throws:
WTException

appendEffVectorQuietly

public static EffRecordable[] appendEffVectorQuietly(EffRecordable[] effRecordables)
                                              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 -
Returns:
EffRecordable[]
Throws:
WTException

appendEffGroupsQuietly

public static EffRecordable[] appendEffGroupsQuietly(EffRecordable[] 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:
EffRecordable[]
Throws:
WTException

getEffGroups

public static Map<WTReference,Collection<EffGroup>> getEffGroups(Collection<WTReference> recordableReferences)
                                                          throws WTException
Retrieves EffGroup objects for the passed in EffRecordable references.



Supported API: true

Parameters:
recordableReferences - References to EffRecordable objects to retreive groups for.

Returns:
Map>
Throws:
WTException