Changed rootVO method to avoid conflicts with base Event class
This commit is contained in:
parent
489897b556
commit
5a58818701
|
@ -18,7 +18,7 @@ public class PortalEvent extends Event {
|
|||
|
||||
protected static final Log log = LogFactoryUtil.getLog(PortalEvent.class);
|
||||
|
||||
private static String sender;
|
||||
private static String rootVOName;
|
||||
|
||||
public static final String TYPE = "portal";
|
||||
public static final String GROUP_ENTRY = "group";
|
||||
|
@ -26,20 +26,20 @@ public class PortalEvent extends Event {
|
|||
|
||||
static {
|
||||
try {
|
||||
sender = new LiferayGroupManager().getRootVOName();
|
||||
rootVOName = new LiferayGroupManager().getRootVOName();
|
||||
} catch (Exception e) {
|
||||
log.warn("Cannot get root VO name, using hostname");
|
||||
try {
|
||||
sender = InetAddress.getLocalHost().getHostName();
|
||||
rootVOName = InetAddress.getLocalHost().getHostName();
|
||||
} catch (UnknownHostException e1) {
|
||||
log.error("Cannot get localhost name", e);
|
||||
sender = PortalUtil.getComputerName();
|
||||
rootVOName = PortalUtil.getComputerName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public PortalEvent(String name) {
|
||||
super(name, TYPE, getSender());
|
||||
super(name, TYPE, getRootVOName());
|
||||
}
|
||||
|
||||
public PortalEvent(String name, User user) {
|
||||
|
@ -47,7 +47,7 @@ public class PortalEvent extends Event {
|
|||
}
|
||||
|
||||
public PortalEvent(String name, String user) {
|
||||
super(name, TYPE, getSender(), user);
|
||||
super(name, TYPE, getRootVOName(), user);
|
||||
}
|
||||
|
||||
public PortalEvent(String name, User user, Map<String, String> data) {
|
||||
|
@ -55,11 +55,11 @@ public class PortalEvent extends Event {
|
|||
}
|
||||
|
||||
public PortalEvent(String name, String user, Map<String, String> data) {
|
||||
super(name, TYPE, getSender(), user, data);
|
||||
super(name, TYPE, getRootVOName(), user, data);
|
||||
}
|
||||
|
||||
protected static String getSender() {
|
||||
return sender;
|
||||
protected static String getRootVOName() {
|
||||
return rootVOName;
|
||||
}
|
||||
|
||||
public void setUser(User user) {
|
||||
|
|
Loading…
Reference in New Issue