-// public static boolean isCoworker(CmsView cmsView) {
-// boolean coworker = cmsView.doAs(() -> CurrentUser.isInRole(SuiteRole.coworker.dn()));
-// return coworker;
-// }
-
- public static boolean isTopic(String topic, CmsEvent cmsEvent) {
- Objects.requireNonNull(topic);
- return topic.equals(cmsEvent.topic());
- }
-
- public static Button createLayerButton(Composite parent, String layer, Localized msg, CmsIcon icon,
- ClassLoader l10nClassLoader) {
- CmsSwtTheme theme = CmsSwtUtils.getCmsTheme(parent);
- Button button = new Button(parent, SWT.PUSH);
- CmsSwtUtils.style(button, SuiteStyle.leadPane);
- if (icon != null)
- button.setImage(theme.getBigIcon(icon));
- button.setLayoutData(new GridData(SWT.CENTER, SWT.BOTTOM, true, false));
- // button.setToolTipText(msg.lead());
- if (msg != null) {
- Label lbl = new Label(parent, SWT.CENTER);
- CmsSwtUtils.style(lbl, SuiteStyle.leadPane);
- String txt = LocaleUtils.lead(msg, l10nClassLoader);
-// String txt = msg.lead();
- lbl.setText(txt);
- lbl.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, true, false));
- }
- CmsSwtUtils.sendEventOnSelect(button, SuiteEvent.switchLayer.topic(), SuiteEvent.LAYER, layer);
- return button;
+ @Deprecated
+ public static Map<String, Object> eventProperties(Node node) {
+ Map<String, Object> properties = new HashMap<>();
+ String contentPath = '/' + Jcr.getWorkspaceName(node) + Jcr.getPath(node);
+ properties.put(SuiteUxEvent.CONTENT_PATH, contentPath);
+ return properties;