Package de.hybris.platform.patches.utils
Class PatchExecutionUnitUtils
java.lang.Object
de.hybris.platform.patches.utils.PatchExecutionUnitUtils
Utility for PatchExecution unit fields generation.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgenerateHashId(String name, ImportOrganisationUnit organisationUnit, PatchExecutionModel patchExecution) Generates a hash based on three passed parameters.static StringgenerateHashId(String name, String organisationUnitRepresentation, PatchExecutionModel patchExecution) Generates a hash based on three passed parameters.static StringgenerateOrganisationUnitName(ImportOrganisationUnit organisationUnit) Generate a organisation unit name based on the organisation hierarchy.static intgetNextUnitNumber(PatchExecutionModel patchExecution) Returns a number of importedPatchExecutionUnitModelincremented by 1.
-
Method Details
-
generateOrganisationUnitName
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 actionorganisationUnit- organisation unit representationpatchExecution- 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 actionorganisationUnitRepresentation- organisation unit chainpatchExecution- patch execution model- Returns:
- generated hash used as a unique field for
PatchExecutionUnitModel
-
getNextUnitNumber
Returns a number of importedPatchExecutionUnitModelincremented by 1.- Parameters:
patchExecution- patch execution model- Returns:
- number of
PatchExecutionUnitModel+ 1
-