Describe your essential/project data once -- get the AbstractSystemSetup class, its initialization options, and the Spring bean to wire it up.
🔒 Your code never leaves your browser — everything is generated locally from templates, no AI, no server round-trip.
trainingcore/src/com/prospect2p/core/setup/MySystemSetup.javapackage com.prospect2p.core.setup;
import de.hybris.platform.core.initialization.SystemSetup;
import de.hybris.platform.core.initialization.SystemSetupContext;
import de.hybris.platform.servicelayer.system.AbstractSystemSetup;
@SystemSetup(extension = "trainingcore")
public class MySystemSetup extends AbstractSystemSetup {
@SystemSetup(type = SystemSetup.Type.ESSENTIAL, process = SystemSetup.Process.ALL)
public void createData(final SystemSetupContext context) {
// TODO: no ImpEx files configured -- add importImpexFile(context, "/trainingcore/import/general/<file>.impex"); calls here.
}
}
A SystemSetup class in SAP Commerce (de.hybris.platform.servicelayer.system.AbstractSystemSetup) is where an extension hooks into the platform's System Initialization and System Update steps in HAC -- importing essential/project ImpEx data and, optionally, exposing checkbox parameters on the HAC screen so an admin can choose what gets imported.
Methods are annotated with @SystemSetup(type=..., process=...) so the platform knows when to call them: ESSENTIAL vs PROJECT type, and INIT/UPDATE/ALL process.
Use it for any ImpEx that needs to run automatically during system initialization or update rather than being imported by hand every time -- base/essential data, demo/sample data behind an opt-in checkbox, or project data that should be reapplied on every update.
Add setup parameters when you want an admin to be able to opt in/out of a chunk of data (e.g. sample data) from the HAC System Initialization/Update screen instead of always importing it.
ESSENTIAL is meant for data the platform/extension cannot function without (reference data, base config); PROJECT is for project-specific data layered on top. Both are triggered the same way via process (INIT/UPDATE/ALL) -- the type is mainly a semantic/organizational distinction used by tooling and conventions.
ALL means the method runs on both System Initialization and System Update, as opposed to INIT (first-time setup only) or UPDATE (every subsequent update run).
So an admin can opt specific chunks of data in/out from the HAC System Initialization/Update screen -- e.g. skip importing large sample/demo data in a production environment while still importing it in a dev environment.
Under resources/<extension>/import/, conventionally split into subfolders per process (init/, update/) or a general/ folder for ALL -- matching the path string passed to importImpexFile(context, "/<ext>/import/...") in the generated Java.
It's the most commonly documented form for building a boolean SystemSetupParameter, but the helper has varied slightly across platform versions -- double-check it against the de.hybris.platform.core.initialization.SystemSetup API docs/sources for your exact SAP Commerce version before relying on it.