Class StructureStateUtils

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Set<ImportLanguage> getAllGlobalLanguages​(ImportOrganisationUnit[] units, StructureState structureState)
      This method returns set of languages that were defined for ImportOrganisationUnit-s introduced until given structureState (including).
      static java.util.Set<ImportLanguage> getNewGlobalLanguages​(ImportOrganisationUnit[] units, StructureState structureState)
      This method returns set of languages that were defined for ImportOrganisationUnit introduced in given structureState (and were not used in any structureState before).
      It means that: languages that were used by organisation that were defined in given structureState are added to result languages that were used by organisation that were defined in previous structureStates are extracted from result
      static java.util.Set<ImportLanguage> getNewLanguages​(ImportOrganisationUnit unit, StructureState structureState)
      This method returns set of languages that were defined for child ImportOrganisationUnit introduced in given structureState (and were not used in any structureState before).
      static java.util.List<StructureState> getStructureStateGap​(StructureState currentStructureState, StructureState executedStructureState)
      This method returns list of StructureState that is between executedStructureState (excluding) and currentStructureState (including).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getNewGlobalLanguages

        public static java.util.Set<ImportLanguage> getNewGlobalLanguages​(ImportOrganisationUnit[] units,
                                                                          StructureState structureState)
        This method returns set of languages that were defined for ImportOrganisationUnit introduced in given structureState (and were not used in any structureState before).
        It means that:
        • languages that were used by organisation that were defined in given structureState are added to result
        • languages that were used by organisation that were defined in previous structureStates are extracted from result
        Parameters:
        units - array of all units in the system, regardless of structureState for which these were defined
        structureState - structureState for which languages are checked StructureState
        Returns:
        set of ImportLanguage that are new for given structureState
      • getAllGlobalLanguages

        public static java.util.Set<ImportLanguage> getAllGlobalLanguages​(ImportOrganisationUnit[] units,
                                                                          StructureState structureState)
        This method returns set of languages that were defined for ImportOrganisationUnit-s introduced until given structureState (including).
        It means that:
        • languages that were used by organisation that were defined in given or previous structureState are added to result
        Parameters:
        units - array of all units in the system, regardless of structureState for which these were defined
        structureState - structureState for which languages are checked StructureState
        Returns:
        set of ImportLanguage that were defined until given structureState
      • getNewLanguages

        public static java.util.Set<ImportLanguage> getNewLanguages​(ImportOrganisationUnit unit,
                                                                    StructureState structureState)
        This method returns set of languages that were defined for child ImportOrganisationUnit introduced in given structureState (and were not used in any structureState before).
        Parameters:
        unit - that children are checked
        structureState - that children are checked against
        Returns:
        set of all languages defined in children organisation in given structureState without languages that were defined earlier
      • getStructureStateGap

        public static java.util.List<StructureState> getStructureStateGap​(StructureState currentStructureState,
                                                                          StructureState executedStructureState)
        This method returns list of StructureState that is between executedStructureState (excluding) and currentStructureState (including). In case currentStructureState equals executedStructureState an empty list is returned.
        Parameters:
        currentStructureState - StructureState currently imported
        executedStructureState - StructureState that were already imported for previous patch
        Returns:
        list of StructureStates