...
Remove these bundles from you deployment:
io.wcm:io.wcm.config.api
io.wcm:io.wcm.config.core
io.wcm:io.wcm.config.editor
And instead deploy these bundles:
io.wcm:io.wcm.caconfig.
applicationio.wcm:io.wcm.caconfig.compat
io.wcm:io.wcm.caconfig.editor
Existing OSGi configurations for wcm.io Configuration 0.x should work in the same way in the compatibility Layer, the PIDs are unchanged. For configuration persistence, only io.wcm.config.core.persistence.impl.ToolsConfigPagePersistenceProvider
is supported, which still has to be enabled explicitly.
...
io.wcm:io.wcm.testing.wcm-io-mock.config
And instead add:
...
:
...
io.wcm:io.wcm.testing.wcm-io-mock.caconfig-compat
org.apache.sling:org.apache.sling.testing.caconfig-mock-plugin
...
And instead use the new Mock context plugins like this:
Code Block | ||||
---|---|---|---|---|
| ||||
import static io.wcm.testing.mock.wcmio.caconfig.compat.ContextPlugins.WCMIO_CACONFIG_COMPAT; import static io.wcm.testing.mock.wcmio.handler.ContextPlugins.WCMIO_HANDLER; import static io.wcm.testing.mock.wcmio.sling.ContextPlugins.WCMIO_SLING; import static org.apache.sling.testing.mock.caconfig.ContextPlugins.CACONFIG; @Rule public AemContext = new AemContextBuilder() .plugin(CACONFIG) .plugin(WCMIO_SLING, WCMIO_CACONFIG, WCMIO_CACONFIG_COMPAT, WCMIO_HANDLER) .build(); |
...
Do the same steps as in Scenario A, but additionally you should update your code:
...
.
If you want to use the new Configuration Annotation Class Feature as described in Apache Sling Context-Aware Configuration you can do this and remove your wcm.io Configuration Parameters Definitions instead. You then use directly the Sling Context-Aware Configuration API to read the configuration data. Within Sightly templates you have to switch the syntax to access the configuration as well as described in the Sling Context-Aware documentation. The configuration of your parameters are then stored in /conf
and no longer in ./tools/config
pages. Only the configuration parameters provided by wcm.io Handler still use the compatibility layer. In the configuration editor you can edit both.
You may use the wcm.io Context-Aware Configuration Extensions for AEM to configure additional context path strategies or persistence strategies for the configuration data that is read and written directly through the Sling Context-Aware Configuration API.
Scenario C: Full Migration including upgrade to wcm.io Handler 1.x
TBDSee Migrate from wcm.io Handler 0.x to 1.x
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...