Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

...

Directory relative to base dir

Explanation

./api/

Provided by installer; overridden during installation and update; do not touch!

Feel encouraged to browse through for inspiration, thou.

./plugins/

All your custom code belongs here.

See Plugins below.

./callback/

./custom/

./shared/

./wizard/

These are legacy custom code locations and should not be used anymore.

Plugins

All custom code must be organized in Plugins. Each plugin must have a unique (Java package) name. E.g.:

  • de.pinuts.tutorial (Haken)

  • foo.bar (Haken)

  • de.demo-project (Minus) Invalid name: only alphanumeric and dots allowed

  • com.acme.foo (Minus) Invalid: com..., net... and org... denote reserved namespaces and can not be used as top-level package names

Each plugin must have a plugin.desc.json file that can be initially created by the Kickstarter.

Scopes

There are four different scopes that are used to separate code that will be executed in different contexts. Each scope has its own subdirectory:

./custom/: Functions to be called as Cron Jobs

./callback/: Callbacks are invoked when specific events occur in the application core

./wizard/: Backoffice wizards

./rest/: REST endpoints

./shared/: Code that will be available in all of the above contexts.

Panel
panelIconId1f4a1
panelIcon:bulb:
panelIconText💡
bgColor#DEEBFF

When in doubt, put your files into the ./shared/ directory. The scoping logic has become less important since code can be structured using ECMAScripts export and import statements nowadays.