[jbpm-commits] JBoss JBPM SVN: r4752 - in projects/gwt-console/trunk: gui/war and 20 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu May 7 03:34:09 EDT 2009
Author: heiko.braun at jboss.com
Date: 2009-05-07 03:34:08 -0400 (Thu, 07 May 2009)
New Revision: 4752
Added:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusAction.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusView.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditor.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditorNavigation.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/05_1.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/13.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/27.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/31.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/49.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/ConsoleIconBundle.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/add.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/add_small.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/confirmIcon.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/confirm_small.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/denyIcon.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/deny_small.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/docIcon.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/errorIcon.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/examine.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/large.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/large_small.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/lockIcon.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/lock_small.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/pause.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/pause_small.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/play.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/play_small.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/processIcon.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/remove.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/remove_small.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/stop.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/stop_small.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/taskIcon.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/toolsIcon.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/unlock.png
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/userIcon.png
projects/gwt-console/trunk/gui/workspace-api/scripts/
projects/gwt-console/trunk/gui/workspace-api/scripts/antrun-version.xml
projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/PluginInfo.java
projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ServerStatus.java
projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/InfoFacade.java
Modified:
projects/gwt-console/trunk/gui/war/gui-war.iml
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/Header.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java
projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml
projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/public/console.css
projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/workspace-default.cfg
projects/gwt-console/trunk/gui/workspace-api/pom.xml
projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java
projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/Editor.java
projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/Menu.java
projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/MenuSection.java
projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/Workspace.java
projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java
projects/gwt-console/trunk/gui/workspace-api/workspace-api.iml
projects/gwt-console/trunk/gui/workspace-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsEditor.java
projects/gwt-console/trunk/gui/workspace-example/workspace-example.iml
projects/gwt-console/trunk/gwt-parent.iml
projects/gwt-console/trunk/server/server-core/server-core.iml
projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/ConsoleServerApplication.java
projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskListFacade.java
projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java
projects/gwt-console/trunk/server/server-core/src/main/webapp/WEB-INF/web.xml
projects/gwt-console/trunk/server/server-integration/pom.xml
projects/gwt-console/trunk/server/server-integration/server-integration.iml
projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/integration/TaskManagement.java
projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/plugin/PluginMgr.java
projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/util/ServiceLoader.java
Log:
Added ServerStatusView. Added ConsoleImageBundle
Modified: projects/gwt-console/trunk/gui/war/gui-war.iml
===================================================================
--- projects/gwt-console/trunk/gui/war/gui-war.iml 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/war/gui-war.iml 2009-05-07 07:34:08 UTC (rev 4752)
@@ -11,8 +11,8 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="workspace-api" exported="" />
- <orderEntry type="module" module-name="gwt-rpc" exported="" />
+ <orderEntry type="module" module-name="gwt-parent" />
+ <orderEntry type="module" module-name="workspace-api" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
<CLASSES>
@@ -208,6 +208,7 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module" module-name="gwt-rpc" />
<orderEntryProperties />
</component>
</module>
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/Header.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/Header.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/Header.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -62,6 +62,7 @@
private void createInfoPanel()
{
+ // user info
HorizontalPanel p = new HorizontalPanel();
p.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
p.setStyleName("bpm-header-userinfo");
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -24,10 +24,7 @@
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.Response;
import com.google.gwt.user.client.WindowCloseListener;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.ClickListener;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.ui.*;
import com.google.gwt.core.client.GWT;
import com.mvc4g.client.Controller;
import com.mvc4g.client.ViewInterface;
@@ -56,7 +53,7 @@
private WindowPanel window = null;
private TextBox usernameInput;
- private TextBox passwordInput;
+ private PasswordTextBox passwordInput;
public final static String[] KNOWN_ROLES = {"admin", "manager", "user"};
@@ -88,12 +85,7 @@
public void display()
{
- createLayoutWindowPanel();
-
- // remove later on
- usernameInput.setText("alex");
- passwordInput.setText("password");
-
+ createLayoutWindowPanel();
window.center();
}
@@ -188,7 +180,7 @@
builder.nextLine(); // empty space
- passwordInput = new TextBox();
+ passwordInput = new PasswordTextBox();
builder.append("Password:", passwordInput);
builder.nextLine();
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -26,6 +26,7 @@
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.Window;
import com.mvc4g.client.Controller;
import org.gwt.mosaic.ui.client.*;
import org.gwt.mosaic.ui.client.layout.BorderLayout;
@@ -96,7 +97,12 @@
controller.addView(Header.ID, header);
controller.addAction(LoadingStatusAction.ID, new LoadingStatusAction());
-
+
+
+ // default editor
+ if(workspace.hasEditor(SettingsEditor.ID))
+ workspace.showEditor(SettingsEditor.ID);
+
return layoutPanel;
}
@@ -163,5 +169,16 @@
{
return workspace;
}
+
+ /**
+ * hack in order to correctly display widgets that have
+ * been rendered hidden
+ */
+ public void refreshView()
+ {
+ final int width = Window.getClientWidth();
+ final int height = Window.getClientHeight();
+ getViewport().onWindowResized(width, height);
+ }
}
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusAction.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusAction.java (rev 0)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusAction.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -0,0 +1,67 @@
+/*
+ * 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.bpm.console.client;
+
+import org.jboss.bpm.console.client.common.AbstractRESTAction;
+import org.jboss.bpm.console.client.model.ServerStatus;
+import org.jboss.bpm.console.client.model.DTOParser;
+import com.google.gwt.http.client.RequestBuilder;
+import com.google.gwt.http.client.Response;
+import com.google.gwt.json.client.JSONValue;
+import com.google.gwt.json.client.JSONParser;
+import com.mvc4g.client.Controller;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class ServerStatusAction extends AbstractRESTAction
+{
+ public final static String ID = ServerStatusAction.class.getName();
+
+ public ServerStatusAction(ApplicationContext appContetext)
+ {
+ super(appContetext);
+ }
+
+ public String getId()
+ {
+ return ID;
+ }
+
+ public String getUrl(Object event)
+ {
+ return appContext.getUrlBuilder().getServerStatusURL();
+ }
+
+ public RequestBuilder.Method getRequestMethod()
+ {
+ return RequestBuilder.GET;
+ }
+
+ public void handleSuccessfulResponse(final Controller controller, final Object event, Response response)
+ {
+ JSONValue json = JSONParser.parse(response.getText());
+ ServerStatus status = DTOParser.parseStatus(json);
+ ServerStatusView view = (ServerStatusView)controller.getView(ServerStatusView.ID);
+ view.update(status);
+ }
+}
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusView.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusView.java (rev 0)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ServerStatusView.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -0,0 +1,82 @@
+/*
+ * 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.bpm.console.client;
+
+import com.mvc4g.client.Controller;
+import com.mvc4g.client.ViewInterface;
+import com.google.gwt.user.client.ui.Grid;
+import com.google.gwt.user.client.ui.Image;
+import org.gwt.mosaic.ui.client.layout.LayoutPanel;
+import org.gwt.mosaic.ui.client.Label;
+import org.jboss.bpm.console.client.model.ServerStatus;
+import org.jboss.bpm.console.client.model.PluginInfo;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class ServerStatusView extends LayoutPanel
+ implements ViewInterface
+{
+
+ public final static String ID = ServerStatusView.class.getName();
+
+ private Controller controller;
+ private LayoutPanel container;
+ private ApplicationContext appContext;
+
+ public ServerStatusView(ApplicationContext appContext)
+ {
+ this.appContext = appContext;
+ container = new LayoutPanel();
+
+ }
+
+ public void setController(Controller controller)
+ {
+ this.controller = controller;
+ }
+
+ public void update(ServerStatus status)
+ {
+ Grid g = new Grid(status.getPlugins().size()+1, 2);
+
+ g.setWidget(0, 0, new Label("Plugins:"));
+
+ for (int row = 1; row < status.getPlugins().size()+1; ++row)
+ {
+ PluginInfo p = status.getPlugins().get(row-1);
+ g.setText(row, 0, p.getType());
+
+ final Image img = p.isAvailable() ?
+ new Image("images/icons/confirm_small.png"):
+ new Image("images/icons/deny_small.png");
+
+ g.setWidget(row, 1, img );
+ }
+
+ container.add(g);
+ this.add(container);
+
+ this.invalidate();
+ appContext.refreshView();
+ }
+}
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditor.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditor.java (rev 0)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditor.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -0,0 +1,131 @@
+/*
+ * 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.bpm.console.client;
+
+import com.google.gwt.user.client.ui.*;
+import com.google.gwt.core.client.GWT;
+import com.mvc4g.client.Event;
+import org.gwt.mosaic.ui.client.Label;
+import org.gwt.mosaic.ui.client.CaptionLayoutPanel;
+import org.gwt.mosaic.ui.client.layout.*;
+import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class SettingsEditor extends Editor
+{
+
+ public final static String ID = SettingsEditor.class.getName();
+
+ public SettingsEditor(ApplicationContext appContext)
+ {
+ super(appContext);
+ }
+
+ public void initialize()
+ {
+ if(!isInitialized())
+ {
+
+ final LayoutPanel layoutPanel = new LayoutPanel(
+ new BoxLayout(BoxLayout.Orientation.VERTICAL)
+ );
+
+ // provide console overview
+ CaptionLayoutPanel infoPanel = new CaptionLayoutPanel(
+ "System Overview"
+ );
+
+ infoPanel.setLayout(new BoxLayout(BoxLayout.Orientation.VERTICAL));
+
+ // console info
+ HTML console = new HTML("<h3>Console Info</h3>");
+
+ infoPanel.add(console);
+
+ Grid g1 = new Grid(2,2);
+ g1.setWidget(0,0, new Label("Build:"));
+ g1.setText(0,1, "jBPM Console");
+
+ g1.setWidget(1,0, new Label("Version:"));
+ g1.setText(1,1, Version.VERSION);
+ infoPanel.add(g1);
+
+
+ // server info
+ HTML server = new HTML("<h3>Server Info</h3>");
+ infoPanel.add(server);
+
+ Grid g2 = new Grid(1,2);
+ g2.setWidget(0,0, new Label("Host:"));
+ g2.setText(0,1, appContext.getConfig().getConsoleServerUrl());
+
+ ServerStatusView serverStatus = new ServerStatusView(appContext);
+
+ infoPanel.add(g2);
+ infoPanel.add(serverStatus); // Doesn't render in grid
+
+ layoutPanel.add(infoPanel, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL, true));
+ this.add(layoutPanel, new BorderLayoutData(BorderLayout.Region.CENTER));
+
+ // view and actions
+
+ super.controller.addView(ServerStatusView.ID, serverStatus);
+ super.controller.addAction(ServerStatusAction.ID, new ServerStatusAction(appContext));
+
+ // load server status
+ super.controller.handleEvent(
+ new Event(ServerStatusAction.ID, null)
+ );
+ isInitialized = true;
+ }
+
+ }
+
+ public String getEditorId()
+ {
+ return ID;
+ }
+
+ public String getTitle()
+ {
+ return "Settings";
+ }
+
+ public String getIconCSS()
+ {
+ return "bpm-settings-editor";
+ }
+
+ public MenuSection provideMenuSection()
+ {
+ ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
+
+ return new MenuSection(
+ "Settings",
+ icons.settingsIcon(),
+ new SettingsEditorNavigation(appContext)
+ );
+
+ }
+}
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditorNavigation.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditorNavigation.java (rev 0)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditorNavigation.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -0,0 +1,62 @@
+/*
+ * 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.bpm.console.client;
+
+import com.google.gwt.user.client.ui.Tree;
+import com.google.gwt.user.client.ui.TreeItem;
+import com.google.gwt.user.client.ui.TreeListener;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.Workspace;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+class SettingsEditorNavigation extends Tree
+{
+
+ public SettingsEditorNavigation(final ApplicationContext appContext)
+ {
+ super.setTitle("Settings");
+
+ TreeItem root = addItem("Console");
+ root.addItem("Overview");
+
+ addTreeListener(
+ new TreeListener()
+ {
+ public void onTreeItemSelected(TreeItem treeItem)
+ {
+ if("Overview".equals(treeItem.getText()))
+ {
+ Workspace workspace = appContext.getWorkpace();
+ workspace.showEditor(SettingsEditor.ID);
+ }
+ }
+
+ public void onTreeItemStateChanged(TreeItem treeItem)
+ {
+
+ }
+ }
+ );
+ }
+}
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/05_1.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/05_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/13.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/13.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/27.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/27.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/31.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/31.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/49.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/49.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/ConsoleIconBundle.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/ConsoleIconBundle.java (rev 0)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/ConsoleIconBundle.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -0,0 +1,56 @@
+/*
+ * 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.bpm.console.client.icons;
+
+import com.google.gwt.user.client.ui.AbstractImagePrototype;
+import com.google.gwt.user.client.ui.ImageBundle;
+
+public interface ConsoleIconBundle extends ImageBundle
+{
+ /**
+ * @gwt.resource processIcon.png
+ */
+ AbstractImagePrototype processIcon();
+
+ /**
+ * Would bundle the file 'open-file-icon.gif' residing in the same package as this type.
+ * @gwt.resource open-file-icon.gif
+
+ AbstractImagePrototype openFileIcon();
+
+ /**
+ * Would bundle the file 'savefile.gif' residing in the package 'org.example.icons'.
+ * @gwt.resource org/example/icons/savefile.gif
+
+ AbstractImagePrototype saveFileIcon();
+ */
+
+ /**
+ * @gwt.resource docIcon.png
+ */
+ AbstractImagePrototype settingsIcon();
+
+ /**
+ * @gwt.resource taskIcon.png
+ */
+ AbstractImagePrototype taskIcon();
+}
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/add.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/add.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/add_small.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/add_small.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/confirmIcon.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/confirmIcon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/confirm_small.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/confirm_small.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/denyIcon.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/denyIcon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/deny_small.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/deny_small.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/docIcon.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/docIcon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/errorIcon.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/errorIcon.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/examine.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/examine.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/large.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/large.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/large_small.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/large_small.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/lockIcon.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/lockIcon.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/lock_small.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/lock_small.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/pause.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/pause.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/pause_small.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/pause_small.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/play.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/play.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/play_small.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/play_small.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/processIcon.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/processIcon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/remove.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/remove.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/remove_small.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/remove_small.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/stop.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/stop.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/stop_small.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/stop_small.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/taskIcon.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/taskIcon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/toolsIcon.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/toolsIcon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/unlock.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/unlock.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/userIcon.png
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/userIcon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -182,8 +182,6 @@
this.add(instanceList);
-
-
isInitialized = true;
}
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -24,6 +24,7 @@
import com.google.gwt.user.client.ui.SourcesTabEvents;
import com.google.gwt.user.client.ui.TabListener;
import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.core.client.GWT;
import com.mvc4g.client.ActionInterface;
import com.mvc4g.client.Event;
import com.mvc4g.client.ViewInterface;
@@ -36,6 +37,7 @@
import org.jboss.bpm.console.client.Editor;
import org.jboss.bpm.console.client.MenuSection;
import org.jboss.bpm.console.client.LazyPanel;
+import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
@@ -85,7 +87,7 @@
if(!lazyPanel.isInitialized())
{
lazyPanel.initialize();
- refreshView(); // TODO: hack around rendering problems
+ appContext.refreshView(); // TODO: hack around rendering problems
}
}
}
@@ -111,7 +113,7 @@
new Event(LoadDefinitionsAction.ID, null)
);
- refreshView();
+ appContext.refreshView();
isInitialized = true;
}
@@ -148,9 +150,11 @@
public MenuSection provideMenuSection()
{
+ ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
+
return new MenuSection(
"Processes",
- "bpm-process-icon",
+ icons.processIcon(),
new ProcessEditorNavigation(appContext)
);
}
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -101,9 +101,7 @@
int index = listBox.getSelectedIndex();
if(index!=-1)
{
- appContext.displayMessage(
- "Sel1 " + listBox.getItem(index).getId(), false
- );
+ //
}
}
});
@@ -130,21 +128,17 @@
toolBar.addSeparator();
toolBar.add(
- new ToolButton("View form", new ClickListener() {
+ new ToolButton("View", new ClickListener() {
public void onClick(Widget sender) {
TaskRef selection = getSelection();
-
- appContext.displayMessage(
- "Sel2 " + selection.getId(), false
- );
-
+
if(selection!=null)
{
if(selection.getUrl()!=null && !selection.getUrl().equals(""))
createTaskFormWindow(selection);
else
- MessageBox.alert("Invalid operation", "The task doesn't reference a form");
+ MessageBox.alert("Invalid operation", "The task doesn't provide a UI");
}
else
{
@@ -199,11 +193,7 @@
windowPanel = new WindowPanel(task.getName());
windowPanel.setAnimationEnabled(true);
windowPanel.setSize("320px", "240px");
-
- appContext.displayMessage(
- "Sel3 " + task.getUrl(), false
- );
-
+
windowPanel.addWindowCloseListener(new WindowCloseListener() {
public void onWindowClosed() {
windowPanel = null;
@@ -217,14 +207,8 @@
// iframe
Frame frame = new Frame();
frame.setUrl(task.getUrl());
-
- appContext.displayMessage(
- "Sel4 " + frame.getElement().getId(), false
- );
-
DOM.setStyleAttribute(frame.getElement(), "border", "none");
-
windowPanel.setWidget(frame);
WindowUtil.addMaximizeButton(windowPanel, Caption.CaptionRegion.RIGHT);
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -24,6 +24,7 @@
import com.google.gwt.user.client.ui.SourcesTabEvents;
import com.google.gwt.user.client.ui.TabListener;
import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.core.client.GWT;
import com.mvc4g.client.ViewInterface;
import com.mvc4g.client.ActionInterface;
import com.mvc4g.client.Event;
@@ -35,6 +36,7 @@
import org.jboss.bpm.console.client.Editor;
import org.jboss.bpm.console.client.MenuSection;
import org.jboss.bpm.console.client.LazyPanel;
+import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
@@ -71,7 +73,7 @@
if(!lazyPanel.isInitialized())
{
lazyPanel.initialize();
- refreshView(); // TODO: hack around rendering problems
+ appContext.refreshView(); // TODO: hack around rendering problems
}
}
}
@@ -96,7 +98,7 @@
new Event(LoadTasksAction.ID, appContext.getAuthentication().getUsername())
);
- refreshView();
+ appContext.refreshView();
isInitialized = true;
}
@@ -133,9 +135,11 @@
public MenuSection provideMenuSection()
{
+ ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
+
return new MenuSection(
"Tasks",
- "bpm-task-icon",
+ icons.taskIcon(),
new TaskEditorNavigation(appContext)
);
}
Modified: projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml 2009-05-07 07:34:08 UTC (rev 4752)
@@ -3,7 +3,8 @@
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<inherits name='com.google.gwt.json.JSON'/>
- <inherits name="com.google.gwt.i18n.I18N"/>
+ <inherits name="com.google.gwt.i18n.I18N"/>
+ <inherits name="com.google.gwt.user.ImageBundle"/>
<!-- Add gwt-log support, default level `DEBUG` -->
<inherits name="com.allen_sauer.gwt.log.gwt-log-DEBUG" />
Modified: projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/public/console.css
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/public/console.css 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/public/console.css 2009-05-07 07:34:08 UTC (rev 4752)
@@ -14,11 +14,21 @@
width:150px;
}
+.bpm-header-versioninfo {
+ font-family: sans-serif;
+ color: #C8C8C8;
+}
+
.bpm-editor-info {
font-family: sans-serif;
font-size:18px;
}
+.bpm-editor-header {
+ font-family: sans-serif;
+ background-color: #E0E0E0;
+}
+
.bpm-menu {
height: 50px;
width: 100%;
Modified: projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/workspace-default.cfg
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/workspace-default.cfg 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/workspace-default.cfg 2009-05-07 07:34:08 UTC (rev 4752)
@@ -1,3 +1,4 @@
+org.jboss.bpm.console.client.SettingsEditor
org.jboss.bpm.console.client.process.ProcessEditor
org.jboss.bpm.console.client.task.TaskEditor
Modified: projects/gwt-console/trunk/gui/workspace-api/pom.xml
===================================================================
--- projects/gwt-console/trunk/gui/workspace-api/pom.xml 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/workspace-api/pom.xml 2009-05-07 07:34:08 UTC (rev 4752)
@@ -38,7 +38,7 @@
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>
-
+
<dependency>
<groupId>com.google.code.gwt-log</groupId>
<artifactId>gwt-log</artifactId>
@@ -114,6 +114,31 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-version-class</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <ant antfile="scripts/antrun-version.xml" inheritAll="false" inheritRefs="false">
+ <property name="version" value="${version}" />
+ <property name="src.dir" value="${project.build.directory}/generated-sources" />
+ </ant>
+ </tasks>
+ <sourceRoot>
+ ${project.build.directory}/generated-sources
+ </sourceRoot>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>
Added: projects/gwt-console/trunk/gui/workspace-api/scripts/antrun-version.xml
===================================================================
--- projects/gwt-console/trunk/gui/workspace-api/scripts/antrun-version.xml (rev 0)
+++ projects/gwt-console/trunk/gui/workspace-api/scripts/antrun-version.xml 2009-05-07 07:34:08 UTC (rev 4752)
@@ -0,0 +1,12 @@
+<project basedir=".." default="generate-version">
+ <target name="generate-version">
+ <mkdir dir="${src.dir}/org/jboss/bpm/console/client"/>
+ <echo file="${src.dir}/org/jboss/bpm/console/client/Version.java">
+ package org.jboss.bpm.console.client;
+ /** Automatically generated by ant. */
+ public class Version {
+ public static final String VERSION = "${version}";
+ }
+ </echo>
+ </target>
+</project>
\ No newline at end of file
Modified: projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java
===================================================================
--- projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -45,4 +45,6 @@
Viewport getViewport();
+ void refreshView();
+
}
Modified: projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/Editor.java
===================================================================
--- projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/Editor.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/Editor.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -80,15 +80,5 @@
public abstract String getIconCSS();
public abstract MenuSection provideMenuSection();
-
- /**
- * hack in order to correctly display widgets that have
- * been rendered hidden
- */
- protected void refreshView()
- {
- final int width = Window.getClientWidth();
- final int height = Window.getClientHeight();
- appContext.getViewport().onWindowResized(width, height);
- }
+
}
Modified: projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/Menu.java
===================================================================
--- projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/Menu.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/Menu.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -53,7 +53,7 @@
public void addSection(MenuSection menuSection)
{
- this.stack.add(menuSection, menuSection.getMenuTitle());
+ this.stack.add(menuSection, menuSection.getMenuTitle(), true);
}
public void setController(Controller controller)
Modified: projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/MenuSection.java
===================================================================
--- projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/MenuSection.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/MenuSection.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -22,6 +22,8 @@
package org.jboss.bpm.console.client;
import com.google.gwt.user.client.ui.Tree;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.AbstractImagePrototype;
import org.gwt.mosaic.ui.client.layout.LayoutPanel;
@@ -33,22 +35,23 @@
public class MenuSection extends LayoutPanel
{
- private String menuTitle;
- private String iconClass;
+ private HTML menuTitle;
- public MenuSection(String title, String iconClass, Tree tree)
+ public MenuSection(String title, AbstractImagePrototype icon, Tree tree)
{
super();
- this.menuTitle = title;
- this.iconClass = iconClass;
-
+ this.menuTitle = new HTML(
+ (icon != null ? (icon.getHTML() + " ")
+ : (""))
+ + title);
+
if (tree != null)
add(tree);
}
public String getMenuTitle()
{
- return menuTitle;
+ return menuTitle.getHTML();
}
}
Modified: projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
===================================================================
--- projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -66,6 +66,11 @@
return getConsoleServerUrl() + "/rs/identity/user/roles?roleCheck=" + sb.toString();
}
+ public String getServerStatusURL()
+ {
+ return getConsoleServerUrl() + "/rs/server/status";
+ }
+
@Deprecated
public String getRemoveDefinitionURL(String processId)
{
Modified: projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/Workspace.java
===================================================================
--- projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/Workspace.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/Workspace.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -45,7 +45,9 @@
public void addEditor(Editor editor, boolean closeable)
{
// Menu
- menu.addSection(editor.provideMenuSection());
+ MenuSection menuSection = editor.provideMenuSection();
+ if(menuSection!=null) // some editors don't contribute to the menu
+ menu.addSection(menuSection);
// Editor deck
EditorDeck deck = createDeck(editor);
Modified: projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java
===================================================================
--- projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -292,4 +292,21 @@
return result;
}
+ public static ServerStatus parseStatus(JSONValue json)
+ {
+ // {"plugins":[{"type":"xyz","available":true}]}
+ ServerStatus status = new ServerStatus();
+
+ JSONArray jsonArray = JSONWalk.on(json).next("plugins").asArray();
+ for (int i = 0; i < jsonArray.size(); i++)
+ {
+ JSONValue item = jsonArray.get(i);
+ String type = JSONWalk.on(item).next("type").asString();
+ boolean avail = JSONWalk.on(item).next("available").asBool();
+ status.getPlugins().add( new PluginInfo(type, avail) );
+ }
+
+ return status;
+ }
+
}
Modified: projects/gwt-console/trunk/gui/workspace-api/workspace-api.iml
===================================================================
--- projects/gwt-console/trunk/gui/workspace-api/workspace-api.iml 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/workspace-api/workspace-api.iml 2009-05-07 07:34:08 UTC (rev 4752)
@@ -6,10 +6,11 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/target/generated-sources" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="gwt-rpc" exported="" />
+ <orderEntry type="module" module-name="gwt-parent" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: com.google.code.gwt-log:gwt-log:jar:2.5.2:compile">
<CLASSES>
Modified: projects/gwt-console/trunk/gui/workspace-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsEditor.java
===================================================================
--- projects/gwt-console/trunk/gui/workspace-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsEditor.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/workspace-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsEditor.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -78,6 +78,6 @@
public MenuSection provideMenuSection()
{
- return new MenuSection("Maps Plugin", "", new MapsNavigationTree(appContext));
+ return new MenuSection("Maps Plugin", null, new MapsNavigationTree(appContext));
}
}
Modified: projects/gwt-console/trunk/gui/workspace-example/workspace-example.iml
===================================================================
--- projects/gwt-console/trunk/gui/workspace-example/workspace-example.iml 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gui/workspace-example/workspace-example.iml 2009-05-07 07:34:08 UTC (rev 4752)
@@ -12,8 +12,8 @@
<orderEntry type="module" module-name="toplevel" />
<orderEntry type="module" module-name="plugin-api" />
<orderEntry type="module" module-name="plugin" />
+ <orderEntry type="module" module-name="gwt-parent" />
<orderEntry type="module" module-name="workspace-api" />
- <orderEntry type="module" module-name="gwt-rpc" />
<orderEntry type="module-library">
<library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
<CLASSES>
Modified: projects/gwt-console/trunk/gwt-parent.iml
===================================================================
--- projects/gwt-console/trunk/gwt-parent.iml 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/gwt-parent.iml 2009-05-07 07:34:08 UTC (rev 4752)
@@ -20,9 +20,8 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="server-integration" />
- <orderEntry type="module" module-name="workspace-api" />
- <orderEntry type="module" module-name="gwt-rpc" />
+ <orderEntry type="module" module-name="server-integration" exported="" />
+ <orderEntry type="module" module-name="workspace-api" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: junit:junit:jar:3.8.1:test">
<CLASSES>
@@ -236,7 +235,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.slf4j:slf4j-simple:jar:1.5.2:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/slf4j/slf4j-simple/1.5.2/slf4j-simple-1.5.2.jar!/" />
@@ -245,7 +244,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: net.sf.json-lib:json-lib:jar:2.2.3:test">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/net/sf/json-lib/json-lib/2.2.3/json-lib-2.2.3.jar!/" />
@@ -254,7 +253,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: commons-fileupload:commons-fileupload:jar:1.2.1:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-fileupload/commons-fileupload/1.2.1/commons-fileupload-1.2.1.jar!/" />
@@ -263,7 +262,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: commons-io:commons-io:jar:1.3.2:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar!/" />
@@ -272,7 +271,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss.resteasy:resteasy-jaxrs:jar:1.0.2.GA:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/resteasy/resteasy-jaxrs/1.0.2.GA/resteasy-jaxrs-1.0.2.GA.jar!/" />
@@ -281,7 +280,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.annotation:jsr250-api:jar:1.0:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar!/" />
@@ -290,7 +289,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss.resteasy:resteasy-multipart-provider:jar:1.0.2.GA:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/resteasy/resteasy-multipart-provider/1.0.2.GA/resteasy-multipart-provider-1.0.2.GA.jar!/" />
@@ -299,7 +298,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss:jboss-common-core:jar:2.2.7.GA:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/jboss-common-core/2.2.7.GA/jboss-common-core-2.2.7.GA.jar!/" />
@@ -308,7 +307,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: net.sf.ezmorph:ezmorph:jar:1.0.6:test">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.jar!/" />
@@ -317,7 +316,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.slf4j:slf4j-api:jar:1.5.2:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/slf4j/slf4j-api/1.5.2/slf4j-api-1.5.2.jar!/" />
@@ -326,7 +325,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: javassist:javassist:jar:3.6.0.GA:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javassist/javassist/3.6.0.GA/javassist-3.6.0.GA.jar!/" />
@@ -335,16 +334,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: commons-collections:commons-collections:jar:3.2:test">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-collections/commons-collections/3.2/commons-collections-3.2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss.resteasy:jaxrs-api:jar:1.0.2.GA:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/resteasy/jaxrs-api/1.0.2.GA/jaxrs-api-1.0.2.GA.jar!/" />
@@ -353,7 +343,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss.logging:jboss-logging-spi:jar:2.0.5.GA:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar!/" />
@@ -364,7 +354,7 @@
</SOURCES>
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.scannotation:scannotation:jar:1.0.2:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/scannotation/scannotation/1.0.2/scannotation-1.0.2.jar!/" />
Added: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/PluginInfo.java
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/PluginInfo.java (rev 0)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/PluginInfo.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -0,0 +1,62 @@
+/*
+ * 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.bpm.console.client.model;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class PluginInfo
+{
+ private String type;
+ private boolean available;
+
+
+ public PluginInfo()
+ {
+ }
+
+ public PluginInfo(String type, boolean available)
+ {
+ this.type = type;
+ this.available = available;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ public boolean isAvailable()
+ {
+ return available;
+ }
+
+ public void setAvailable(boolean available)
+ {
+ this.available = available;
+ }
+}
Added: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ServerStatus.java
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ServerStatus.java (rev 0)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ServerStatus.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -0,0 +1,38 @@
+/*
+ * 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.bpm.console.client.model;
+
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class ServerStatus
+{
+ List<PluginInfo> plugins = new ArrayList<PluginInfo>();
+
+ public List<PluginInfo> getPlugins()
+ {
+ return plugins;
+ }
+}
Modified: projects/gwt-console/trunk/server/server-core/server-core.iml
===================================================================
--- projects/gwt-console/trunk/server/server-core/server-core.iml 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/server/server-core/server-core.iml 2009-05-07 07:34:08 UTC (rev 4752)
@@ -10,8 +10,8 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="gwt-rpc" exported="" />
<orderEntry type="module" module-name="server-integration" exported="" />
+ <orderEntry type="module" module-name="gwt-parent" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: org.slf4j:slf4j-simple:jar:1.5.2:compile">
<CLASSES>
@@ -252,6 +252,7 @@
</SOURCES>
</library>
</orderEntry>
+ <orderEntry type="module" module-name="gwt-rpc" />
<orderEntryProperties />
</component>
</module>
Modified: projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/ConsoleServerApplication.java
===================================================================
--- projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/ConsoleServerApplication.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/ConsoleServerApplication.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -36,6 +36,7 @@
public ConsoleServerApplication()
{
+ singletons.add(new InfoFacade());
singletons.add(new ProcessMgmtFacade());
singletons.add(new TaskListFacade());
singletons.add(new TaskMgmtFacade());
Added: projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/InfoFacade.java
===================================================================
--- projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/InfoFacade.java (rev 0)
+++ projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/InfoFacade.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -0,0 +1,70 @@
+/*
+ * 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.bpm.console.server;
+
+import org.jboss.bpm.console.server.plugin.TaskDispatcherPlugin;
+import org.jboss.bpm.console.server.plugin.PluginMgr;
+import org.jboss.bpm.console.server.gson.GsonFactory;
+import org.jboss.bpm.console.client.model.ServerStatus;
+import org.jboss.bpm.console.client.model.PluginInfo;
+
+import javax.ws.rs.Path;
+import javax.ws.rs.POST;
+import javax.ws.rs.GET;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Response;
+
+import com.google.gson.Gson;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+ at Path("server")
+public class InfoFacade
+{
+
+ private Class[] pluginInterfaces = {TaskDispatcherPlugin.class};
+
+ @GET
+ @Path("status")
+ @Produces("application/json")
+ public Response getServerInfo()
+ {
+ ServerStatus status = new ServerStatus();
+ for(Class type : pluginInterfaces)
+ {
+ Object impl = PluginMgr.load(type);
+ boolean isAvailable = (impl!=null);
+
+ status.getPlugins().add(new PluginInfo(type.getName(), isAvailable));
+ }
+
+ return createJsonResponse(status);
+ }
+
+ private Response createJsonResponse(Object wrapper)
+ {
+ Gson gson = GsonFactory.createInstance();
+ String json = gson.toJson(wrapper);
+ return Response.ok(json).type("application/json").build();
+ }
+}
Modified: projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskListFacade.java
===================================================================
--- projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskListFacade.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskListFacade.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -66,14 +66,14 @@
}
/**
- * Lazy load the {@link org.jboss.bpm.console.server.integration.TaskManagement}
+ * Lazy load the {@link org.jboss.bpm.console.server.plugin.TaskDispatcherPlugin}.
+ * Can be null if the plugin is not available.
*/
private TaskDispatcherPlugin getTaskDispatcherPlugin()
{
if(null==this.formPlugin)
{
this.formPlugin = PluginMgr.load(TaskDispatcherPlugin.class);
- log.debug("Using TaskDispatcherPlugin impl:" + this.formPlugin);
}
return this.formPlugin;
Modified: projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java
===================================================================
--- projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -123,7 +123,7 @@
)
{
log.debug("Close task " + taskId );
- getTaskManagement().completeTask(taskId);
+ getTaskManagement().completeTask(taskId, null);
return Response.ok().build();
}
@@ -138,7 +138,7 @@
)
{
log.debug("Close task " + taskId + " outcome " + outcome);
- getTaskManagement().completeTask(taskId, outcome);
+ getTaskManagement().completeTask(taskId, outcome, null);
return Response.ok().build();
}
@@ -174,14 +174,20 @@
Map<String,InputPart> formData = payload.getFormData();
Iterator<String> partNames = formData.keySet().iterator();
+ String outcome = null;
+
while(partNames.hasNext())
{
final String partName = partNames.next();
final InputPart part = formData.get(partName);
final MediaType mediaType = part.getMediaType();
- if(MediaType.TEXT_PLAIN_TYPE.equals(mediaType))
+ if(partName.equals("outcome"))
{
+ outcome = part.getBodyAsString();
+ }
+ else if(MediaType.TEXT_PLAIN_TYPE.equals(mediaType))
+ {
// RFC2045: Each part has an optional "Content-Type" header
// that defaults to "text/plain".
// Can go into process without conversion
@@ -220,10 +226,15 @@
}
}
- // TODO: associate task variables
+ // trigger execution
+ TaskManagement tm = getTaskManagement();
- // trigger execution
-
- return Response.ok("Sucessfully processed task UI").build();
+ if(null==outcome)
+ tm.completeTask(taskId, processVars);
+ else
+ tm.completeTask(taskId, outcome, processVars);
+
+
+ return Response.ok("Successfully processed task UI").build();
}
}
Modified: projects/gwt-console/trunk/server/server-core/src/main/webapp/WEB-INF/web.xml
===================================================================
--- projects/gwt-console/trunk/server/server-core/src/main/webapp/WEB-INF/web.xml 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/server/server-core/src/main/webapp/WEB-INF/web.xml 2009-05-07 07:34:08 UTC (rev 4752)
@@ -45,7 +45,10 @@
<security-constraint>
<web-resource-collection>
<web-resource-name>Resteasy</web-resource-name>
- <url-pattern>/rs/*</url-pattern>
+ <url-pattern>/rs/process/*</url-pattern>
+ <url-pattern>/rs/task/*</url-pattern>
+ <url-pattern>/rs/tasks/*</url-pattern>
+ <url-pattern>/rs/identity/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>administrator</role-name>
Modified: projects/gwt-console/trunk/server/server-integration/pom.xml
===================================================================
--- projects/gwt-console/trunk/server/server-integration/pom.xml 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/server/server-integration/pom.xml 2009-05-07 07:34:08 UTC (rev 4752)
@@ -39,6 +39,12 @@
<version>5.0.0.GA</version>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
Modified: projects/gwt-console/trunk/server/server-integration/server-integration.iml
===================================================================
--- projects/gwt-console/trunk/server/server-integration/server-integration.iml 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/server/server-integration/server-integration.iml 2009-05-07 07:34:08 UTC (rev 4752)
@@ -8,7 +8,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="gwt-rpc" exported="" />
+ <orderEntry type="module" module-name="gwt-parent" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:provided">
<CLASSES>
Modified: projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/integration/TaskManagement.java
===================================================================
--- projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/integration/TaskManagement.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/integration/TaskManagement.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -24,6 +24,7 @@
import org.jboss.bpm.console.client.model.TaskRef;
import java.util.List;
+import java.util.Map;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
@@ -36,9 +37,9 @@
void releaseTask(long taskId);
- void completeTask(long taskId);
+ void completeTask(long taskId, Map data);
- void completeTask(long taskId, String outcome);
+ void completeTask(long taskId, String outcome, Map data);
List<TaskRef> getTasksForIdentity(String idRef);
Modified: projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/plugin/PluginMgr.java
===================================================================
--- projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/plugin/PluginMgr.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/plugin/PluginMgr.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -23,24 +23,41 @@
import org.jboss.bpm.console.server.util.ServiceLoader;
import org.jboss.bpm.console.server.util.InvocationProxy;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
+ * Loads plugins through the {@link org.jboss.bpm.console.server.util.ServiceLoader}.
+ *
* @author Heiko.Braun <heiko.braun at jboss.com>
*/
public class PluginMgr
{
+
+ private static final Log log = LogFactory.getLog(PluginMgr.class);
+
/**
* Load a plugin through the {@link org.jboss.bpm.console.server.util.ServiceLoader}.
- * The plugin class name acts as the service key.
+ * The plugin interface name acts as the service key.
*
* @param type plugin interface
- * @return a plugin implementation of type T
+ * @return a plugin implementation of type T or null if the plugin is not available.
*/
public static <T> T load(Class<T> type)
{
T pluginImpl = (T) ServiceLoader.loadService(
type.getName(), null
);
- return (T)InvocationProxy.newInstance(pluginImpl);
+
+ if(pluginImpl!=null)
+ {
+ log.info("Successfully loaded plugin '" +type.getName()+ "': "+pluginImpl.getClass());
+ return (T)InvocationProxy.newInstance(pluginImpl);
+ }
+ else
+ {
+ log.warn("Unable to load plugin: '" + type.getName() + "'");
+ return null;
+ }
}
}
Modified: projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/util/ServiceLoader.java
===================================================================
--- projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/util/ServiceLoader.java 2009-05-06 17:31:35 UTC (rev 4751)
+++ projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/util/ServiceLoader.java 2009-05-07 07:34:08 UTC (rev 4752)
@@ -30,6 +30,8 @@
* Load a service class using a ordered lookup procedure
*
* @author Thomas.Diesler at jboss.com
+ * @author Heiko.Braun at jboss.com
+ *
* @since 14-Dec-2006
*/
public abstract class ServiceLoader
@@ -40,7 +42,7 @@
* 1. If a resource with the name of META-INF/services/javax.xml.ws.spi.Provider exists, then
* its first line, if present, is used as the UTF-8 encoded name of the implementation class.
*
- * 2. If the ${java.home}/lib/jaxws.properties file exists and it is readable by the
+ * 2. If the ${java.home}/lib/service-loader.properties file exists and it is readable by the
* java.util.Properties.load(InputStream) method and it contains an entry whose key is
* javax.xml.ws.spi.Provider, then the value of that entry is used as the name of the implementation class.
*
@@ -135,7 +137,7 @@
}
/**
- * Use the properties file "${java.home}/lib/jaxws.properties" in the JRE directory.
+ * Use the properties file "${java.home}/lib/service-loader.properties" in the JRE directory.
* This configuration file is in standard java.util.Properties format and contains the
* fully qualified name of the implementation class with the key being the system property defined above.
*/
@@ -149,7 +151,7 @@
// This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
PrivilegedAction action = new PropertyAccessAction("java.home");
String javaHome = (String)AccessController.doPrivileged(action);
- File jaxmFile = new File(javaHome + "/lib/jaxws.properties");
+ File jaxmFile = new File(javaHome + "/lib/service-loader.properties");
if (jaxmFile.exists())
{
try
More information about the jbpm-commits
mailing list