public class TemplateMigrationTask
extends info.magnolia.module.delta.AbstractRepositoryTask
"templates"
to the
workspace.
Templates will only be processed when they have the "enabled"
property.
When a template has "autoImport"
set to true
we check if there is an
existing resource in the ResourceOrigin
and migrate the template if there is none. Otherwise no action is
taken.
When a template has "autoImport"
set to false
we check whether there
is a hot-fixed version of that template in JcrResourceOrigin.RESOURCES_WORKSPACE
. If there is, contents
are compared and when equal, no action is taken, otherwise this task will fail! If there is no hot-fix or no
resource what so ever, the template will be migrated.
Modifier and Type | Field and Description |
---|---|
protected static String |
PROPERTY_AUTO_IMPORT |
protected static String |
PROPERTY_ENABLED |
protected static String |
PROPERTY_TEXT |
protected static String |
TEMPLATES_WORKSPACE |
Constructor and Description |
---|
TemplateMigrationTask() |
TemplateMigrationTask(info.magnolia.module.delta.Task onSuccess) |
Modifier and Type | Method and Description |
---|---|
protected void |
doExecute(info.magnolia.module.InstallContext installContext) |
protected static final String TEMPLATES_WORKSPACE
protected static final String PROPERTY_AUTO_IMPORT
protected static final String PROPERTY_TEXT
protected static final String PROPERTY_ENABLED
public TemplateMigrationTask(info.magnolia.module.delta.Task onSuccess)
public TemplateMigrationTask()
protected void doExecute(info.magnolia.module.InstallContext installContext) throws javax.jcr.RepositoryException, info.magnolia.module.delta.TaskExecutionException
doExecute
in class info.magnolia.module.delta.AbstractRepositoryTask
javax.jcr.RepositoryException
info.magnolia.module.delta.TaskExecutionException
Copyright © 2017 Magnolia International Ltd.. All rights reserved.