]> git.argeo.org Git - gpl/argeo-suite.git/blob - ui/SuiteEvent.java
Prepare next development cycle
[gpl/argeo-suite.git] / ui / SuiteEvent.java
1 package org.argeo.suite.ui;
2
3 import java.util.HashMap;
4 import java.util.Map;
5
6 import javax.jcr.Node;
7
8 import org.argeo.cms.ui.util.CmsEvent;
9 import org.argeo.jcr.Jcr;
10
11 /** Events specific to Argeo Suite. */
12 public enum SuiteEvent implements CmsEvent {
13 openNewPart, refreshPart, switchLayer;
14
15 public final static String LAYER = "layer";
16 public final static String NODE_ID = "nodeId";
17 public final static String WORKSPACE = "workspace";
18
19 public String getTopicBase() {
20 return "argeo/suite/ui";
21 }
22
23 public static Map<String, Object> eventProperties(Node node) {
24 Map<String, Object> properties = new HashMap<>();
25 properties.put(NODE_ID, Jcr.getIdentifier(node));
26 properties.put(WORKSPACE, Jcr.getWorkspaceName(node));
27 return properties;
28 }
29 }