Author: julien(a)jboss.com
Date: 2008-03-17 12:22:01 -0400 (Mon, 17 Mar 2008)
New Revision: 10295
Modified:
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/DebuggerPortlet.java
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/EventRoute.java
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/PageEventControllerContext.java
Log:
updated debugger portlet
Modified:
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/DebuggerPortlet.java
===================================================================
---
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/DebuggerPortlet.java 2008-03-17
16:11:26 UTC (rev 10294)
+++
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/DebuggerPortlet.java 2008-03-17
16:22:01 UTC (rev 10295)
@@ -60,10 +60,11 @@
private void printRoute(EventRoute route, PrintWriter writer)
{
- writer.print("<div>Event name: " +
route.getSource().getName().getLocalPart() + "</div>\n");
- writer.print("<div>Source: " + route.getSource().getWindowId() +
"</div>\n");
- writer.print("<div>Destination: " +
route.getDestination().getWindowId() + "</div>\n");
- writer.print("<div>Acknowledgement: " + route.getAcknowledgment() +
"</div>\n");
+ writer.print("<div>Event name: " + route.getName().getLocalPart() +
"</div>\n");
+ writer.print("<div>Event payload: " + route.getPayload() +
"</div>\n");
+ writer.print("<div>Source: " + route.getSource() +
"</div>\n");
+ writer.print("<div>Destination: " + route.getDestination() +
"</div>\n");
+ writer.print("<div>Acknowledgement: " + route.getAcknowledgement()
+ "</div>\n");
writer.print("<ul>\n");
for (EventRoute child : route.getChildren())
{
Modified:
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/EventRoute.java
===================================================================
---
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/EventRoute.java 2008-03-17
16:11:26 UTC (rev 10294)
+++
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/EventRoute.java 2008-03-17
16:22:01 UTC (rev 10295)
@@ -24,8 +24,10 @@
import org.jboss.portal.portlet.controller.event.Event;
+import javax.xml.namespace.QName;
import java.util.LinkedList;
import java.util.List;
+import java.io.Serializable;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
@@ -38,25 +40,43 @@
private final EventRoute parent;
/** . */
- private final Event source;
+ private final QName name;
/** . */
- private final Event destination;
+ private final Serializable payload;
/** . */
+ private final String source;
+
+ /** . */
+ private final String destination;
+
+ /** . */
final LinkedList<EventRoute> children;
/** . */
EventAcknowledgement acknowledgement;
- public EventRoute(EventRoute parent, Event source, Event destination)
+ public EventRoute(EventRoute parent, QName name, Serializable payload, String source,
String destination)
{
this.parent = parent;
+ this.name = name;
+ this.payload = payload;
this.source = source;
this.destination = destination;
this.children = new LinkedList<EventRoute>();
}
+ public String getSource()
+ {
+ return source;
+ }
+
+ public String getDestination()
+ {
+ return destination;
+ }
+
public EventRoute getParent()
{
return parent;
@@ -67,17 +87,17 @@
return children;
}
- public Event getSource()
+ public QName getName()
{
- return source;
+ return name;
}
- public Event getDestination()
+ public Serializable getPayload()
{
- return destination;
+ return payload;
}
- public EventAcknowledgement getAcknowledgment()
+ public EventAcknowledgement getAcknowledgement()
{
return acknowledgement;
}
Modified:
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/PageEventControllerContext.java
===================================================================
---
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/PageEventControllerContext.java 2008-03-17
16:11:26 UTC (rev 10294)
+++
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/PageEventControllerContext.java 2008-03-17
16:22:01 UTC (rev 10295)
@@ -94,15 +94,15 @@
Event destinationEvent = new Event(producedEvent.getName(),
producedEvent.getPayload(), windowId);
//
- EventRoute eventRoute;
+ EventRoute eventRoute = new EventRoute(relatedRoute,
producedEvent.getName(), producedEvent.getPayload(), producedEvent.getWindowId(),
destinationEvent.getWindowId());
+
+ //
if (relatedRoute != null)
{
- eventRoute = new EventRoute(relatedRoute, producedEvent,
destinationEvent);
relatedRoute.children.add(eventRoute);
}
else
{
- eventRoute = new EventRoute(relatedRoute, producedEvent,
destinationEvent);
roots.add(eventRoute);
}