Class PatchExecutionUnitUtils

java.lang.Object
de.hybris.platform.patches.utils.PatchExecutionUnitUtils

public final class PatchExecutionUnitUtils extends Object
Utility for PatchExecution unit fields generation.
  • Method Details

    • generateOrganisationUnitName

      public static String generateOrganisationUnitName(ImportOrganisationUnit organisationUnit)
      Generate a organisation unit name based on the organisation hierarchy.
      Parameters:
      organisationUnit - an organisation unit object
      Returns:
      full organisation units chain from the top to the bottom.
    • generateHashId

      public static String generateHashId(String name, ImportOrganisationUnit organisationUnit, PatchExecutionModel patchExecution)
      Generates a hash based on three passed parameters.
      Parameters:
      name - a name of an action
      organisationUnit - organisation unit representation
      patchExecution - patch execution model
      Returns:
      generated hash used as a unique field for PatchExecutionUnitModel
    • generateHashId

      public static String generateHashId(String name, String organisationUnitRepresentation, PatchExecutionModel patchExecution)
      Generates a hash based on three passed parameters.
      Parameters:
      name - a name of an action
      organisationUnitRepresentation - organisation unit chain
      patchExecution - patch execution model
      Returns:
      generated hash used as a unique field for PatchExecutionUnitModel
    • getNextUnitNumber

      public static int getNextUnitNumber(PatchExecutionModel patchExecution)
      Returns a number of imported PatchExecutionUnitModel incremented by 1.
      Parameters:
      patchExecution - patch execution model
      Returns:
      number of PatchExecutionUnitModel + 1