Package de.hybris.platform.patches.utils
Class PatchExecutionUnitUtils
- java.lang.Object
-
- de.hybris.platform.patches.utils.PatchExecutionUnitUtils
-
public final class PatchExecutionUnitUtils extends java.lang.ObjectUtility for PatchExecution unit fields generation.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgenerateHashId(java.lang.String name, ImportOrganisationUnit organisationUnit, PatchExecutionModel patchExecution)Generates a hash based on three passed parameters.static java.lang.StringgenerateHashId(java.lang.String name, java.lang.String organisationUnitRepresentation, PatchExecutionModel patchExecution)Generates a hash based on three passed parameters.static java.lang.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 Detail
-
generateOrganisationUnitName
public static java.lang.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 java.lang.String generateHashId(java.lang.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 java.lang.String generateHashId(java.lang.String name, java.lang.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
public static int getNextUnitNumber(PatchExecutionModel patchExecution)
Returns a number of importedPatchExecutionUnitModelincremented by 1.- Parameters:
patchExecution- patch execution model- Returns:
- number of
PatchExecutionUnitModel+ 1
-
-