https://github.com/mojo2012/hybris-patch-extension
An extension that provides functionality to hook into the init/update process and import impex or execute plain java code
https://github.com/mojo2012/hybris-patch-extension
hybris hybris-commerce-suite hybris-extensions patch
Last synced: 11 months ago
JSON representation
An extension that provides functionality to hook into the init/update process and import impex or execute plain java code
- Host: GitHub
- URL: https://github.com/mojo2012/hybris-patch-extension
- Owner: mojo2012
- License: mit
- Created: 2018-01-06T13:15:08.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-06T14:10:57.000Z (about 8 years ago)
- Last Synced: 2025-01-02T06:29:34.680Z (about 1 year ago)
- Topics: hybris, hybris-commerce-suite, hybris-extensions, patch
- Language: Java
- Size: 174 KB
- Stars: 1
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Hybris Patch Extension
## Description
This extension allows to define so-called "patches" to be executed during system *initialization* and *update*. A patch is a java class that can do anything (import impex, modify item models, ...).
```
@PatchDefinition(uid = "TestPatch", author = "matthias.fuchs", patchType = Type.ESSENTIAL, setupPhase = Process.UPDATE)
public class TestPatch extends AbstractPatch
{
private static final Logger LOG = Logger.getLogger(TestPatch.class);
@Override
public void execute() throws Exception
{
LOG.info("This is a test patch");
}
}
```
For a Class to be detected as *patch* it has to be annotated with `PatchDefinition`. The setupPhase property allows to define in which system initialization phase the patch should be executed.
The patchType defines which kind of patch this is (eg. essential data or sample data).