[jbpm-commits] JBoss JBPM SVN: r2532 - in jbpm3/trunk/modules/gwt-console: rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3 and 21 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Mon Oct 13 13:06:31 EDT 2008
Author: heiko.braun at jboss.com
Date: 2008-10-13 13:06:31 -0400 (Mon, 13 Oct 2008)
New Revision: 2532
Added:
jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/
jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/ActiveNodeInfo.java
jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/DiagramInfo.java
jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/DiagramNodeInfo.java
jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/
jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/JBPM3Management.java
jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/dao/
jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/dao/DiagramDAO.java
jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/dao/internal/
jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/dao/internal/DiagramInfoParser.java
jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/dao/internal/MockDiagramDAO.java
jbpm3/trunk/modules/gwt-console/server/src/main/resources/org/
jbpm3/trunk/modules/gwt-console/server/src/main/resources/org/jboss/
jbpm3/trunk/modules/gwt-console/server/src/main/resources/org/jboss/bpm/
jbpm3/trunk/modules/gwt-console/server/src/main/resources/org/jboss/bpm/console/
jbpm3/trunk/modules/gwt-console/server/src/main/resources/org/jboss/bpm/console/server/
jbpm3/trunk/modules/gwt-console/server/src/main/resources/org/jboss/bpm/console/server/jbpm3/
jbpm3/trunk/modules/gwt-console/server/src/main/resources/org/jboss/bpm/console/server/jbpm3/dao/
jbpm3/trunk/modules/gwt-console/server/src/main/resources/org/jboss/bpm/console/server/jbpm3/dao/internal/
jbpm3/trunk/modules/gwt-console/server/src/main/resources/org/jboss/bpm/console/server/jbpm3/dao/internal/1.jpg
jbpm3/trunk/modules/gwt-console/server/src/main/resources/org/jboss/bpm/console/server/jbpm3/dao/internal/gpd.xml
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/RestURL.java
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/util/
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/util/JSONRequest.java
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/util/JSONRequestHandler.java
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/util/JSONWalk.java
Removed:
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/Config.java
Modified:
jbpm3/trunk/modules/gwt-console/server/pom.xml
jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/ConsoleServerApplication.java
jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/ProcessManagement.java
jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/DAOFactory.java
jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/ProcessDAO.java
jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/internal/MockProcessDAO.java
jbpm3/trunk/modules/gwt-console/server/src/main/webapp/index.html
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageView.java
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
jbpm3/trunk/modules/gwt-console/war/src/main/resources/org/jboss/bpm/console/public/console.css
Log:
Update process image: added active node display
Added: jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/ActiveNodeInfo.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/ActiveNodeInfo.java (rev 0)
+++ jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/ActiveNodeInfo.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -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.model.jbpm3;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+ at XmlRootElement(name = "activeNodeInfo")
+public class ActiveNodeInfo
+{
+ private int width = -1;
+ private int height = -1;
+
+ private DiagramNodeInfo activeNode;
+
+
+ public ActiveNodeInfo()
+ {
+ }
+
+ public ActiveNodeInfo(int width, int height, DiagramNodeInfo activeNode)
+ {
+ this.width = width;
+ this.height = height;
+ this.activeNode = activeNode;
+ }
+
+ @XmlElement(name = "diagramWidth")
+ public int getWidth()
+ {
+ return width;
+ }
+
+ public void setWidth(int width)
+ {
+ this.width = width;
+ }
+
+ @XmlElement(name = "diagramHeight")
+ public int getHeight()
+ {
+ return height;
+ }
+
+ public void setHeight(int height)
+ {
+ this.height = height;
+ }
+
+ @XmlElement(name = "activeNode")
+ public DiagramNodeInfo getActiveNode()
+ {
+ return activeNode;
+ }
+
+ public void setActiveNode(DiagramNodeInfo activeNode)
+ {
+ this.activeNode = activeNode;
+ }
+}
Property changes on: jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/ActiveNodeInfo.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/DiagramInfo.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/DiagramInfo.java (rev 0)
+++ jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/DiagramInfo.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -0,0 +1,81 @@
+/*
+ * 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.jbpm3;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.*;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+ at XmlRootElement(name = "diagramInfo")
+public class DiagramInfo
+{
+ private int width = -1;
+ private int height = -1;
+ private List<DiagramNodeInfo> nodeList = new ArrayList<DiagramNodeInfo>();
+
+ public DiagramInfo()
+ {
+ }
+
+ public DiagramInfo(final int height, final int width, final List<DiagramNodeInfo> l) {
+ this.height = height;
+ this.width = width;
+ final List<DiagramNodeInfo> list = new ArrayList<DiagramNodeInfo>();
+ for (DiagramNodeInfo nodeInfo : l) {
+ list.add(nodeInfo);
+ }
+ nodeList = Collections.unmodifiableList(list);
+ }
+
+ public int getWidth()
+ {
+ return width;
+ }
+
+ public void setWidth(int width)
+ {
+ this.width = width;
+ }
+
+ public int getHeight()
+ {
+ return height;
+ }
+
+ public void setHeight(int height)
+ {
+ this.height = height;
+ }
+
+ public List<DiagramNodeInfo> getNodeList()
+ {
+ return nodeList;
+ }
+
+ public void setNodeList(List<DiagramNodeInfo> nodeList)
+ {
+ this.nodeList = nodeList;
+ }
+
+}
Property changes on: jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/DiagramInfo.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/DiagramNodeInfo.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/DiagramNodeInfo.java (rev 0)
+++ jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/DiagramNodeInfo.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -0,0 +1,103 @@
+/*
+ * 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.jbpm3;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+ at XmlRootElement(name = "nodeInfo")
+public class DiagramNodeInfo
+{
+ private String name;
+ private int x;
+ private int y;
+ private int width;
+ private int height;
+
+ public DiagramNodeInfo()
+ {
+ }
+
+ public DiagramNodeInfo(
+ final String name,
+ final int x, final int y,
+ final int width, final int height)
+ {
+ this.height = height;
+ this.name = name;
+ this.width = width;
+ this.x = x;
+ this.y = y;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public int getX()
+ {
+ return x;
+ }
+
+ public void setX(int x)
+ {
+ this.x = x;
+ }
+
+ public int getY()
+ {
+ return y;
+ }
+
+ public void setY(int y)
+ {
+ this.y = y;
+ }
+
+ public int getWidth()
+ {
+ return width;
+ }
+
+ public void setWidth(int width)
+ {
+ this.width = width;
+ }
+
+ public int getHeight()
+ {
+ return height;
+ }
+
+ public void setHeight(int height)
+ {
+ this.height = height;
+ }
+}
Property changes on: jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/DiagramNodeInfo.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/modules/gwt-console/server/pom.xml
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/pom.xml 2008-10-10 16:20:55 UTC (rev 2531)
+++ jbpm3/trunk/modules/gwt-console/server/pom.xml 2008-10-13 17:06:31 UTC (rev 2532)
@@ -24,6 +24,11 @@
<version>${version}</version>
</dependency>
<dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm-core</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwt.version}</version>
Modified: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/ConsoleServerApplication.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/ConsoleServerApplication.java 2008-10-10 16:20:55 UTC (rev 2531)
+++ jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/ConsoleServerApplication.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -21,6 +21,8 @@
*/
package org.jboss.bpm.console.server;
+import org.jboss.bpm.console.server.jbpm3.JBPM3Management;
+
import javax.ws.rs.core.Application;
import java.util.HashSet;
import java.util.Set;
@@ -36,6 +38,7 @@
{
singletons.add(new ProcessManagement());
singletons.add(new UserManagement());
+ singletons.add(new JBPM3Management());
}
@Override
Modified: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/ProcessManagement.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/ProcessManagement.java 2008-10-10 16:20:55 UTC (rev 2531)
+++ jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/ProcessManagement.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -26,9 +26,9 @@
import org.jboss.bpm.console.server.dao.DAOFactory;
import org.jboss.bpm.console.server.dao.ProcessDAO;
+import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.*;
import javax.ws.rs.core.Context;
-import javax.servlet.http.HttpServletRequest;
/**
* REST server module for accessing process related data.
@@ -39,10 +39,10 @@
public class ProcessManagement
{
private ProcessDAO processDAO;
-
+
public ProcessManagement()
{
- this.processDAO = DAOFactory.createProcessDefinitionDAO();
+ this.processDAO = DAOFactory.createProcessDAO();
}
@GET
@@ -52,8 +52,8 @@
@Context
HttpServletRequest request
)
- {
- return new ProcessDefinitionWrapper( processDAO.getAllProcessDefinitions() );
+ {
+ return new ProcessDefinitionWrapper( processDAO.getAllDefinitions() );
}
@POST
@@ -66,7 +66,7 @@
HttpServletRequest request
)
{
- return new ProcessDefinitionWrapper( processDAO.removeProcessDefinition(processId) );
+ return new ProcessDefinitionWrapper( processDAO.removeDefinition(processId) );
}
@GET
@@ -78,7 +78,7 @@
@Context
HttpServletRequest request)
{
- return new ProcessInstanceWrapper( processDAO.getInstanceByProcessDefinitionId(processId) );
+ return new ProcessInstanceWrapper( processDAO.getInstancesByProcessId(processId) );
}
@POST
@@ -90,7 +90,6 @@
@Context
HttpServletRequest request)
{
- return new ProcessInstanceWrapper( processDAO.removeProcessInstance(instanceId) );
+ return new ProcessInstanceWrapper( processDAO.removeInstance(instanceId) );
}
-
}
Modified: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/DAOFactory.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/DAOFactory.java 2008-10-10 16:20:55 UTC (rev 2531)
+++ jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/DAOFactory.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -22,6 +22,8 @@
package org.jboss.bpm.console.server.dao;
import org.jboss.bpm.console.server.dao.internal.MockProcessDAO;
+import org.jboss.bpm.console.server.jbpm3.dao.DiagramDAO;
+import org.jboss.bpm.console.server.jbpm3.dao.internal.MockDiagramDAO;
/**
* TODO: Add service locator lookup
@@ -29,9 +31,14 @@
*/
public class DAOFactory
{
- public static ProcessDAO createProcessDefinitionDAO()
+ public static ProcessDAO createProcessDAO()
{
return new MockProcessDAO();
- }
+ }
+
+ public static DiagramDAO createDiagramDAO()
+ {
+ return new MockDiagramDAO();
+ }
}
Modified: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/ProcessDAO.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/ProcessDAO.java 2008-10-10 16:20:55 UTC (rev 2531)
+++ jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/ProcessDAO.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -33,13 +33,15 @@
*/
public interface ProcessDAO
{
- List<ProcessDefinition> getAllProcessDefinitions();
+ List<ProcessDefinition> getAllDefinitions();
- ProcessDefinition getProcessDefinitionById(long processId);
+ ProcessDefinition getDefinitionById(long processId);
- List<ProcessDefinition> removeProcessDefinition(long processId);
+ List<ProcessDefinition> removeDefinition(long processId);
- List<ProcessInstance> getInstanceByProcessDefinitionId(long processId);
+ List<ProcessInstance> getInstancesByProcessId(long processId);
- List<ProcessInstance> removeProcessInstance(long instanceId);
+ ProcessInstance getInstanceById(long instanceId);
+
+ List<ProcessInstance> removeInstance(long instanceId);
}
Modified: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/internal/MockProcessDAO.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/internal/MockProcessDAO.java 2008-10-10 16:20:55 UTC (rev 2531)
+++ jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/internal/MockProcessDAO.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -21,13 +21,13 @@
*/
package org.jboss.bpm.console.server.dao.internal;
-import org.jboss.bpm.console.server.dao.ProcessDAO;
import org.jboss.bpm.console.client.model.ProcessDefinition;
import org.jboss.bpm.console.client.model.ProcessInstance;
+import org.jboss.bpm.console.server.dao.ProcessDAO;
-import java.util.List;
import java.util.ArrayList;
import java.util.Date;
+import java.util.List;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
@@ -45,7 +45,7 @@
defs.add( new ProcessDefinition(5, "Loan application", "1"));
defs.add( new ProcessDefinition(6, "Expense report review", "4"));
defs.add( new ProcessDefinition(7, "Expense claim", "4"));
- defs.add( new ProcessDefinition(8, "Credit approval", "4"));
+ defs.add( new ProcessDefinition(8, "Credit approval", "4"));
}
final static List<ProcessInstance> instances = new ArrayList<ProcessInstance>();
@@ -59,12 +59,12 @@
instances.add( new ProcessInstance(7, -1, "Running", new Date(), null));
}
- public List<ProcessDefinition> getAllProcessDefinitions()
+ public List<ProcessDefinition> getAllDefinitions()
{
return defs;
}
- public ProcessDefinition getProcessDefinitionById(long id)
+ public ProcessDefinition getDefinitionById(long id)
{
ProcessDefinition match = null;
for(ProcessDefinition pd : defs)
@@ -75,11 +75,11 @@
break;
}
}
- return match;
+ return match;
}
- public List<ProcessDefinition> removeProcessDefinition(long processId)
+ public List<ProcessDefinition> removeDefinition(long processId)
{
System.out.println("Remove definition " + processId);
@@ -94,16 +94,16 @@
throw new IllegalArgumentException("No process with id " + processId);
else
defs.remove(toBeRemoved);
-
+
return defs;
}
- public List<ProcessInstance> getInstanceByProcessDefinitionId(long id)
+ public List<ProcessInstance> getInstancesByProcessId(long id)
{
- return instances;
+ return instances;
}
- public List<ProcessInstance> removeProcessInstance(long instanceId)
+ public List<ProcessInstance> removeInstance(long instanceId)
{
System.out.println("Remove instance " + instanceId);
@@ -122,4 +122,20 @@
return instances;
}
+
+
+ public ProcessInstance getInstanceById(long instanceId)
+ {
+ ProcessInstance match = null;
+ for(ProcessInstance instance : instances)
+ {
+ if(instanceId == instance.getId())
+ match = instance;
+ }
+
+ if(null==match)
+ throw new IllegalArgumentException("No instance with id " + instanceId);
+
+ return match;
+ }
}
Added: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/JBPM3Management.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/JBPM3Management.java (rev 0)
+++ jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/JBPM3Management.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -0,0 +1,85 @@
+/*
+ * 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.jbpm3;
+
+import org.jboss.bpm.console.server.dao.DAOFactory;
+import org.jboss.bpm.console.server.jbpm3.dao.DiagramDAO;
+import org.jboss.bpm.console.client.model.jbpm3.DiagramInfo;
+import org.jboss.bpm.console.client.model.jbpm3.ActiveNodeInfo;
+
+import javax.ws.rs.Path;
+import javax.ws.rs.GET;
+import javax.ws.rs.Produces;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.core.Response;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+ at Path("jbpm3")
+public class JBPM3Management
+{
+ private DiagramDAO diagramDAO;
+
+ public JBPM3Management()
+ {
+ this.diagramDAO = DAOFactory.createDiagramDAO();
+ }
+
+ @GET
+ @Path("definitions/{id}/image")
+ @Produces("image/jpeg")
+ public Response getProcessImage(
+ @PathParam("id")
+ long id
+ )
+ {
+ byte[] image = diagramDAO.getProcessImage(id);
+ if(null==image)
+ return Response.serverError().build();
+ else
+ return Response.ok(image).type("image/jpeg").build();
+ }
+
+ @GET
+ @Path("definitions/{id}/diagramInfo")
+ @Produces("application/json")
+ public DiagramInfo getDiagramInfo(
+ @PathParam("id")
+ long id
+ )
+ {
+ return diagramDAO.getDiagramInfo(id);
+ }
+
+ @GET
+ @Path("instances/{id}/activeNodeInfo")
+ @Produces("application/json")
+ public ActiveNodeInfo getActiveNodeInfo(
+ @PathParam("id")
+ long id
+ )
+ {
+ return diagramDAO.getActivNodeInfo(id);
+ }
+
+}
Property changes on: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/JBPM3Management.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/dao/DiagramDAO.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/dao/DiagramDAO.java (rev 0)
+++ jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/dao/DiagramDAO.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -0,0 +1,37 @@
+/*
+ * 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.jbpm3.dao;
+
+import org.jboss.bpm.console.client.model.jbpm3.DiagramInfo;
+import org.jboss.bpm.console.client.model.jbpm3.ActiveNodeInfo;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public interface DiagramDAO
+{
+ byte[] getProcessImage(long processId);
+
+ DiagramInfo getDiagramInfo(long processId);
+
+ ActiveNodeInfo getActivNodeInfo(long instanceId);
+}
Property changes on: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/dao/DiagramDAO.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/dao/internal/DiagramInfoParser.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/dao/internal/DiagramInfoParser.java (rev 0)
+++ jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/dao/internal/DiagramInfoParser.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -0,0 +1,91 @@
+/*
+ * 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.jbpm3.dao.internal;
+
+import org.jboss.bpm.console.client.model.jbpm3.DiagramInfo;
+import org.jboss.bpm.console.client.model.jbpm3.DiagramNodeInfo;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Node;
+import org.jbpm.util.XmlUtil;
+
+import java.io.InputStream;
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+class DiagramInfoParser
+{
+ /**
+ * Will close the stream after successfull read
+ * @param in
+ * @return
+ */
+ public static DiagramInfo parse(InputStream in )
+ {
+ Document document = XmlUtil.parseXmlInputStream(in);
+ Element processDiagramElement = document.getDocumentElement();
+ final String widthString = processDiagramElement.getAttribute("width");
+ final String heightString = processDiagramElement.getAttribute("height");
+ final List<DiagramNodeInfo> diagramNodeInfoList = new ArrayList<DiagramNodeInfo>();
+ final NodeList nodeNodeList = processDiagramElement.getElementsByTagName("node");
+ final int nodeNodeListLength = nodeNodeList.getLength();
+ for (int i = 0; i < nodeNodeListLength; i ++) {
+ final Node nodeNode = nodeNodeList.item(i);
+ if (nodeNode instanceof Node && nodeNode.getParentNode() == processDiagramElement) {
+ final Element nodeElement = (Element) nodeNode;
+ final String nodeName = nodeElement.getAttribute("name");
+ final String nodeXString = nodeElement.getAttribute("x");
+ final String nodeYString = nodeElement.getAttribute("y");
+ final String nodeWidthString = nodeElement.getAttribute("width");
+ final String nodeHeightString = nodeElement.getAttribute("height");
+ final DiagramNodeInfo nodeInfo = new DiagramNodeInfo(
+ nodeName,
+ Integer.parseInt(nodeXString),
+ Integer.parseInt(nodeYString),
+ Integer.parseInt(nodeWidthString),
+ Integer.parseInt(nodeHeightString)
+ );
+ diagramNodeInfoList.add(nodeInfo);
+ }
+ }
+ DiagramInfo diagramInfo = new DiagramInfo(
+ Integer.parseInt(heightString),
+ Integer.parseInt(widthString),
+ diagramNodeInfoList
+ );
+
+ try
+ {
+ in.close();
+ } catch (IOException e)
+ {
+ throw new RuntimeException("Failed to close stream", e);
+ }
+
+ return diagramInfo;
+ }
+}
Property changes on: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/dao/internal/DiagramInfoParser.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/dao/internal/MockDiagramDAO.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/dao/internal/MockDiagramDAO.java (rev 0)
+++ jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/dao/internal/MockDiagramDAO.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -0,0 +1,105 @@
+/*
+ * 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.jbpm3.dao.internal;
+
+import org.jboss.bpm.console.server.jbpm3.dao.DiagramDAO;
+import org.jboss.bpm.console.server.jbpm3.dao.internal.DiagramInfoParser;
+import org.jboss.bpm.console.server.dao.ProcessDAO;
+import org.jboss.bpm.console.server.dao.DAOFactory;
+import org.jboss.bpm.console.client.model.jbpm3.DiagramInfo;
+import org.jboss.bpm.console.client.model.jbpm3.ActiveNodeInfo;
+import org.jboss.bpm.console.client.model.jbpm3.DiagramNodeInfo;
+import org.jboss.bpm.console.client.model.ProcessInstance;
+
+import java.io.InputStream;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class MockDiagramDAO implements DiagramDAO
+{
+ private ProcessDAO processDAO;
+
+ public MockDiagramDAO()
+ {
+ processDAO = DAOFactory.createProcessDAO();
+ }
+
+ public byte[] getProcessImage(long processId)
+ {
+ byte[] imageBytes = null;
+
+ try
+ {
+ InputStream in = MockDiagramDAO.class.getResourceAsStream("1.jpg");
+ if(null==in)
+ throw new IllegalArgumentException("Failed to load image resource");
+ imageBytes = new byte[in.available()];
+ in.read(imageBytes);
+
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ return imageBytes;
+ }
+
+ public DiagramInfo getDiagramInfo(long processId)
+ {
+ InputStream in = MockDiagramDAO.class.getResourceAsStream("gpd.xml");
+ if(null==in)
+ throw new IllegalArgumentException("Failed to load diagram info");
+
+ return DiagramInfoParser.parse(in);
+ }
+
+ public ActiveNodeInfo getActivNodeInfo(long instanceId)
+ {
+
+ ProcessInstance pi = processDAO.getInstanceById(instanceId);
+ DiagramInfo diagram = getDiagramInfo(pi.getParentId());
+ List<DiagramNodeInfo> nodes = diagram.getNodeList();
+
+ DiagramNodeInfo activeNode = null;
+ int i = 0;
+ for(DiagramNodeInfo n : nodes)
+ {
+ // TODO: Fake. Actually this should retrieve the active node
+ if(i==1)
+ {
+ activeNode = n;
+ break;
+ }
+
+ i++;
+
+ }
+
+ if(null==activeNode)
+ throw new RuntimeException("Failed to retrieve active node for instanceId " + instanceId);
+
+ return new ActiveNodeInfo(diagram.getWidth(), diagram.getHeight(), activeNode);
+ }
+}
Property changes on: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/jbpm3/dao/internal/MockDiagramDAO.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/gwt-console/server/src/main/resources/org/jboss/bpm/console/server/jbpm3/dao/internal/1.jpg
===================================================================
(Binary files differ)
Property changes on: jbpm3/trunk/modules/gwt-console/server/src/main/resources/org/jboss/bpm/console/server/jbpm3/dao/internal/1.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm3/trunk/modules/gwt-console/server/src/main/resources/org/jboss/bpm/console/server/jbpm3/dao/internal/gpd.xml
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/src/main/resources/org/jboss/bpm/console/server/jbpm3/dao/internal/gpd.xml (rev 0)
+++ jbpm3/trunk/modules/gwt-console/server/src/main/resources/org/jboss/bpm/console/server/jbpm3/dao/internal/gpd.xml 2008-10-13 17:06:31 UTC (rev 2532)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-diagram name="websale" width="566" height="541">
+ <node name="Create new web sale order" x="250" y="50" width="200" height="40">
+ <transition>
+ <label x="5" y="-10"/>
+ </transition>
+ </node>
+ <node name="Evaluate web order" x="280" y="125" width="140" height="40">
+ <transition name="ok">
+ <label x="9" y="-10"/>
+ </transition>
+ <transition name="more info needed">
+ <label x="-44" y="-18"/>
+ <bendpoint w1="-114" h1="-35" w2="116" h2="-35"/>
+ </transition>
+ </node>
+ <node name="Fix web order data" x="50" y="125" width="140" height="40">
+ <transition>
+ <label x="5" y="-10"/>
+ <bendpoint w1="109" h1="32" w2="-121" h2="32"/>
+ </transition>
+ </node>
+ <node name="salefork" x="250" y="200" width="200" height="25">
+ <transition name="payment">
+ <label x="12" y="-18"/>
+ <bendpoint w1="145" h1="31" w2="0" h2="-52"/>
+ </transition>
+ <transition name="shipping">
+ <label x="10" y="10"/>
+ <bendpoint w1="-130" h1="34" w2="0" h2="-89"/>
+ </transition>
+ </node>
+ <node name="Wait for money" x="425" y="275" width="140" height="40">
+ <transition>
+ <label x="5" y="-10"/>
+ </transition>
+ </node>
+ <node name="update books" x="425" y="350" width="140" height="40">
+ <transition>
+ <label x="5" y="-10"/>
+ <bendpoint w1="-1" h1="34" w2="144" h2="-33"/>
+ </transition>
+ </node>
+ <node name="ship item" x="150" y="315" width="140" height="40">
+ <transition>
+ <label x="5" y="-10"/>
+ <bendpoint w1="-1" h1="74" w2="-131" h2="-28"/>
+ </transition>
+ </node>
+ <node name="salejoin" x="250" y="425" width="200" height="25">
+ <transition>
+ <label x="5" y="-10"/>
+ </transition>
+ </node>
+ <node name="end" x="280" y="500" width="140" height="40"/>
+</process-diagram>
+
Property changes on: jbpm3/trunk/modules/gwt-console/server/src/main/resources/org/jboss/bpm/console/server/jbpm3/dao/internal/gpd.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/modules/gwt-console/server/src/main/webapp/index.html
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/src/main/webapp/index.html 2008-10-10 16:20:55 UTC (rev 2531)
+++ jbpm3/trunk/modules/gwt-console/server/src/main/webapp/index.html 2008-10-13 17:06:31 UTC (rev 2532)
@@ -55,6 +55,31 @@
<td>A list of assigned roles matching the query parameter (Comma seperated list)</td>
<td>application/json</td>
</tr>
+
+ <tr>
+ <td colspan=4><h3>jBPM3 proprietary extensions</h3></td>
+ </tr>
+
+ <tr>
+ <td>GET</td>
+ <td><a href="/gwt-console-server/rs/jbpm3/definitions/1/image">/rs/jbpm3/definitions/{processId}/image</a></td>
+ <td>Retrieve a process definition image (GPD), if deployed</td>
+ <td>image/jpeg</td>
+ </tr>
+
+ <tr>
+ <td>GET</td>
+ <td>/rs/jbpm3/definitions/{processId}/diagramInfo</td>
+ <td>Retrieve a process definition coordinates (GPD)</td>
+ <td>application/json</td>
+ </tr>
+
+ <tr>
+ <td>GET</td>
+ <td>/rs/jbpm3/instances/{instanceId}/activeNodeInfo</td>
+ <td>Retrieve a process definition coordinates (GPD) of the active node</td>
+ <td>application/json</td>
+ </tr>
</table>
<h2>Example usage</h2>
Deleted: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/Config.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/Config.java 2008-10-10 16:20:55 UTC (rev 2531)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/Config.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -1,83 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.console.client;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class Config
-{
- String consoleServerUrl = "http://localhost:8080";
- String webContext = "/gwt-console-server";
-
- public String getConsoleServerUrl()
- {
- return consoleServerUrl;
- }
-
- public void setConsoleServerUrl(String consoleServerUrl)
- {
- this.consoleServerUrl = consoleServerUrl;
- }
-
- public String getWebContext()
- {
- return webContext;
- }
-
- public void setWebContext(String webContext)
- {
- this.webContext = webContext;
- }
-
- public String getProcessDefinitionURL()
- {
- return consoleServerUrl + webContext + "/rs/process/definitions";
- }
-
- public String getProcessInstanceURL(long processId)
- {
- return consoleServerUrl + webContext + "/rs/process/definitions/"+processId+"/instances";
- }
-
- public String getUserInRoleURL(String[] possibleRoles)
- {
- StringBuffer sb = new StringBuffer();
- for(int i=0; i<possibleRoles.length; i++)
- {
- sb.append(possibleRoles[i]);
- if(i<possibleRoles.length-1)
- sb.append(",");
- }
- return consoleServerUrl + webContext + "/rs/user/roles?roleCheck="+sb.toString();
- }
-
- public String getRemoveDefinitionURL(long processId)
- {
- return consoleServerUrl + webContext + "/rs/process/definitions/" + processId + "/remove";
- }
-
- public String getRemoveInstanceURL(long instanceId)
- {
- return consoleServerUrl + webContext + "/rs/process/instances/" + instanceId + "/remove";
- }
-}
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java 2008-10-10 16:20:55 UTC (rev 2531)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -57,7 +57,7 @@
private HeaderPanel header;
private MainMenu mainMenu;
private EditorPanel editorPanel;
- private Config config = new Config();
+ private RestURL restURL = new RestURL( "http://localhost:8080", "gwt-console-server");
private String[] rolesAssigned = new String[] {};
private final static String[] POSSIBLE_ROLES = {"admin", "user"};
@@ -149,7 +149,7 @@
if(GWT.isScript())
{
- String url = getConfig().getUserInRoleURL(POSSIBLE_ROLES);
+ String url = getRestURL().getUserInRoleURL(POSSIBLE_ROLES);
RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, url);
try
@@ -235,9 +235,9 @@
return editorPanel.hasEditor(id);
}
- public Config getConfig()
+ public RestURL getRestURL()
{
- return config;
+ return restURL;
}
public void showEditor(String id)
Copied: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/RestURL.java (from rev 2515, jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/Config.java)
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/RestURL.java (rev 0)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/RestURL.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -0,0 +1,99 @@
+/*
+ * 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;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class RestURL
+{
+ private final String consoleServerUrl;
+ private final String webContext;
+
+ public RestURL(String consoleServerUrl, String webContext)
+ {
+ this.consoleServerUrl = consoleServerUrl;
+ this.webContext = webContext;
+ }
+
+ public String getConsoleServerUrl()
+ {
+ return consoleServerUrl;
+ }
+
+ public String getWebContext()
+ {
+ return webContext;
+ }
+
+ private String getBaseUrl()
+ {
+ return consoleServerUrl + "/" + webContext;
+ }
+
+ public String getProcessDefinitionURL()
+ {
+ return getBaseUrl() + "/rs/process/definitions";
+ }
+
+ public String getProcessInstanceURL(long processId)
+ {
+ return getBaseUrl() + "/rs/process/definitions/"+processId+"/instances";
+ }
+
+ public String getUserInRoleURL(String[] possibleRoles)
+ {
+ StringBuffer sb = new StringBuffer();
+ for(int i=0; i<possibleRoles.length; i++)
+ {
+ sb.append(possibleRoles[i]);
+ if(i<possibleRoles.length-1)
+ sb.append(",");
+ }
+ return getBaseUrl() + "/rs/user/roles?roleCheck="+sb.toString();
+ }
+
+ public String getRemoveDefinitionURL(long processId)
+ {
+ return getBaseUrl() + "/rs/process/definitions/" + processId + "/remove";
+ }
+
+ public String getRemoveInstanceURL(long instanceId)
+ {
+ return getBaseUrl() + "/rs/process/instances/" + instanceId + "/remove";
+ }
+
+ public String getProcessImageURL(long processId)
+ {
+ return getBaseUrl() + "/rs/jbpm3/definitions/" + processId + "/image";
+ }
+
+ public String getDiagramInfoURL(long processId)
+ {
+ return getBaseUrl() + "/rs/jbpm3/definitions/" + processId + "/diagramInfo";
+ }
+
+ public String getActiveNodeInfoURL(long instanceId)
+ {
+ return getBaseUrl() + "/rs/jbpm3/instances/" + instanceId + "/activeNodeInfo";
+ }
+}
Property changes on: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/RestURL.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java 2008-10-10 16:20:55 UTC (rev 2531)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -48,7 +48,7 @@
private static String getResourceUrl(ConsoleView view)
{
- return view.getConfig().getProcessDefinitionURL();
+ return view.getRestURL().getProcessDefinitionURL();
}
protected ColumnModel createColumnModel()
@@ -106,7 +106,7 @@
if("yes".equals( btnID) )
{
ProcessDefinition proc = (ProcessDefinition)row2ProcessMap.get(row);
- String url = view.getConfig().getRemoveDefinitionURL(proc.getProcessId());
+ String url = view.getRestURL().getRemoveDefinitionURL(proc.getProcessId());
RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, url);
try
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageView.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageView.java 2008-10-10 16:20:55 UTC (rev 2531)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageView.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -21,33 +21,138 @@
*/
package org.jboss.bpm.console.client.process;
+import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.json.client.JSONObject;
import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.HTML;
+import com.gwtext.client.widgets.Component;
import com.gwtext.client.widgets.Panel;
+import com.gwtext.client.widgets.event.PanelListenerAdapter;
+import org.jboss.bpm.console.client.ConsoleView;
import org.jboss.bpm.console.client.model.ProcessInstance;
+import org.jboss.bpm.console.client.model.jbpm3.ActiveNodeInfo;
+import org.jboss.bpm.console.client.model.jbpm3.DiagramNodeInfo;
+import org.jboss.bpm.console.client.util.JSONRequest;
+import org.jboss.bpm.console.client.util.JSONRequestHandler;
+import org.jboss.bpm.console.client.util.JSONWalk;
/**
+ * Fetches the {@link org.jboss.bpm.console.client.model.jbpm3.ActiveNodeInfo}
+ * and displays the process image.<p>
+ *
+ * The {@link com.gwtext.client.widgets.event.PanelListenerAdapter#doBeforeRender(com.gwtext.client.widgets.Component)}
+ * callback forces the GET request on the active node info, but has weak error handling and thus can result in 'null'.<br>
+ *
+ * The {@link com.gwtext.client.widgets.event.PanelListenerAdapter#onRender(com.gwtext.client.widgets.Component)}
+ * callback fetches the process definition image, if available.
* @author Heiko.Braun <heiko.braun at jboss.com>
*/
public class ProcessImageView extends Panel
{
+ private ProcessInstance instance;
+ private ConsoleView view;
+ private ActiveNodeInfo activeNodeInfo = null;
- private ProcessInstance parent;
-
- public ProcessImageView(ProcessInstance parent)
+ public ProcessImageView(final ProcessInstance instance, final ConsoleView view)
{
super();
- this.parent = parent;
-
- final Image image = new Image("images/processSample.jpg");
- image.setStyleName("bpm-ProcessImage");
-
+ this.instance = instance;
+ this.view = view;
+
this.setHeader(false);
this.setBorder(true);
this.setFrame(false);
this.setAutoScroll(true);
+
+ this.addListener(
+ new PanelListenerAdapter()
+ {
+ public boolean doBeforeRender(Component component)
+ {
+ System.out.println("doBeforeRender");
+ loadActiveNodeInfo();
+ return true;
+ }
+
+
+ public void onRender(Component component)
+ {
+ System.out.println("onRender");
+ /*final Image image = new Image("images/processSample.jpg");
+ image.setStyleName("bpm-ProcessImage");
+ add(image);*/
+
+
+ }
+ }
+ );
+
+ }
+
+ private void loadActiveNodeInfo()
+ {
+ String url = view.getRestURL().getActiveNodeInfoURL(this.instance.getId());
+ System.out.println("Loading activeNodeInfo: " + url);
+
+ JSONRequest.get(url,
+ new JSONRequestHandler() {
+
+ public void onRequestComplete(JavaScriptObject json)
+ {
+ JSONObject root = new JSONObject(json);
+ int diagramWidth = JSONWalk.on(root).next("diagramWidth").asInt();
+ int diagramHeight = JSONWalk.on(root).next("diagramHeight").asInt();
+
+ JSONObject activeNode = JSONWalk.on(root).next("activeNode").asObject();
+
+ int x = JSONWalk.on(activeNode).next("x").asInt();
+ int y = JSONWalk.on(activeNode).next("y").asInt();
+
+ int width = JSONWalk.on(activeNode).next("width").asInt();
+ int height = JSONWalk.on(activeNode).next("height").asInt();
+ String name = JSONWalk.on(activeNode).next("name").asString();
+
+ ActiveNodeInfo activeNodeInfo =
+ new ActiveNodeInfo(
+ diagramWidth, diagramHeight,
+ new DiagramNodeInfo(name, x, y, width, height)
+ );
+
+ onActiveNodeInfoLoaded(activeNodeInfo);
+ }
+ }
+ );
+
+ }
+
+ public void onActiveNodeInfoLoaded(ActiveNodeInfo activeNodeInfo)
+ {
+ System.out.println("Successfully loaded activeNodeInfo:" + activeNodeInfo.getActiveNode().getName());
+ this.activeNodeInfo = activeNodeInfo;
+
+ DiagramNodeInfo activeNode = activeNodeInfo.getActiveNode();
+ String imageUrl = view.getRestURL().getProcessImageURL(instance.getParentId());
- this.add(image);
+ HTML html = new HTML(
+ "<div id=\"imageContainer\" style=\"position:relative;top:-1;left:-1;height:"+activeNodeInfo.getHeight()+"px;width:"+activeNodeInfo.getWidth()+"px\">" +
+ "<img src=\""+imageUrl+"\" style=\"position:absolute;top:0;left:0\" />" +
+ "" +
+ "<div class=\"activeNode\" style=\"top:"+ (activeNode.getY()) +"px;left:"+activeNode.getX()+"px;width:"+(activeNode.getWidth()-2)+"px;height:"+(activeNode.getHeight()-2)+"px\"></div>" +
+ "" +
+ "<div class=\"activeNode-header\" style=\"top:"+(activeNode.getY()-15)+"px;left:"+activeNode.getX()+"px;width:"+activeNode.getWidth()+"px;height:15px\">" +
+ " <div class=\"activeNode-header-link\"><a href=\"javascript:alert('Not implemented!')\">Running</a></div>" +
+ "</div>" +
+ "</div>"
+ );
+ add(html);
+ doLayout();
+
}
+
+ public ActiveNodeInfo getActiveNodeInfo()
+ {
+ return activeNodeInfo;
+ }
}
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java 2008-10-10 16:20:55 UTC (rev 2531)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -37,7 +37,7 @@
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
*
- * @see ProcessInstanceList#onExamine(Integer)
+ * @see ProcessInstanceList#onExamine(int)
*/
public class ProcessInstanceEditor extends EditorView
{
@@ -71,7 +71,7 @@
// ----------------------------------
- ProcessImageView imageView = new ProcessImageView(instance);
+ ProcessImageView imageView = new ProcessImageView(instance, view);
imageView.setWidth(UIConstants.EDITOR_PANEL_WIDTH);
Toolbar imageToolbar = new Toolbar();
@@ -85,14 +85,11 @@
final Window window = new Window();
window.setTitle("Process Graph");
window.setClosable(true);
- window.setWidth(600);
- window.setHeight(400);
- window.setPlain(true);
- /*window.setLayout(new BorderLayout());
- window.add(tabPanel, centerData);
- window.add(navPanel, westData);*/
+ window.setWidth(800);
+ window.setHeight(600);
+ window.setPlain(true);
window.setCloseAction(Window.HIDE);
- window.add(new ProcessImageView(instance) );
+ window.add(new ProcessImageView(instance, view) );
window.show("");
}
}
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java 2008-10-10 16:20:55 UTC (rev 2531)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -79,7 +79,7 @@
if("yes".equals( btnID) )
{
ProcessInstance instance = row2InstanceMap.get(row);
- String url = view.getConfig().getRemoveInstanceURL(instance.getId());
+ String url = view.getRestURL().getRemoveInstanceURL(instance.getId());
RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, url);
try
@@ -173,7 +173,7 @@
private static String getResourceUrl(ConsoleView view, long parentId)
{
- return view.getConfig().getProcessInstanceURL(parentId);
+ return view.getRestURL().getProcessInstanceURL(parentId);
}
}
Added: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/util/JSONRequest.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/util/JSONRequest.java (rev 0)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/util/JSONRequest.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -0,0 +1,53 @@
+/*
+ * 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.util;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class JSONRequest {
+ public static void get(String url, JSONRequestHandler handler)
+ {
+ String callbackName = "JSONCallback"+handler.hashCode();
+ get( url+"?callback="+callbackName, callbackName, handler );
+ }
+
+ public static void get(String url, String callbackName, JSONRequestHandler handler )
+ {
+ createCallbackFunction( handler, callbackName );
+ addScript(url);
+ }
+
+ public static native void addScript(String url) /*-{
+ var scr = document.createElement("script");
+ scr.setAttribute("language", "JavaScript");
+ scr.setAttribute("src", url);
+ document.getElementsByTagName("body")[0].appendChild(scr);
+ }-*/;
+
+ private native static void createCallbackFunction( JSONRequestHandler obj, String callbackName)/*-{
+ tmpcallback = function(j) {
+ obj. at org.jboss.bpm.console.client.util.JSONRequestHandler::onRequestComplete(Lcom/google/gwt/core/client/JavaScriptObject;)(j);
+ };
+ eval( "window." + callbackName + "=tmpcallback" );
+ }-*/;
+}
Property changes on: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/util/JSONRequest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/util/JSONRequestHandler.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/util/JSONRequestHandler.java (rev 0)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/util/JSONRequestHandler.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -0,0 +1,32 @@
+/*
+ * 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.util;
+
+import com.google.gwt.core.client.JavaScriptObject;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public interface JSONRequestHandler
+{
+ void onRequestComplete(JavaScriptObject json);
+}
Property changes on: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/util/JSONRequestHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/util/JSONWalk.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/util/JSONWalk.java (rev 0)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/util/JSONWalk.java 2008-10-13 17:06:31 UTC (rev 2532)
@@ -0,0 +1,162 @@
+/*
+ * 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.util;
+
+import com.google.gwt.json.client.JSONObject;
+import com.google.gwt.json.client.JSONValue;
+import com.google.gwt.json.client.JSONException;
+import com.google.gwt.json.client.JSONArray;
+
+import java.util.Iterator;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class JSONWalk
+{
+ private JSONValue root;
+
+
+ private JSONWalk(JSONValue root)
+ {
+ this.root = root;
+ }
+
+ public static JSONWalk on(JSONValue root)
+ {
+ return new JSONWalk(root);
+ }
+
+ public JSONWrapper next(String name)
+ {
+ if(null==root || root.isObject()==null) return null;
+ JSONObject rootObject = root.isObject();
+
+ JSONWrapper match = null;
+ Iterator it = rootObject.keySet().iterator();
+ while(it.hasNext())
+ {
+ String s = (String)it.next();
+ JSONValue child = rootObject.get(s);
+ if(name.equals(s))
+ {
+ match = new JSONWrapper(child);
+ break;
+ }
+ else
+ {
+ match = JSONWalk.on(child).next(name);
+ }
+ }
+
+ return match;
+ }
+
+ public class JSONWrapper
+ {
+
+ private JSONValue value;
+
+ public JSONWrapper(JSONValue value)
+ {
+ this.value = value;
+ }
+
+ public int asInt()
+ {
+ if(value.isNumber()!=null)
+ {
+ return new Double(value.isNumber().getValue()).intValue();
+ }
+ else
+ {
+ throw new IllegalArgumentException("Not a number: " + value);
+ }
+ }
+
+ public double asDouble()
+ {
+ if(value.isNumber()!=null)
+ {
+ return value.isNumber().getValue();
+ }
+ else
+ {
+ throw new IllegalArgumentException("Not a number: " + value);
+ }
+ }
+
+ public String asString()
+ {
+ if(value.isString()!=null)
+ {
+ return value.isString().stringValue();
+ }
+ else
+ {
+ throw new IllegalArgumentException("Not a string: " + value);
+ }
+ }
+
+ public boolean asBool()
+ {
+ if(value.isBoolean()!=null)
+ {
+ return value.isBoolean().booleanValue();
+ }
+ else
+ {
+ throw new IllegalArgumentException("Not a boolean: " + value);
+ }
+ }
+
+ public JSONArray asArray()
+ {
+ if(value.isArray()!=null)
+ {
+ return value.isArray();
+ }
+ else
+ {
+ throw new IllegalArgumentException("Not a number: " + value);
+ }
+ }
+
+ public JSONObject asObject()
+ {
+ if(value.isObject()!=null)
+ {
+ return value.isObject();
+ }
+ else
+ {
+ throw new IllegalArgumentException("Not an object: " + value);
+ }
+ }
+
+
+ public String toString() throws JSONException
+ {
+ return value.toString();
+ }
+ }
+}
Property changes on: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/util/JSONWalk.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/resources/org/jboss/bpm/console/public/console.css
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/resources/org/jboss/bpm/console/public/console.css 2008-10-10 16:20:55 UTC (rev 2531)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/resources/org/jboss/bpm/console/public/console.css 2008-10-13 17:06:31 UTC (rev 2532)
@@ -1,6 +1,6 @@
.bpm-layout {
border: 1px solid green;
- margin: 10px;
+ margin: 10px;
}
.bpm-header {
@@ -27,11 +27,11 @@
}
.bpm-EvenRow {
- background-color: #f0f4f8;
+ background-color: #f0f4f8;
}
.bpm-FieldValue {
-
+
}
.bpm-EditorHeader {
@@ -61,41 +61,77 @@
}
.bpm-help-icon {
- background-image: url( images/icons/14.png)
+ background-image: url( images/icons/14.png)
}
.bpm-metric-icon {
- background-image: url( images/icons/31.png)
+ background-image: url( images/icons/31.png)
}
.bpm-process-icon {
- background-image: url( images/icons/41.png)
+ background-image: url( images/icons/41.png)
}
.bpm-task-icon {
- background-image: url( images/icons/29.png)
+ background-image: url( images/icons/29.png)
}
.bpm-instance-icon {
- background-image: url( images/icons/05_1.png)
+ background-image: url( images/icons/05_1.png)
}
.bpm-settings-icon {
- background-image: url( images/icons/36.png)
+ background-image: url( images/icons/36.png)
}
.bpm-switch-context-icon {
- background-image: url( images/icons/13.png)
+ background-image: url( images/icons/13.png)
}
.bpm-comment-icon {
- background-image: url( images/icons/27.png)
+ background-image: url( images/icons/27.png)
}
.bpm-enalrge-icon {
- background-image: url( images/icons/49.png)
+ background-image: url( images/icons/49.png)
}
.login-panel-content {
text-align: center;
+}
+
+
+div.activeNode {
+ position:absolute;
+ border-width:1px;
+ border-style:solid;
+ border-color:#6699CC;
+}
+
+div.activeNode-header {
+ position:absolute;
+ overflow:hidden;
+}
+
+div.activeNode-header-link {
+ cursor:default;
+ font-family:sans-serif;
+ font-size:10px;
+ white-space:nowrap;
+ color:#ffffff;
+ padding-left:3px;
+ padding-right:3px;
+ border-width:1px;
+ border-style:solid;
+ border-color:#6699CC;
+ background-color:#6699CC;
+}
+
+div.activeNode-header-link a {
+ color:#ffffff;
+ text-decoration:none;
+}
+
+div.activeNode-header-link a:hover {
+ text-decoration:underline;
}
\ No newline at end of file
More information about the jbpm-commits
mailing list