Package de.hybris.platform.patches
Class AbstractPatch
java.lang.Object
de.hybris.platform.patches.AbstractPatch
- All Implemented Interfaces:
Patch
- Direct Known Subclasses:
AbstractDemoPatch
Base class for all new patches.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PatchActionprotected Stringprotected Stringprotected Releaseprotected PatchActionprotected StructureState -
Constructor Summary
ConstructorsConstructorDescriptionAbstractPatch(String patchId, String patchName, Release release, StructureState structureState) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecuteUpdateOnDB(String actionName, String query) Executes direct SQL update for specified query.protected voidexecuteUpdateOnDB(String actionName, String query, ImportOrganisationUnit organisationUnit) Executes direct SQL update for specified query.Returns Patch description.Returns unique patch id (e.g PD_V_1.0.1).Returns Patch name.Gets release that patch is part of.GetsStructureStatefrom this patchprotected voidimportData(String fileName, ImportOrganisationUnit organisationUnit, Collection<ImportLanguage> languages, boolean runAgain, ImpexImportUnitOption[] importOptions, ImpexHeaderOption[][] headerOptions) Imports impex data for given organisation and languages.protected voidimportGlobalData(String fileName, Collection<ImportLanguage> languages, boolean runAgain) Imports global impex data for given languages.protected voidimportGlobalData(String fileName, Collection<ImportLanguage> languages, boolean runAgain, ImpexImportUnitOption[] importOptions) Imports global impex data for given languages.voidsetImportPatchAction(PatchAction importPatchAction) voidsetSqlCommandPatchAction(PatchAction sqlCommandPatchAction) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.patches.Patch
createEssentialData, createProjectData
-
Field Details
-
patchId
-
patchName
-
release
-
structureState
-
importPatchAction
-
sqlCommandPatchAction
-
-
Constructor Details
-
AbstractPatch
public AbstractPatch(String patchId, String patchName, Release release, StructureState structureState)
-
-
Method Details
-
importGlobalData
protected void importGlobalData(String fileName, Collection<ImportLanguage> languages, boolean runAgain) Imports global impex data for given languages.- Parameters:
fileName- of impex to be importedlanguages- for which data should be importedrunAgain- if patch should be executed again
-
importGlobalData
protected void importGlobalData(String fileName, Collection<ImportLanguage> languages, boolean runAgain, ImpexImportUnitOption[] importOptions) Imports global impex data for given languages.- Parameters:
fileName- of impex to be importedlanguages- for which data should be importedrunAgain- if patch should be executed againimportOptions- optional set of options that define how impex should be executed
-
importData
protected void importData(String fileName, ImportOrganisationUnit organisationUnit, Collection<ImportLanguage> languages, boolean runAgain, ImpexImportUnitOption[] importOptions, ImpexHeaderOption[][] headerOptions) Imports impex data for given organisation and languages.- Parameters:
fileName- of impex to be importedorganisationUnit- for which data should be importedlanguages- for which data should be importedrunAgain- if patch should be executed againimportOptions- optional set of options that define how impex should be executedheaderOptions- additional header options
-
executeUpdateOnDB
Executes direct SQL update for specified query.- Parameters:
actionName- a human-readable name of the action.query- to be executed on DB (directly, not through hybris ORM)
-
executeUpdateOnDB
protected void executeUpdateOnDB(String actionName, String query, ImportOrganisationUnit organisationUnit) Executes direct SQL update for specified query.- Parameters:
actionName- a human-readable name of the action.query- to be executed on DB (directly, not through hybris ORM)organisationUnit- organisation unit
-
getStructureState
Description copied from interface:PatchGetsStructureStatefrom this patch- Specified by:
getStructureStatein interfacePatch- Returns:
StructureStatefrom this patch
-
getPatchId
Description copied from interface:PatchReturns unique patch id (e.g PD_V_1.0.1).- Specified by:
getPatchIdin interfacePatch- Returns:
- patch id
-
getPatchName
Description copied from interface:PatchReturns Patch name.- Specified by:
getPatchNamein interfacePatch- Returns:
- patch name (visible in admin console)
-
getPatchDescription
Description copied from interface:PatchReturns Patch description.- Specified by:
getPatchDescriptionin interfacePatch- Returns:
- description what this patch is about
-
getRelease
Description copied from interface:PatchGets release that patch is part of.- Specified by:
getReleasein interfacePatch- Returns:
- release that patch is part of
-
setImportPatchAction
-
setSqlCommandPatchAction
-