Package wt.eff

Class EffGroupAssistant

java.lang.Object
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:
  • Method Details

    • 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(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.

      Supported API: true
      Parameters:
      target -
      effContext -
      Returns:
      EffGroup[]
    • getValidEffGroups

      public static EffGroup[] getValidEffGroups(ObjectReference 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:
    • 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:
    • validateRange

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

      Supported API: true
      Parameters:
      effRange -
      range -
      Throws:
      WTPropertyVetoException
      See Also:
    • 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 WTCollection populateEffVector(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 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

      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:
    • replaceEffVector

      public static WTCollection replaceEffVector(WTCollection 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:
      WTCollection
      Throws:
      WTException
      See Also:
    • appendEffVector

      protected 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:
    • appendEffVector

      public static WTCollection appendEffVector(WTCollection 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:
      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

      public static WTCollection replaceEffVectorQuietly(WTCollection 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:
      WTCollection
      Throws:
      WTException
    • appendEffVectorQuietly

      public static WTCollection appendEffVectorQuietly(WTCollection 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:
      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
      Retrieves EffGroup objects 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
      Retrieves EffGroup objects 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
      Retrieves EffGroup objects 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