com.adobe.icc.dbforms.util
Class ModuleUtil

java.lang.Object
  extended by com.adobe.icc.dbforms.util.ModuleUtil

public class ModuleUtil
extends java.lang.Object

Utility class for module related operations


Nested Class Summary
static class ModuleUtil.UniqueVariable
          A UniqueVar represents a Variable inside a TextModule or Condition Control Variable(It's combination that makes it unique.
static class ModuleUtil.VariableInfo
           
 
Constructor Summary
ModuleUtil()
           
 
Method Summary
static boolean addDefaultVariableAssignment(java.util.Set varAssgnmnts, Variable v, boolean autoCorrected)
           
static void checkModuleReferences(java.util.Set tasSet, java.util.Set faSet, java.util.Map removedModulesAndUniqueVars, java.lang.String skipModuleName)
           
static void cleanupVariableAssignments(java.util.Set variableAssignments)
           
static void copyVariableIds(DataModule oldDM, DataModule newDM)
           
static java.lang.String extractExpressionContent(java.lang.String content)
          Extracts the first repeatable item from the given string content input.
static java.lang.String[] extractRepeatableItem(java.lang.String content)
          Extracts the first repeatable item from the given string content input.
static void findUsedModules(java.util.Map allDMmap, DataModule dm, boolean fetchIndirectReferences)
          (Recursively) Find the list of modules used by the given data module.
static void findVariablesInContent(java.util.List vars, java.lang.String content)
          Populates the given list with the list of variables found in the content.
static java.util.Set getAllVariables(DataModule dataModule)
          Returns the entire list of variables in a data module, digging deep into its hierarchy.
static java.util.Map getVariablesInNonRHSDataModules(Letter letter)
          This API fetches variables that are present in the modules assigned to the target area assignments.
static boolean isUpdateDependenciesRequired(DataModule oldDM, DataModule newDM)
           
static void populateModuleVarDiffInfo(DataModule oldDM, DataModule newDM, java.util.Map addedUniqueVarToVariable, java.util.Map removedUniqueVarToVariable, java.util.Map oldUniqueVarToNewVariable, java.util.Map oldUniqueVarToOldVariable)
           
static void updateReferredVASProperties(VariableAssignment referringVAS, VariableAssignment vasTobeRemoved)
           
static void updateRefsForVariableRemoval(java.util.Set varsToBeRemoved, java.util.Set curLetterVarAssgnmnts)
           
static void updateVariableAssignmentForVariableRemoval(java.util.Set varTobeRemovedIDs, java.util.Set varAssgnmnts)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleUtil

public ModuleUtil()
Method Detail

getAllVariables

public static java.util.Set getAllVariables(DataModule dataModule)
Returns the entire list of variables in a data module, digging deep into its hierarchy.

Parameters:
dataModule - Data module whose variables are to be retrieved.
Returns:
Set of variables in this module.

findUsedModules

public static void findUsedModules(java.util.Map allDMmap,
                                   DataModule dm,
                                   boolean fetchIndirectReferences)
(Recursively) Find the list of modules used by the given data module.


extractRepeatableItem

public static java.lang.String[] extractRepeatableItem(java.lang.String content)
Extracts the first repeatable item from the given string content input.

Parameters:
content - the content in which to find the repeatable content
Returns:
The complete repeatable string as well as the actual repeating string at the top level (i.e., ignoring the nested repeats within it).

[0] = the entire repeating content
[1] = the actual repeating content (ignoring nested repeating content)

extractExpressionContent

public static java.lang.String extractExpressionContent(java.lang.String content)
Extracts the first repeatable item from the given string content input.

Parameters:
content - the content in which to find the repeatable content
Returns:
The complete repeatable string as well as the actual repeating string at the top level (i.e., ignoring the nested repeats within it).

[0] = the entire repeating content
[1] = the actual repeating content (ignoring nested repeating content)

findVariablesInContent

public static void findVariablesInContent(java.util.List vars,
                                          java.lang.String content)
Populates the given list with the list of variables found in the content.

Parameters:
vars - List that will be populated with variables. Should not be NULL.
content - The content in which to search for variables.

updateRefsForVariableRemoval

public static void updateRefsForVariableRemoval(java.util.Set varsToBeRemoved,
                                                java.util.Set curLetterVarAssgnmnts)

updateReferredVASProperties

public static void updateReferredVASProperties(VariableAssignment referringVAS,
                                               VariableAssignment vasTobeRemoved)

updateVariableAssignmentForVariableRemoval

public static void updateVariableAssignmentForVariableRemoval(java.util.Set varTobeRemovedIDs,
                                                              java.util.Set varAssgnmnts)

checkModuleReferences

public static void checkModuleReferences(java.util.Set tasSet,
                                         java.util.Set faSet,
                                         java.util.Map removedModulesAndUniqueVars,
                                         java.lang.String skipModuleName)

isUpdateDependenciesRequired

public static boolean isUpdateDependenciesRequired(DataModule oldDM,
                                                   DataModule newDM)
                                            throws ICCException
Throws:
ICCException

populateModuleVarDiffInfo

public static void populateModuleVarDiffInfo(DataModule oldDM,
                                             DataModule newDM,
                                             java.util.Map addedUniqueVarToVariable,
                                             java.util.Map removedUniqueVarToVariable,
                                             java.util.Map oldUniqueVarToNewVariable,
                                             java.util.Map oldUniqueVarToOldVariable)

cleanupVariableAssignments

public static void cleanupVariableAssignments(java.util.Set variableAssignments)

getVariablesInNonRHSDataModules

public static java.util.Map getVariablesInNonRHSDataModules(Letter letter)
This API fetches variables that are present in the modules assigned to the target area assignments. Variables present in the modules present on the RHS of variable and field assignments are not returned.

Parameters:
letter -
Returns:

copyVariableIds

public static void copyVariableIds(DataModule oldDM,
                                   DataModule newDM)

addDefaultVariableAssignment

public static boolean addDefaultVariableAssignment(java.util.Set varAssgnmnts,
                                                   Variable v,
                                                   boolean autoCorrected)


[an error occurred while processing this directive] [an error occurred while processing this directive]