1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package info.magnolia.module.templatingkit.setup.for2_7;
35
36 import info.magnolia.module.InstallContext;
37 import info.magnolia.module.delta.ArrayDelegateTask;
38 import info.magnolia.module.delta.NodeExistsDelegateTask;
39 import info.magnolia.module.delta.OrderNodeAfterTask;
40 import info.magnolia.module.delta.OrderNodeToFirstPositionTask;
41 import info.magnolia.module.delta.TaskExecutionException;
42 import info.magnolia.repository.RepositoryConstants;
43
44
45
46
47
48
49
50 public class ReorderSTKAppsTask extends NodeExistsDelegateTask {
51
52 private static final ArrayDelegateTask ORDER_STK_APPS_TASK = new ArrayDelegateTask("Order STK apps in applauncher",
53 new OrderNodeToFirstPositionTask("1: stkSiteApp", "This task orders Site definitions as first in STK app group.", RepositoryConstants.CONFIG, "modules/ui-admincentral/config/appLauncherLayout/groups/stk/apps/stkSiteApp"),
54 new OrderNodeAfterTask("2: stkThemesApp", "This task orders Themes after Site definitions in STK app group.", RepositoryConstants.CONFIG, "/modules/ui-admincentral/config/appLauncherLayout/groups/stk/apps/stkThemesApp", "stkSiteApp"),
55 new OrderNodeAfterTask("3: stkChannelsApp", "This task orders Channels after Themes in STK app group.", RepositoryConstants.CONFIG, "/modules/ui-admincentral/config/appLauncherLayout/groups/stk/apps/stkChannelsApp", "stkThemesApp"),
56 new OrderNodeAfterTask("4: stkDialogsApp", "This task orders Dialogs after Channels in STK app group.", RepositoryConstants.CONFIG, "/modules/ui-admincentral/config/appLauncherLayout/groups/stk/apps/stkDialogsApp", "stkChannelsApp"),
57 new OrderNodeAfterTask("5: stkTemplateDefsApp", "This task orders Template defs after Dialogs in STK app group.", RepositoryConstants.CONFIG, "/modules/ui-admincentral/config/appLauncherLayout/groups/stk/apps/stkTemplateDefsApp", "stkDialogsApp")
58 );
59
60 public ReorderSTKAppsTask() {
61 super("Order STK apps in applauncher", "This task ensures proper ordering of the STK apps in the STK group of the applauncher.",
62 RepositoryConstants.CONFIG, "/modules/ui-admincentral/config/appLauncherLayout/groups/stk/apps/stkSiteApp", ORDER_STK_APPS_TASK);
63 }
64
65 @Override
66 public void execute(InstallContext ctx) throws TaskExecutionException {
67 super.execute(ctx);
68 }
69
70 }