-
Notifications
You must be signed in to change notification settings - Fork 5
Kernel param aliases
Pierre T. edited this page Oct 14, 2015
·
5 revisions
Story: you are creating a stack of Nuun plugins and you want a coherent experience for your stack users. So you have normalized all the kernel param keys. For instance, all the keys should start by jd.stack
. The problem is that you want to use a plugin which doesn’t follow your param conventions.
Solution: Create a plugin specifying an alias using your conventions for this param. Like this, all your plugin will be able to acess a normalized param. The alias will also be used to start the kernel.
For adding aliases override the following method in your plugin:
@Override public Map<String, String> kernelParametersAliases() { Map<String, String> aliases = new HashMap<String, String>(); aliases.put(KEY, ALIAS); return aliases; }
Then all the plugins will be able to access the value of KEY
using ALIAS
.
- Introduction
- ... Motivation
- ... Features
- ... Manifesto
- User manual
- ... Kernel
- ...... Kernel Life Cycle
- ...... Kernel Configuration
- ... Plugin
- ...... Plugin Life cycle
- ...... Request API
- ...... Native Module
- ...... Dependencies
- ... Tests
- ...... Integration Tests
- Advanced topics
- ... Design Best Practices
- ... Multi-Round Plugin
- ... Kernel param aliases
- ... SPI
- ...... DI Provider
- ...... Concern
- ...... Extension
- Definitions
- ... Framework
- ... Entreprise Stack
- ... API
- ... SPI
- ... Library
- ... Inversion of Control
- ... Dependency Injection
- Concepts
- ... UnitModule
- ... GlobalModule
- ... ObjectGraph