]>
git.argeo.org Git - gpl/argeo-suite.git/blob - ui/SuiteEvent.java
1 package org
.argeo
.suite
.ui
;
3 import java
.util
.HashMap
;
8 import org
.argeo
.cms
.ui
.util
.CmsEvent
;
9 import org
.argeo
.jcr
.Jcr
;
10 import org
.osgi
.service
.useradmin
.User
;
12 /** Events specific to Argeo Suite. */
13 public enum SuiteEvent
implements CmsEvent
{
14 openNewPart
, refreshPart
, switchLayer
;
16 public final static String LAYER
= "layer";
17 // public final static String NODE_ID = "nodeId";
18 public final static String NODE_PATH
= "path";
19 public final static String USERNAME
= "username";
20 public final static String WORKSPACE
= "workspace";
22 public String
getTopicBase() {
23 return "argeo/suite/ui";
26 public static Map
<String
, Object
> eventProperties(Node node
) {
27 Map
<String
, Object
> properties
= new HashMap
<>();
28 properties
.put(NODE_PATH
, Jcr
.getPath(node
));
29 properties
.put(WORKSPACE
, Jcr
.getWorkspaceName(node
));
33 public static Map
<String
, Object
> eventProperties(User user
) {
34 Map
<String
, Object
> properties
= new HashMap
<>();
35 properties
.put(USERNAME
, user
.getName());