Mail Archive Home | gotm-commits List | June 2004 Index
| <-- Date Index | <-- Thread Index |
Date: Wednesday, June 2, 2004 @ 11:44:26
Author: rouvoy
Path: /cvsroot/gotm/gotm-explorer
Added: .classpath .cvsignore .project build.xml
externals/browser/apollon-runtime.jar
externals/browser/basic-plugin.jar externals/browser/browser.jar
externals/browser/fractal-browser.jar
externals/browser/fractal-plugin.jar
externals/browser/xerces.jar src/config/GoTM.xml
src/java/org/objectweb/gotm/browser/ComponentFactoryFeatureCreateAction.java
src/java/org/objectweb/gotm/browser/ComponentPoolContext.java
src/java/org/objectweb/gotm/browser/ComponentPoolRemoveAction.java
src/java/org/objectweb/gotm/browser/ComponentStringFactoryFeatureCreateAction.java
src/java/org/objectweb/gotm/browser/event/EventContextContainer.java
src/java/org/objectweb/gotm/browser/event/EventListenerFeatureContext.java
src/java/org/objectweb/gotm/browser/transaction/TransactionActivationFeatureBeginAction.java
src/java/org/objectweb/gotm/browser/transaction/TransactionActivationFeatureCommitAction.java
src/java/org/objectweb/gotm/browser/transaction/TransactionActivationFeatureRollbackAction.java
src/java/org/objectweb/gotm/browser/transaction/TransactionInterruptionFeatureResumeAction.java
src/java/org/objectweb/gotm/browser/transaction/TransactionInterruptionFeatureSuspendAction.java
src/java/org/objectweb/gotm/browser/transaction/TransactionStatePanel.java
src/java/org/objectweb/gotm/browser/transaction/TransactionStatusFeatureIconProvider.java
src/java/org/objectweb/gotm/browser/xid/XidStatePanel.java
src/pics/feature.png src/pics/started.png src/pics/state.png
src/pics/stopped.png
* Initial import of the GoTM Explorer.
--------------------------------------------------------------------------------------------------+
.classpath
| 15 +
.cvsignore
| 1
.project
| 19 +
build.xml
| 90 +++++++
externals/browser/apollon-runtime.jar
| <<Binary file>>
externals/browser/basic-plugin.jar
| <<Binary file>>
externals/browser/browser.jar
| <<Binary file>>
externals/browser/fractal-browser.jar
| <<Binary file>>
externals/browser/fractal-plugin.jar
| <<Binary file>>
externals/browser/xerces.jar
| <<Binary file>>
src/config/GoTM.xml
| 120 ++++++++++
src/java/org/objectweb/gotm/browser/ComponentFactoryFeatureCreateAction.java
| 55 ++++
src/java/org/objectweb/gotm/browser/ComponentPoolContext.java
| 66 +++++
src/java/org/objectweb/gotm/browser/ComponentPoolRemoveAction.java
| 74 ++++++
src/java/org/objectweb/gotm/browser/ComponentStringFactoryFeatureCreateAction.java
| 74 ++++++
src/java/org/objectweb/gotm/browser/event/EventContextContainer.java
| 47 +++
src/java/org/objectweb/gotm/browser/event/EventListenerFeatureContext.java
| 78 ++++++
src/java/org/objectweb/gotm/browser/transaction/TransactionActivationFeatureBeginAction.java
| 76 ++++++
src/java/org/objectweb/gotm/browser/transaction/TransactionActivationFeatureCommitAction.java
| 77 ++++++
src/java/org/objectweb/gotm/browser/transaction/TransactionActivationFeatureRollbackAction.java
| 79 ++++++
src/java/org/objectweb/gotm/browser/transaction/TransactionInterruptionFeatureResumeAction.java
| 78 ++++++
src/java/org/objectweb/gotm/browser/transaction/TransactionInterruptionFeatureSuspendAction.java
| 79 ++++++
src/java/org/objectweb/gotm/browser/transaction/TransactionStatePanel.java
| 90 +++++++
src/java/org/objectweb/gotm/browser/transaction/TransactionStatusFeatureIconProvider.java
| 67 +++++
src/java/org/objectweb/gotm/browser/xid/XidStatePanel.java
| 95 +++++++
src/pics/feature.png
| <<Binary file>>
src/pics/started.png
| <<Binary file>>
src/pics/state.png
| <<Binary file>>
src/pics/stopped.png
| <<Binary file>>
29 files changed, 1280 insertions(+)
Index: gotm-explorer/.classpath
diff -u /dev/null gotm-explorer/.classpath:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++ gotm-explorer/.classpath Wed Jun 2 11:44:26 2004
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/java"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="externals/browser/browser.jar"/>
+ <classpathentry sourcepath="/browser/example/fractal-2.0/src/plugin"
kind="lib" path="externals/browser/fractal-plugin.jar"/>
+ <classpathentry kind="lib"
path="externals/browser/fractal-browser.jar"/>
+ <classpathentry kind="lib"
path="/gotm/externals/fractal/fractal.jar"/>
+ <classpathentry kind="lib"
path="/gotm/externals/julia/julia-runtime.jar"/>
+ <classpathentry kind="lib"
path="/gotm/externals/julia/julia-mixins.jar"/>
+ <classpathentry kind="lib"
path="/gotm/externals/fractal-adl/fractal-adl.jar"/>
+ <classpathentry kind="src" path="/gotm"/>
+ <classpathentry kind="src" path="/ow-transaction"/>
+ <classpathentry kind="output" path="build/class"/>
+</classpath>
Index: gotm-explorer/.cvsignore
diff -u /dev/null gotm-explorer/.cvsignore:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++ gotm-explorer/.cvsignore Wed Jun 2 11:44:26 2004
@@ -0,0 +1 @@
+build
Index: gotm-explorer/.project
diff -u /dev/null gotm-explorer/.project:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++ gotm-explorer/.project Wed Jun 2 11:44:26 2004
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>gotm-explorer</name>
+ <comment></comment>
+ <projects>
+ <project>gotm</project>
+ <project>ow-transaction</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Index: gotm-explorer/build.xml
diff -u /dev/null gotm-explorer/build.xml:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++ gotm-explorer/build.xml Wed Jun 2 11:44:26 2004
@@ -0,0 +1,90 @@
+<!-- ==================================================================== -->
+
+<!-- ObjectWeb Transaction Working Group API -->
+<!-- Contact: http://www.objectweb.org -->
+
+<!-- This library 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 any later version. -->
+
+<!-- This library 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 library; if not, write to the Free Software -->
+<!-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -->
+<!-- USA -->
+
+<!-- Initial developer(s): Romain Rouvoy. -->
+<!-- Contributor(s): ______________________________________. -->
+
+<!-- $Id: build.xml,v 1.1 2004/06/02 09:44:26 rouvoy Exp $ -->
+<!-- ==================================================================== -->
+
+<project name="gotm-explorer" default="all">
+ <description>GoTM Explorer</description>
+
+ <property name="src.dir" value="src"/>
+ <property name="java.dir" value="${src.dir}/java"/>
+ <property name="pics.dir" value="${src.dir}/pics"/>
+ <property name="cfg.dir" value="${src.dir}/config"/>
+
+ <property name="class.dir" value="class"/>
+ <property name="lib.dir" value="lib"/>
+
+ <property name="build.dir" value="${basedir}/build"/>
+
+ <property name="browser.jar" value="ow_gotm_browser.jar"/>
+ <property name="browser.version" value="0.1a"/>
+ <property name="dist.name" value="GoTMBrowser"/>
+
+
+ <path id="classpath">
+ <fileset dir="${build.dir}/${lib.dir}" includes="**/*.jar"/>
+ <pathelement location="${build.dir}/${class.dir}"/>
+ </path>
+
+
+ <target name="all">
+ <antcall target="clean"/>
+ <antcall target="build"/>
+ </target>
+
+ <target name="prepare">
+ <ant dir="../gotm" target="build"/>
+ <copy todir="${build.dir}/${lib.dir}">
+ <fileset dir="externals" includes="**/*"/>
+ <mapper type="flatten"/>
+ </copy>
+ <copy todir="${build.dir}/${class.dir}">
+ <fileset dir="${cfg.dir}" includes="**/*"/>
+ </copy>
+ <copy todir="${build.dir}/${class.dir}">
+ <fileset dir="${pics.dir}" includes="**/*"/>
+ </copy>
+ </target>
+
+ <target name="compile" depends="prepare">
+ <javac srcdir="${java.dir}"
+ destdir="${build.dir}/${class.dir}"
+ debug="on">
+ <classpath refid="classpath"/>
+ <include name="org/objectweb/gotm/browser/**/*.java"/>
+ </javac>
+ </target>
+
+ <target name="build" depends="compile">
+ <mkdir dir="${build.dir}/${lib.dir}"/>
+ <jar destfile="${build.dir}/${lib.dir}/${browser.jar}">
+ <fileset dir="${build.dir}/${class.dir}"
+ includes="**/*"/>
+ </jar>
+ </target>
+
+ <target name="clean">
+ <delete dir="${build.dir}" failonerror="no"/>
+ </target>
+</project>
\ No newline at end of file
Index: gotm-explorer/externals/browser/apollon-runtime.jar
cvs rdiff: failed to read diff file header /tmp/cvsu7u9ys for
apollon-runtime.jar,v: end of file
Index: gotm-explorer/externals/browser/basic-plugin.jar
cvs rdiff: failed to read diff file header /tmp/cvsbMbEqA for
basic-plugin.jar,v: end of file
Index: gotm-explorer/externals/browser/browser.jar
cvs rdiff: failed to read diff file header /tmp/cvsEZG5dB for browser.jar,v:
end of file
Index: gotm-explorer/externals/browser/fractal-browser.jar
cvs rdiff: failed to read diff file header /tmp/cvsPxOJgD for
fractal-browser.jar,v: end of file
Index: gotm-explorer/externals/browser/fractal-plugin.jar
cvs rdiff: failed to read diff file header /tmp/cvs6c1zXw for
fractal-plugin.jar,v: end of file
Index: gotm-explorer/externals/browser/xerces.jar
cvs rdiff: failed to read diff file header /tmp/cvsVnwFgy for xerces.jar,v:
end of file
Index: gotm-explorer/src/config/GoTM.xml
diff -u /dev/null gotm-explorer/src/config/GoTM.xml:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++ gotm-explorer/src/config/GoTM.xml Wed Jun 2 11:44:26 2004
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<browser>
+ <include url="fractalProperties.xml"/>
+
+ <node type-name="java.lang.Object">
+ <menu>
+ <item label="Type">
+
<code>org.objectweb.util.browser.plugin.java.InheritClassesAction</code>
+ </item>
+ </menu>
+ </node>
+
+
+ <!-- ================================================================= -->
+ <!-- Default Icons for Features and States -->
+ <!-- ================================================================= -->
+
+ <node type-name="org.objectweb.transaction.api.Feature">
+ <icon><icon-file url="feature.png"/></icon>
+ </node>
+
+ <node type-name="org.objectweb.transaction.api.State">
+ <icon><icon-file url="state.png"/></icon>
+ </node>
+
+
+ <!-- ================================================================= -->
+ <!-- Component Factory Feature -->
+ <!-- ================================================================= -->
+
+ <node type-name="org.objectweb.gotm.api.utils.FactoryFeature">
+ <menu>
+ <item label="Create">
+
<code>org.objectweb.gotm.browser.ComponentFactoryFeatureCreateAction</code>
+ </item>
+ </menu>
+ </node>
+
+ <node type-name="org.objectweb.gotm.api.utils.StringFactoryFeature">
+ <menu>
+ <item label="Create">
+
<code>org.objectweb.gotm.browser.ComponentStringFactoryFeatureCreateAction</code>
+ </item>
+ </menu>
+ </node>
+
+ <node type-name="org.objectweb.gotm.api.utils.ComponentPool">
+ <wrapper type-name="org.objectweb.gotm.browser.ComponentPoolContext" />
+ <menu>
+ <item label="Remove from Pool" tree-child-visible="true">
+ <code>org.objectweb.gotm.browser.ComponentPoolRemoveAction</code>
+ </item>
+ </menu>
+ </node>
+
+
+ <!-- ================================================================= -->
+ <!-- Transaction Activation Feature -->
+ <!-- ================================================================= -->
+
+ <node
type-name="org.objectweb.transaction.api.transaction.TransactionActivationFeature">
+ <menu>
+ <item label="Begin">
+
<code>org.objectweb.gotm.browser.transaction.TransactionActivationFeatureBeginAction</code>
+ </item>
+ <item label="Commit">
+
<code>org.objectweb.gotm.browser.transaction.TransactionActivationFeatureCommitAction</code>
+ </item>
+ <item label="Rollback">
+
<code>org.objectweb.gotm.browser.transaction.TransactionActivationFeatureRollbackAction</code>
+ </item>
+ </menu>
+ </node>
+
+
+ <!-- ================================================================= -->
+ <!-- Transaction Interruption Feature
-->
+ <!-- ================================================================= -->
+
+ <node
type-name="org.objectweb.transaction.api.transaction.TransactionInterruptionFeature">
+ <menu>
+ <item label="Suspend">
+
<code>org.objectweb.gotm.browser.transaction.TransactionInterruptionFeatureSuspendAction</code>
+ </item>
+ <item label="Resume">
+
<code>org.objectweb.gotm.browser.transaction.TransactionInterruptionFeatureResumeAction</code>
+ </item>
+ </menu>
+ </node>
+
+
+ <!-- ================================================================= -->
+ <!-- Transaction Status Feature -->
+ <!-- ================================================================= -->
+ <node
type-name="org.objectweb.transaction.api.transaction.TransactionStatusFeature">
+
<icon><code>org.objectweb.gotm.browser.transaction.TransactionStatusFeatureIconProvider</code></icon>
+ </node>
+
+ <node
type-name="org.objectweb.transaction.api.transaction.TransactionState">
+
<panel><code>org.objectweb.gotm.browser.transaction.TransactionStatePanel</code></panel>
+ </node>
+
+
+ <!-- ================================================================= -->
+ <!-- XID Status Feature -->
+ <!-- ================================================================= -->
+ <node type-name="org.objectweb.transaction.api.xid.XidState">
+ <panel><code>org.objectweb.gotm.browser.xid.XidStatePanel</code></panel>
+ </node>
+
+
+ <!-- ================================================================= -->
+ <!-- Event Listener Feature -->
+ <!-- ================================================================= -->
+ <node type-name="org.objectweb.transaction.api.event.EventListenerFeature">
+ <wrapper
type-name="org.objectweb.gotm.browser.event.EventListenerFeatureContext" />
+ </node>
+
+</browser>
Index:
gotm-explorer/src/java/org/objectweb/gotm/browser/ComponentFactoryFeatureCreateAction.java
diff -u /dev/null
gotm-explorer/src/java/org/objectweb/gotm/browser/ComponentFactoryFeatureCreateAction.java:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++
gotm-explorer/src/java/org/objectweb/gotm/browser/ComponentFactoryFeatureCreateAction.java
Wed Jun 2 11:44:25 2004
@@ -0,0 +1,55 @@
+/*====================================================================
+
+GoTM: GoTM is an open Transaction Monitor
+Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
+Contact: gotm-team@xxxxxxxxxxxxx
+
+This library 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 any later version.
+
+This library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+
+Initial developer(s): Romain Rouvoy.
+Contributor(s): .
+
+---------------------------------------------------------------------
+$Id: ComponentFactoryFeatureCreateAction.java,v 1.1 2004/06/02 09:44:25
rouvoy Exp $
+====================================================================*/
+
+package org.objectweb.gotm.browser;
+
+import org.objectweb.gotm.api.utils.FactoryFeature;
+import org.objectweb.util.browser.api.MenuItemTreeView;
+import
org.objectweb.util.browser.plugins.fractal.menu.DefaultFractalMenuItem;
+
+/**
+ *
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ *
+ * @version 0.1
+ */
+public class ComponentFactoryFeatureCreateAction
+ extends DefaultFractalMenuItem
+{
+ public static int count = 1 ;
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.api.FractalMenuItem#actionStartedPerformed(org.objectweb.util.browser.api.MenuItemEvent)
+ */
+ public void actionStartedPerformed(MenuItemTreeView arg0)
+ throws Exception
+ {
+ FactoryFeature fctr = (FactoryFeature) arg0.getSelectedObject();
+ arg0.getTree().addEntry("Transaction"+(count++), fctr.create());
+ }
+}
Index:
gotm-explorer/src/java/org/objectweb/gotm/browser/ComponentPoolContext.java
diff -u /dev/null
gotm-explorer/src/java/org/objectweb/gotm/browser/ComponentPoolContext.java:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++
gotm-explorer/src/java/org/objectweb/gotm/browser/ComponentPoolContext.java
Wed Jun 2 11:44:26 2004
@@ -0,0 +1,66 @@
+/*====================================================================
+
+GoTM: GoTM is an open Transaction Monitor
+Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
+Contact: gotm-team@xxxxxxxxxxxxx
+
+This library 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 any later version.
+
+This library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+
+Initial developer(s): Romain Rouvoy.
+Contributor(s): .
+
+---------------------------------------------------------------------
+$Id: ComponentPoolContext.java,v 1.1 2004/06/02 09:44:26 rouvoy Exp $
+====================================================================*/
+
+package org.objectweb.gotm.browser;
+
+import java.util.Vector;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.util.Fractal;
+import org.objectweb.gotm.api.utils.ComponentPool;
+import org.objectweb.util.browser.api.Entry;
+import org.objectweb.util.browser.core.naming.DefaultEntry;
+import org.objectweb.util.browser.core.naming.DefaultName;
+import
org.objectweb.util.browser.plugins.fractal.context.DefaultFractalContext;
+
+/**
+ *
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @version 0.1
+ */
+public class ComponentPoolContext
+ extends DefaultFractalContext
+{
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.context.DefaultFractalContext#getStartedEntries()
+ */
+ public Entry[] getStartedEntries() {
+ Component[] c = ((ComponentPool) object_).getComponents() ;
+ Vector list = new Vector();
+ for (int i=0 ; i < c.length ; i++) {
+ String name="Entry "+i ;
+ Component ci = (Component) c[i];
+ try {
+ name = Fractal.getNameController(ci).getFcName();
+ } catch (NoSuchInterfaceException ex) {}
+ list.add(new DefaultEntry(ci, new DefaultName(name), this));
+ }
+ return (Entry[]) list.toArray(new Entry[0]);
+ }
+}
Index:
gotm-explorer/src/java/org/objectweb/gotm/browser/ComponentPoolRemoveAction.java
diff -u /dev/null
gotm-explorer/src/java/org/objectweb/gotm/browser/ComponentPoolRemoveAction.java:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++
gotm-explorer/src/java/org/objectweb/gotm/browser/ComponentPoolRemoveAction.java
Wed Jun 2 11:44:25 2004
@@ -0,0 +1,74 @@
+/*====================================================================
+
+GoTM: GoTM is an open Transaction Monitor
+Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
+Contact: gotm-team@xxxxxxxxxxxxx
+
+This library 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 any later version.
+
+This library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+
+Initial developer(s): Romain Rouvoy.
+Contributor(s): .
+
+---------------------------------------------------------------------
+$Id: ComponentPoolRemoveAction.java,v 1.1 2004/06/02 09:44:25 rouvoy Exp $
+====================================================================*/
+
+package org.objectweb.gotm.browser;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.gotm.api.utils.ComponentPool;
+import org.objectweb.util.browser.api.MenuItem;
+import org.objectweb.util.browser.api.MenuItemTreeView;
+import org.objectweb.util.browser.api.TreeView;
+import
org.objectweb.util.browser.plugins.fractal.menu.DefaultFractalMenuItem;
+
+/**
+ *
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @version 0.1
+ */
+public class ComponentPoolRemoveAction
+ extends DefaultFractalMenuItem
+{
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.api.FractalMenuItem#actionStartedPerformed(org.objectweb.util.browser.api.MenuItemEvent)
+ */
+ public void actionStartedPerformed(MenuItemTreeView arg0) throws
Exception {
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.api.FractalMenuItem#actionStoppedPerformed(org.objectweb.util.browser.api.MenuItemEvent)
+ */
+ public void actionStoppedPerformed(MenuItemTreeView arg0) throws
Exception {
+ ComponentPool pool = (ComponentPool) arg0.getParentObject();
+ pool.removeComponent((Component) arg0.getSelectedObject());
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.api.FractalMenuItem#getStartedStatus(org.objectweb.util.browser.api.TreeView)
+ */
+ public int getStartedStatus(TreeView arg0){
+ return MenuItem.DISABLED_STATUS;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.api.FractalMenuItem#getStoppedStatus(org.objectweb.util.browser.api.TreeView)
+ */
+ public int getStoppedStatus(TreeView arg0){
+ return MenuItem.ENABLED_STATUS;
+ }
+}
Index:
gotm-explorer/src/java/org/objectweb/gotm/browser/ComponentStringFactoryFeatureCreateAction.java
diff -u /dev/null
gotm-explorer/src/java/org/objectweb/gotm/browser/ComponentStringFactoryFeatureCreateAction.java:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++
gotm-explorer/src/java/org/objectweb/gotm/browser/ComponentStringFactoryFeatureCreateAction.java
Wed Jun 2 11:44:25 2004
@@ -0,0 +1,74 @@
+/*====================================================================
+
+GoTM: GoTM is an open Transaction Monitor
+Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
+Contact: gotm-team@xxxxxxxxxxxxx
+
+This library 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 any later version.
+
+This library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+
+Initial developer(s): Romain Rouvoy.
+Contributor(s): .
+
+---------------------------------------------------------------------
+$Id: ComponentStringFactoryFeatureCreateAction.java,v 1.1 2004/06/02
09:44:25 rouvoy Exp $
+====================================================================*/
+
+package org.objectweb.gotm.browser;
+
+import org.objectweb.gotm.api.utils.StringFactoryFeature;
+import org.objectweb.util.browser.api.MenuItemTreeView;
+import org.objectweb.util.browser.api.TreeView;
+import org.objectweb.util.browser.gui.api.DialogAction;
+import org.objectweb.util.browser.gui.api.DialogBox;
+import org.objectweb.util.browser.gui.lib.DefaultDialogBox;
+import org.objectweb.util.browser.gui.lib.LabelBox;
+import
org.objectweb.util.browser.plugins.fractal.menu.DefaultFractalMenuItem;
+
+/**
+ *
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @version 0,1
+ */
+public class ComponentStringFactoryFeatureCreateAction
+ extends DefaultFractalMenuItem
+ implements DialogAction
+{
+ protected TreeView tree ;
+ protected StringFactoryFeature fctr ;
+ protected LabelBox label ;
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.api.FractalMenuItem#actionStartedPerformed(org.objectweb.util.browser.api.MenuItemEvent)
+ */
+ public void actionStartedPerformed(MenuItemTreeView arg0) throws
Exception {
+ fctr = (StringFactoryFeature) arg0.getSelectedObject();
+ tree = arg0;
+ label = new LabelBox("Identity's Name");
+
+ DialogBox dialog = new DefaultDialogBox("Factory Feature");
+ dialog.addElementBox(label);
+ dialog.setValidateLabel("create");
+ dialog.setValidateAction(this);
+ dialog.show();
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.gui.api.DialogAction#executeAction()
+ */
+ public void executeAction() throws Exception {
+ tree.getTree().addEntry(label.getLabel(),
fctr.create(label.getLabel()));
+ }
+}
Index:
gotm-explorer/src/java/org/objectweb/gotm/browser/event/EventContextContainer.java
diff -u /dev/null
gotm-explorer/src/java/org/objectweb/gotm/browser/event/EventContextContainer.java:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++
gotm-explorer/src/java/org/objectweb/gotm/browser/event/EventContextContainer.java
Wed Jun 2 11:44:26 2004
@@ -0,0 +1,47 @@
+/*====================================================================
+
+GoTM: GoTM is an open Transaction Monitor
+Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
+Contact: gotm-team@xxxxxxxxxxxxx
+
+This library 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 any later version.
+
+This library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+
+Initial developer(s): Romain Rouvoy.
+Contributor(s): .
+
+---------------------------------------------------------------------
+$Id: EventContextContainer.java,v 1.1 2004/06/02 09:44:26 rouvoy Exp $
+====================================================================*/
+
+package org.objectweb.gotm.browser.event;
+
+import org.objectweb.transaction.api.event.EventNotificationFeature;
+import org.objectweb.util.browser.core.naming.DefaultContextContainer;
+
+/**
+ *
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @version 0.1
+ */
+public class EventContextContainer
+ extends DefaultContextContainer
+{
+ public EventContextContainer(EventNotificationFeature[] elf) {
+ for (int i=0;i<elf.length;i++) {
+ super.addEntry("Observer"+(i+1),elf[i]);
+ }
+ }
+}
Index:
gotm-explorer/src/java/org/objectweb/gotm/browser/event/EventListenerFeatureContext.java
diff -u /dev/null
gotm-explorer/src/java/org/objectweb/gotm/browser/event/EventListenerFeatureContext.java:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++
gotm-explorer/src/java/org/objectweb/gotm/browser/event/EventListenerFeatureContext.java
Wed Jun 2 11:44:26 2004
@@ -0,0 +1,78 @@
+/*====================================================================
+
+GoTM: GoTM is an open Transaction Monitor
+Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
+Contact: gotm-team@xxxxxxxxxxxxx
+
+This library 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 any later version.
+
+This library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+
+Initial developer(s): Romain Rouvoy.
+Contributor(s): .
+
+---------------------------------------------------------------------
+$Id: EventListenerFeatureContext.java,v 1.1 2004/06/02 09:44:26 rouvoy Exp $
+====================================================================*/
+
+package org.objectweb.gotm.browser.event;
+
+import java.util.Vector;
+
+import org.objectweb.transaction.api.event.Event;
+import org.objectweb.transaction.api.event.EventListenerFeature;
+import org.objectweb.util.browser.api.Entry;
+import org.objectweb.util.browser.core.naming.DefaultEntry;
+import org.objectweb.util.browser.core.naming.DefaultName;
+import
org.objectweb.util.browser.plugins.fractal.context.DefaultFractalContext;
+
+/**
+ * contextconainer ...
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @version 0.1
+ */
+public class EventListenerFeatureContext
+ extends DefaultFractalContext
+{
+
+ protected EventListenerFeature listener ;
+
+ /**
+ * @return Returns the listener.
+ */
+ protected EventListenerFeature getListener() {
+ return listener;
+ }
+
+ /**
+ * @param listener The listener to set.
+ */
+ protected void setListener(EventListenerFeature listener) {
+ this.listener = listener;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.context.DefaultFractalContext#getStartedEntries()
+ */
+ public Entry[] getStartedEntries() {
+ Event[] events = getListener().getEvents();
+ Vector entries = new Vector();
+ for (int i=0;i<events.length;i++) {
+ entries.add(new DefaultEntry(new
EventContextContainer(getListener().getListeners(events[i])),
+ new
DefaultName(events[i].getClass().getName()),
+ this));
+ }
+ return (Entry[]) entries.toArray(new Entry[0]);
+ }
+}
Index:
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionActivationFeatureBeginAction.java
diff -u /dev/null
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionActivationFeatureBeginAction.java:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionActivationFeatureBeginAction.java
Wed Jun 2 11:44:25 2004
@@ -0,0 +1,76 @@
+/*====================================================================
+
+GoTM: GoTM is an open Transaction Monitor
+Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
+Contact: gotm-team@xxxxxxxxxxxxx
+
+This library 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 any later version.
+
+This library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+
+Initial developer(s): Romain Rouvoy.
+Contributor(s): .
+
+---------------------------------------------------------------------
+$Id: TransactionActivationFeatureBeginAction.java,v 1.1 2004/06/02 09:44:25
rouvoy Exp $
+====================================================================*/
+
+package org.objectweb.gotm.browser.transaction;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.Interface;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.api.control.LifeCycleController;
+import
org.objectweb.transaction.api.transaction.TransactionActivationFeature;
+import org.objectweb.transaction.api.transaction.TransactionStatusFeature;
+import
org.objectweb.transaction.lib.transaction.TransactionStatusTransactionActive;
+import org.objectweb.util.browser.api.MenuItem;
+import org.objectweb.util.browser.api.MenuItemTreeView;
+import org.objectweb.util.browser.api.TreeView;
+import org.objectweb.util.browser.plugins.fractal.FcBrowser;
+import
org.objectweb.util.browser.plugins.fractal.menu.DefaultFractalMenuItem;
+
+/**
+ *
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @version 0.1
+ */
+public class TransactionActivationFeatureBeginAction
+ extends DefaultFractalMenuItem
+{
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.api.MenuItem#getStatus(org.objectweb.util.browser.api.TreeView)
+ */
+ public int getStartedStatus(TreeView arg0) {
+ Component cpt = (Component) arg0.getParentObject();
+ try {
+ TransactionStatusFeature status = (TransactionStatusFeature)
cpt.getFcInterface(TransactionStatusFeature.STATUS_FEATURE);
+ if (FcBrowser.getLifeCycleState((Interface)status) ==
LifeCycleController.STOPPED)
+ return getStoppedStatus(arg0);
+ if (status.getStatus() ==
TransactionStatusTransactionActive.status)
+ return MenuItem.DISABLED_STATUS;
+ return MenuItem.ENABLED_STATUS;
+ } catch (NoSuchInterfaceException e) {
+ return MenuItem.DISABLED_STATUS;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.DefaultFractalMenuItem#actionStartedPerformed(org.objectweb.util.browser.api.MenuItemEvent)
+ */
+ public void actionStartedPerformed(MenuItemTreeView arg0) throws
Exception {
+ TransactionActivationFeature activation =
(TransactionActivationFeature) arg0.getSelectedObject();
+ activation.begin();
+ }
+}
Index:
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionActivationFeatureCommitAction.java
diff -u /dev/null
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionActivationFeatureCommitAction.java:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionActivationFeatureCommitAction.java
Wed Jun 2 11:44:25 2004
@@ -0,0 +1,77 @@
+/*====================================================================
+
+GoTM: GoTM is an open Transaction Monitor
+Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
+Contact: gotm-team@xxxxxxxxxxxxx
+
+This library 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 any later version.
+
+This library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+
+Initial developer(s): Romain Rouvoy.
+Contributor(s): .
+
+---------------------------------------------------------------------
+$Id: TransactionActivationFeatureCommitAction.java,v 1.1 2004/06/02 09:44:25
rouvoy Exp $
+====================================================================*/
+
+package org.objectweb.gotm.browser.transaction;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.Interface;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.api.control.LifeCycleController;
+import
org.objectweb.transaction.api.transaction.TransactionActivationFeature;
+import org.objectweb.transaction.api.transaction.TransactionStatusFeature;
+import
org.objectweb.transaction.lib.transaction.TransactionStatusNoTransaction;
+import org.objectweb.util.browser.api.MenuItem;
+import org.objectweb.util.browser.api.MenuItemTreeView;
+import org.objectweb.util.browser.api.TreeView;
+import org.objectweb.util.browser.plugins.fractal.FcBrowser;
+import
org.objectweb.util.browser.plugins.fractal.menu.DefaultFractalMenuItem;
+
+/**
+ *
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @version 0.1
+ */
+public class TransactionActivationFeatureCommitAction
+ extends DefaultFractalMenuItem
+{
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.api.MenuItem#getStatus(org.objectweb.util.browser.api.TreeView)
+ */
+ public int getStartedStatus(TreeView arg0) {
+ Component cpt = (Component) arg0.getParentObject();
+ try {
+ TransactionStatusFeature status = (TransactionStatusFeature)
cpt.getFcInterface(TransactionStatusFeature.STATUS_FEATURE);
+ if (FcBrowser.getLifeCycleState((Interface)status) ==
LifeCycleController.STOPPED)
+ return getStoppedStatus(arg0);
+ if (status.getStatus() == TransactionStatusNoTransaction.status)
+ return MenuItem.DISABLED_STATUS;
+ return MenuItem.ENABLED_STATUS;
+ } catch (NoSuchInterfaceException e) {
+ return MenuItem.DISABLED_STATUS;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.DefaultFractalMenuItem#actionStartedPerformed(org.objectweb.util.browser.api.MenuItemEvent)
+ */
+ public void actionStartedPerformed(MenuItemTreeView arg0) throws
Exception {
+ TransactionActivationFeature activation =
(TransactionActivationFeature) arg0.getSelectedObject();
+ activation.commit();
+ }
+}
\ No newline at end of file
Index:
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionActivationFeatureRollbackAction.java
diff -u /dev/null
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionActivationFeatureRollbackAction.java:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionActivationFeatureRollbackAction.java
Wed Jun 2 11:44:25 2004
@@ -0,0 +1,79 @@
+/*====================================================================
+
+GoTM: GoTM is an open Transaction Monitor
+Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
+Contact: gotm-team@xxxxxxxxxxxxx
+
+This library 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 any later version.
+
+This library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+
+Initial developer(s): Romain Rouvoy.
+Contributor(s): .
+
+---------------------------------------------------------------------
+$Id: TransactionActivationFeatureRollbackAction.java,v 1.1 2004/06/02
09:44:25 rouvoy Exp $
+====================================================================*/
+
+package org.objectweb.gotm.browser.transaction;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.Interface;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.api.control.LifeCycleController;
+import
org.objectweb.transaction.api.transaction.TransactionActivationFeature;
+import org.objectweb.transaction.api.transaction.TransactionStatusFeature;
+import
org.objectweb.transaction.lib.transaction.TransactionStatusNoTransaction;
+import org.objectweb.util.browser.api.MenuItem;
+import org.objectweb.util.browser.api.MenuItemTreeView;
+import org.objectweb.util.browser.api.TreeView;
+import org.objectweb.util.browser.plugins.fractal.FcBrowser;
+import
org.objectweb.util.browser.plugins.fractal.menu.DefaultFractalMenuItem;
+
+/**
+ *
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @version 0.1
+ */
+public class TransactionActivationFeatureRollbackAction
+ extends DefaultFractalMenuItem
+{
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.api.MenuItem#getStatus(org.objectweb.util.browser.api.TreeView)
+ */
+ public int getStartedStatus(TreeView arg0) {
+ Component cpt = (Component) arg0.getParentObject();
+ try {
+ TransactionStatusFeature status = (TransactionStatusFeature)
cpt.getFcInterface(TransactionStatusFeature.STATUS_FEATURE);
+ if (FcBrowser.getLifeCycleState((Interface)status) ==
LifeCycleController.STOPPED)
+ return getStoppedStatus(arg0);
+ if (status.getStatus() == TransactionStatusNoTransaction.status)
+ return MenuItem.DISABLED_STATUS;
+ return MenuItem.ENABLED_STATUS;
+ } catch (NoSuchInterfaceException e) {
+ return MenuItem.DISABLED_STATUS;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.DefaultFractalMenuItem#actionStartedPerformed(org.objectweb.util.browser.api.MenuItemEvent)
+ */
+ public void actionStartedPerformed(MenuItemTreeView arg0)
+ throws Exception
+ {
+ TransactionActivationFeature activation =
(TransactionActivationFeature) arg0.getSelectedObject();
+ activation.rollback();
+ }
+}
Index:
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionInterruptionFeatureResumeAction.java
diff -u /dev/null
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionInterruptionFeatureResumeAction.java:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionInterruptionFeatureResumeAction.java
Wed Jun 2 11:44:25 2004
@@ -0,0 +1,78 @@
+/*====================================================================
+
+GoTM: GoTM is an open Transaction Monitor
+Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
+Contact: gotm-team@xxxxxxxxxxxxx
+
+This library 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 any later version.
+
+This library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+
+Initial developer(s): Romain Rouvoy.
+Contributor(s): .
+
+---------------------------------------------------------------------
+$Id: TransactionInterruptionFeatureResumeAction.java,v 1.1 2004/06/02
09:44:25 rouvoy Exp $
+====================================================================*/
+
+package org.objectweb.gotm.browser.transaction;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.Interface;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.api.control.LifeCycleController;
+import
org.objectweb.transaction.api.transaction.TransactionInterruptionFeature;
+import org.objectweb.transaction.api.transaction.TransactionStatusFeature;
+import
org.objectweb.transaction.lib.transaction.TransactionStatusTransactionActive;
+import org.objectweb.util.browser.api.MenuItem;
+import org.objectweb.util.browser.api.MenuItemTreeView;
+import org.objectweb.util.browser.api.TreeView;
+import org.objectweb.util.browser.plugins.fractal.FcBrowser;
+import
org.objectweb.util.browser.plugins.fractal.menu.DefaultFractalMenuItem;
+
+/**
+ *
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @version 0.1
+ */
+public class TransactionInterruptionFeatureResumeAction
+ extends DefaultFractalMenuItem
+{
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.api.MenuItem#getStatus(org.objectweb.util.browser.api.TreeView)
+ */
+ public int getStartedStatus(TreeView arg0) {
+ Component cpt = (Component) arg0.getParentObject();
+ try {
+ TransactionStatusFeature status = (TransactionStatusFeature)
cpt.getFcInterface(TransactionStatusFeature.STATUS_FEATURE);
+ if (FcBrowser.getLifeCycleState((Interface)status) ==
LifeCycleController.STOPPED)
+ return getStoppedStatus(arg0);
+ if (status.getStatus() ==
TransactionStatusTransactionActive.status)
+ return MenuItem.DISABLED_STATUS;
+ return MenuItem.ENABLED_STATUS;
+ } catch (NoSuchInterfaceException e) {
+ return MenuItem.DISABLED_STATUS;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.DefaultFractalMenuItem#actionStartedPerformed(org.objectweb.util.browser.api.MenuItemEvent)
+ */
+ public void actionStartedPerformed(MenuItemTreeView arg0)
+ throws Exception
+ {
+ TransactionInterruptionFeature interruption =
(TransactionInterruptionFeature) arg0.getSelectedObject();
+ interruption.resume();
+ }
+}
Index:
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionInterruptionFeatureSuspendAction.java
diff -u /dev/null
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionInterruptionFeatureSuspendAction.java:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionInterruptionFeatureSuspendAction.java
Wed Jun 2 11:44:25 2004
@@ -0,0 +1,79 @@
+/*====================================================================
+
+GoTM: GoTM is an open Transaction Monitor
+Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
+Contact: gotm-team@xxxxxxxxxxxxx
+
+This library 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 any later version.
+
+This library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+
+Initial developer(s): Romain Rouvoy.
+Contributor(s): .
+
+---------------------------------------------------------------------
+$Id: TransactionInterruptionFeatureSuspendAction.java,v 1.1 2004/06/02
09:44:25 rouvoy Exp $
+====================================================================*/
+
+package org.objectweb.gotm.browser.transaction;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.Interface;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.api.control.LifeCycleController;
+import
org.objectweb.transaction.api.transaction.TransactionInterruptionFeature;
+import org.objectweb.transaction.api.transaction.TransactionStatusFeature;
+import
org.objectweb.transaction.lib.transaction.TransactionStatusNoTransaction;
+import org.objectweb.util.browser.api.MenuItem;
+import org.objectweb.util.browser.api.MenuItemTreeView;
+import org.objectweb.util.browser.api.TreeView;
+import org.objectweb.util.browser.plugins.fractal.FcBrowser;
+import
org.objectweb.util.browser.plugins.fractal.menu.DefaultFractalMenuItem;
+
+/**
+ *
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @version 0.1
+ */
+public class TransactionInterruptionFeatureSuspendAction
+ extends DefaultFractalMenuItem
+{
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.api.MenuItem#getStatus(org.objectweb.util.browser.api.TreeView)
+ */
+ public int getStartedStatus(TreeView arg0) {
+ Component cpt = (Component) arg0.getParentObject();
+ try {
+ TransactionStatusFeature status = (TransactionStatusFeature)
cpt.getFcInterface(TransactionStatusFeature.STATUS_FEATURE);
+ if (FcBrowser.getLifeCycleState((Interface)status) ==
LifeCycleController.STOPPED)
+ return getStoppedStatus(arg0);
+ if (status.getStatus() == TransactionStatusNoTransaction.status)
+ return MenuItem.DISABLED_STATUS;
+ return MenuItem.ENABLED_STATUS;
+ } catch (NoSuchInterfaceException e) {
+ return MenuItem.DISABLED_STATUS;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.DefaultFractalMenuItem#actionStartedPerformed(org.objectweb.util.browser.api.MenuItemEvent)
+ */
+ public void actionStartedPerformed(MenuItemTreeView arg0)
+ throws Exception
+ {
+ TransactionInterruptionFeature interruption =
(TransactionInterruptionFeature) arg0.getSelectedObject();
+ interruption.suspend();
+ }
+}
\ No newline at end of file
Index:
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionStatePanel.java
diff -u /dev/null
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionStatePanel.java:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionStatePanel.java
Wed Jun 2 11:44:25 2004
@@ -0,0 +1,90 @@
+/*====================================================================
+
+GoTM: GoTM is an open Transaction Monitor
+Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
+Contact: gotm-team@xxxxxxxxxxxxx
+
+This library 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 any later version.
+
+This library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+
+Initial developer(s): Romain Rouvoy.
+Contributor(s): .
+
+---------------------------------------------------------------------
+$Id: TransactionStatePanel.java,v 1.1 2004/06/02 09:44:25 rouvoy Exp $
+====================================================================*/
+
+package org.objectweb.gotm.browser.transaction;
+
+import java.awt.Color;
+
+import javax.swing.Box;
+import javax.swing.JPanel;
+import javax.swing.border.TitledBorder;
+
+import org.objectweb.transaction.api.transaction.TransactionState;
+import org.objectweb.util.browser.api.TreeView;
+import org.objectweb.util.browser.gui.lib.LabelBox;
+import
org.objectweb.util.browser.plugins.fractal.panel.DefaultFractalViewPanel;
+
+/**
+ *
+ *
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ *
+ * @version 0,1
+ */
+public class TransactionStatePanel
+ extends DefaultFractalViewPanel
+{
+ protected JPanel my_panel_ ;
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.panel.FractalViewPanel#selectedStarted(org.objectweb.util.browser.api.TreeView)
+ */
+ public void selectedStarted(TreeView arg0) {
+ TransactionState tx_state = (TransactionState)
arg0.getSelectedObject();
+ my_panel_ = new JPanel();
+ my_panel_.setBackground(Color.white);
+ my_panel_.setBorder(new TitledBorder(null,
+ " Transaction attributes ",
+
TitledBorder.CENTER,TitledBorder.TOP));
+
+ Box box = Box.createVerticalBox();
+
+ LabelBox status_label = new LabelBox("Status",
+
tx_state.getStatus().toString());
+ box.add(status_label);
+
+ LabelBox timeout_label = new LabelBox("Timeout",
+
String.valueOf(tx_state.getTimeout()));
+ box.add(timeout_label);
+
+ my_panel_.add(box);
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.panel.FractalViewPanel#getStartedPanel()
+ */
+ public JPanel getStartedPanel() {
+ return my_panel_;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.panel.FractalViewPanel#unselectedStarted(org.objectweb.util.browser.api.TreeView)
+ */
+ public void unselectedStarted(TreeView arg0) {
+ }
+}
Index:
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionStatusFeatureIconProvider.java
diff -u /dev/null
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionStatusFeatureIconProvider.java:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++
gotm-explorer/src/java/org/objectweb/gotm/browser/transaction/TransactionStatusFeatureIconProvider.java
Wed Jun 2 11:44:25 2004
@@ -0,0 +1,67 @@
+/*====================================================================
+
+GoTM: GoTM is an open Transaction Monitor
+Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
+Contact: gotm-team@xxxxxxxxxxxxx
+
+This library 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 any later version.
+
+This library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+
+Initial developer(s): Romain Rouvoy.
+Contributor(s): .
+
+---------------------------------------------------------------------
+$Id: TransactionStatusFeatureIconProvider.java,v 1.1 2004/06/02 09:44:25
rouvoy Exp $
+====================================================================*/
+
+package org.objectweb.gotm.browser.transaction;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+
+import org.objectweb.fractal.api.Interface;
+import org.objectweb.fractal.api.control.LifeCycleController;
+import org.objectweb.transaction.api.transaction.TransactionStatusFeature;
+import
org.objectweb.transaction.lib.transaction.TransactionStatusTransactionActive;
+import org.objectweb.util.browser.plugins.fractal.FcBrowser;
+import
org.objectweb.util.browser.plugins.fractal.icon.DefaultFractalIconProvider;
+
+/**
+ *
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ * @version 0.1
+ */
+public class TransactionStatusFeatureIconProvider
+ extends DefaultFractalIconProvider
+{
+ protected Icon startIcon, stopIcon;
+
+ public TransactionStatusFeatureIconProvider() {
+ startIcon = new
ImageIcon(Thread.currentThread().getContextClassLoader().getResource("started.png"));
+ stopIcon = new
ImageIcon(Thread.currentThread().getContextClassLoader().getResource("stopped.png"));
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.DefaultFractalIconProvider#newStartedIcon(java.lang.Object)
+ */
+ public Icon newStartedIcon(Object arg0) {
+ TransactionStatusFeature status = (TransactionStatusFeature) arg0;
+ if (FcBrowser.getLifeCycleState((Interface)status) ==
LifeCycleController.STOPPED)
+ return newStoppedIcon(arg0);
+ if (status.getStatus() == TransactionStatusTransactionActive.status)
+ return startIcon;
+ return stopIcon;
+ }
+}
Index:
gotm-explorer/src/java/org/objectweb/gotm/browser/xid/XidStatePanel.java
diff -u /dev/null
gotm-explorer/src/java/org/objectweb/gotm/browser/xid/XidStatePanel.java:1.1
--- /dev/null Wed Jun 2 11:44:26 2004
+++ gotm-explorer/src/java/org/objectweb/gotm/browser/xid/XidStatePanel.java
Wed Jun 2 11:44:25 2004
@@ -0,0 +1,95 @@
+/*====================================================================
+
+GoTM: GoTM is an open Transaction Monitor
+Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
+Contact: gotm-team@xxxxxxxxxxxxx
+
+This library 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 any later version.
+
+This library 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 library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+
+Initial developer(s): Romain Rouvoy.
+Contributor(s): .
+
+---------------------------------------------------------------------
+$Id: XidStatePanel.java,v 1.1 2004/06/02 09:44:25 rouvoy Exp $
+====================================================================*/
+
+package org.objectweb.gotm.browser.xid;
+
+import java.awt.Color;
+
+import javax.swing.Box;
+import javax.swing.JPanel;
+import javax.swing.border.TitledBorder;
+
+import org.objectweb.transaction.api.xid.XidState;
+import org.objectweb.util.browser.api.TreeView;
+import org.objectweb.util.browser.gui.lib.LabelBox;
+import
org.objectweb.util.browser.plugins.fractal.panel.DefaultFractalViewPanel;
+
+/**
+ *
+ * @author <a href="mailto:Romain.Rouvoy@xxxxxxx">Romain Rouvoy</a>
+ *
+ * @version 0,1
+ */
+public class XidStatePanel
+ extends DefaultFractalViewPanel {
+
+ protected XidState xid_state_ ;
+ protected JPanel my_panel_ ;
+
+ public XidStatePanel(){
+// setBackground(Color.white);
+// setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
+ }
+
+
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.panel.FractalViewPanel#preStartedInitialize(org.objectweb.util.browser.api.TreeView)
+ */
+ public void selectedStarted(TreeView arg0) {
+ xid_state_ = (XidState) arg0.getSelectedObject();
+ my_panel_ = new JPanel();
+ my_panel_.setBackground(Color.white);
+ my_panel_.setBorder(new TitledBorder(null," XID attributes
",TitledBorder.CENTER,TitledBorder.TOP));
+
+ Box box = Box.createVerticalBox();
+
+ LabelBox branch_qual = new LabelBox("Branch Qualifier",new
String(xid_state_.getBranchQualifier()));
+ box.add(branch_qual);
+ LabelBox format_id = new LabelBox("Format ID",
String.valueOf(xid_state_.getFormatId()));
+ box.add(format_id);
+ LabelBox global_id = new LabelBox("Global Transaction ID", new
String(xid_state_.getGlobalTransactionId()));
+ box.add(global_id);
+ my_panel_.add(box);
+ }
+
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.panel.FractalViewPanel#getStartedPanel()
+ */
+ public JPanel getStartedPanel() {
+ return my_panel_;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.objectweb.util.browser.plugins.fractal.panel.FractalViewPanel#postStartedInitialize(org.objectweb.util.browser.api.TreeView)
+ */
+ public void unselectedStarted(TreeView arg0) {
+ }
+
+}
Index: gotm-explorer/src/pics/feature.png
cvs rdiff: failed to read diff file header /tmp/cvs5MIqvV for feature.png,v:
end of file
Index: gotm-explorer/src/pics/started.png
cvs rdiff: failed to read diff file header /tmp/cvs0KUdfW for started.png,v:
end of file
Index: gotm-explorer/src/pics/state.png
cvs rdiff: failed to read diff file header /tmp/cvs9XFF0W for state.png,v:
end of file
Index: gotm-explorer/src/pics/stopped.png
cvs rdiff: failed to read diff file header /tmp/cvsGBnIHX for stopped.png,v:
end of file
| <-- Date Index | <-- Thread Index |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.