Author: heiko.braun(a)jboss.com
Date: 2008-08-14 03:43:37 -0400 (Thu, 14 Aug 2008)
New Revision: 245
Added:
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/common/
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/common/MapEventMessage.java
Removed:
sam/trunk/modules/core/src/test/java/org/jboss/test/sam/MapEventMessage.java
sam/trunk/modules/fx/src/test/java/org/jboss/test/sam/MapEventMessage.java
Modified:
sam/trunk/modules/fx/src/test/java/org/jboss/test/sam/chart/BarChartRunner.java
sam/trunk/modules/fx/src/test/java/org/jboss/test/sam/chart/LineChartRunner.java
sam/trunk/modules/fx/src/test/java/org/jboss/test/sam/chart/PieChartRunner.java
Log:
Move MapEventMessage to common package
Added:
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/common/MapEventMessage.java
===================================================================
---
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/common/MapEventMessage.java
(rev 0)
+++
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/common/MapEventMessage.java 2008-08-14
07:43:37 UTC (rev 245)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.sam.internal.common;
+
+import org.jboss.sam.EventMessage;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Iterator;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class MapEventMessage implements EventMessage<Map>
+{
+ private Map<String, Object> data = new HashMap<String, Object>();
+
+ private long timestamp;
+
+ public MapEventMessage(Map<String, Object> data)
+ {
+ this.data = data;
+ }
+
+ public MapEventMessage()
+ {
+ this(System.currentTimeMillis());
+ }
+
+ public MapEventMessage(long timestamp)
+ {
+ this.timestamp = timestamp;
+ }
+
+ public MapEventMessage put(String key, Object value)
+ {
+ data.put(key, value);
+ return this;
+ }
+
+ public Object getProperty(String name)
+ {
+ return data.get(name);
+ }
+
+ public Map getUnderlying()
+ {
+ return data;
+ }
+
+ public long getTimestamp()
+ {
+ return this.timestamp;
+ }
+
+ public Iterator<String> getPropertyNames()
+ {
+ return this.data.keySet().iterator();
+ }
+}
Property changes on:
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/common/MapEventMessage.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: sam/trunk/modules/core/src/test/java/org/jboss/test/sam/MapEventMessage.java
===================================================================
---
sam/trunk/modules/core/src/test/java/org/jboss/test/sam/MapEventMessage.java 2008-08-13
14:54:11 UTC (rev 244)
+++
sam/trunk/modules/core/src/test/java/org/jboss/test/sam/MapEventMessage.java 2008-08-14
07:43:37 UTC (rev 245)
@@ -1,74 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.sam;
-
-import org.jboss.sam.EventMessage;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class MapEventMessage implements EventMessage<Map>
-{
- private Map<String, Object> data = new HashMap<String, Object>();
-
- private long timestamp;
-
- public MapEventMessage()
- {
- this(System.currentTimeMillis());
- }
-
- public MapEventMessage(long timestamp)
- {
- this.timestamp = timestamp;
- }
-
- public MapEventMessage put(String key, Object value)
- {
- data.put(key, value);
- return this;
- }
-
- public Object getProperty(String name)
- {
- return data.get(name);
- }
-
- public Map getUnderlying()
- {
- return data;
- }
-
- public long getTimestamp()
- {
- return this.timestamp;
- }
-
- public Iterator<String> getPropertyNames()
- {
- return this.data.keySet().iterator();
- }
-}
Deleted: sam/trunk/modules/fx/src/test/java/org/jboss/test/sam/MapEventMessage.java
===================================================================
--- sam/trunk/modules/fx/src/test/java/org/jboss/test/sam/MapEventMessage.java 2008-08-13
14:54:11 UTC (rev 244)
+++ sam/trunk/modules/fx/src/test/java/org/jboss/test/sam/MapEventMessage.java 2008-08-14
07:43:37 UTC (rev 245)
@@ -1,74 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.sam;
-
-import org.jboss.sam.EventMessage;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class MapEventMessage implements EventMessage<Map>
-{
- private Map<String, Object> data = new HashMap<String, Object>();
-
- private long timestamp;
-
- public MapEventMessage()
- {
- this(System.currentTimeMillis());
- }
-
- public MapEventMessage(long timestamp)
- {
- this.timestamp = timestamp;
- }
-
- public MapEventMessage put(String key, Object value)
- {
- data.put(key, value);
- return this;
- }
-
- public Object getProperty(String name)
- {
- return data.get(name);
- }
-
- public Map getUnderlying()
- {
- return data;
- }
-
- public long getTimestamp()
- {
- return this.timestamp;
- }
-
- public Iterator<String> getPropertyNames()
- {
- return this.data.keySet().iterator();
- }
-}
Modified: sam/trunk/modules/fx/src/test/java/org/jboss/test/sam/chart/BarChartRunner.java
===================================================================
---
sam/trunk/modules/fx/src/test/java/org/jboss/test/sam/chart/BarChartRunner.java 2008-08-13
14:54:11 UTC (rev 244)
+++
sam/trunk/modules/fx/src/test/java/org/jboss/test/sam/chart/BarChartRunner.java 2008-08-14
07:43:37 UTC (rev 245)
@@ -27,7 +27,7 @@
import org.jboss.sam.chart.PropertyMapping;
import org.jboss.sam.chart.internal.jfree.BarChartBuilder;
import org.jboss.test.sam.JFreeChartViewer;
-import org.jboss.test.sam.MapEventMessage;
+import org.jboss.sam.internal.common.MapEventMessage;
import org.jfree.chart.JFreeChart;
import java.util.ArrayList;
Modified:
sam/trunk/modules/fx/src/test/java/org/jboss/test/sam/chart/LineChartRunner.java
===================================================================
---
sam/trunk/modules/fx/src/test/java/org/jboss/test/sam/chart/LineChartRunner.java 2008-08-13
14:54:11 UTC (rev 244)
+++
sam/trunk/modules/fx/src/test/java/org/jboss/test/sam/chart/LineChartRunner.java 2008-08-14
07:43:37 UTC (rev 245)
@@ -27,7 +27,7 @@
import org.jboss.sam.chart.PropertyMapping;
import org.jboss.sam.chart.internal.jfree.LineChartBuilder;
import org.jboss.test.sam.JFreeChartViewer;
-import org.jboss.test.sam.MapEventMessage;
+import org.jboss.sam.internal.common.MapEventMessage;
import org.jfree.chart.JFreeChart;
import java.util.ArrayList;
Modified: sam/trunk/modules/fx/src/test/java/org/jboss/test/sam/chart/PieChartRunner.java
===================================================================
---
sam/trunk/modules/fx/src/test/java/org/jboss/test/sam/chart/PieChartRunner.java 2008-08-13
14:54:11 UTC (rev 244)
+++
sam/trunk/modules/fx/src/test/java/org/jboss/test/sam/chart/PieChartRunner.java 2008-08-14
07:43:37 UTC (rev 245)
@@ -27,7 +27,7 @@
import org.jboss.sam.chart.PropertyMapping;
import org.jboss.sam.chart.internal.jfree.PieChartBuilder;
import org.jboss.test.sam.JFreeChartViewer;
-import org.jboss.test.sam.MapEventMessage;
+import org.jboss.sam.internal.common.MapEventMessage;
import org.jfree.chart.JFreeChart;
import java.util.ArrayList;