[overlord-commits] Overlord SVN: r707 - in bpm-console/trunk: bpm/gui/war/src/main/java/com/google/gson/reflect and 23 other directories.
overlord-commits at lists.jboss.org
overlord-commits at lists.jboss.org
Thu Jul 30 07:01:40 EDT 2009
Author: heiko.braun at jboss.com
Date: 2009-07-30 07:01:39 -0400 (Thu, 30 Jul 2009)
New Revision: 707
Added:
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/model/
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java
bpm-console/trunk/bpm/rpc/bpm-rpc.iml
bpm-console/trunk/bpm/server/server-core/bpm-server-core.iml
bpm-console/trunk/bpm/server/server-integration/bpm-server-integration.iml
bpm-console/trunk/workspace/common/common.iml
bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/DateLocale.java
bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/MapEntry.java
bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/SimpleDateFormat.java
bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/SimpleDateParser.java
bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/regex/
bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/regex/Pattern.java
bpm-console/trunk/workspace/workspace-api/workspace-api.iml
Removed:
bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/DateLocale.java
bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/MapEntry.java
bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/SimpleDateFormat.java
bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/SimpleDateParser.java
bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/regex/
bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java
Modified:
bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/DefaultTypeAdapters.java
bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/Gson.java
bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/JsonObject.java
bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/MappedObjectConstructor.java
bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/TypeInfoFactory.java
bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/reflect/TypeToken.java
bpm-console/trunk/bpm/gui/war/src/main/java/jmaki/xhp/HttpClient.java
bpm-console/trunk/bpm/gui/war/src/main/java/jmaki/xhp/XmlHttpProxy.java
bpm-console/trunk/bpm/gui/war/src/main/java/jmaki/xhp/XmlHttpProxyServlet.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/Application.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/BootstrapAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/Header.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/LoginAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/ServerPlugins.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditorNavigation.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractView.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeleteDeploymentAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentDetailView.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/ExecuteJobAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListView.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/ResourcePanel.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/ResumeDeploymentAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/SuspendDeploymentAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateDeploymentsAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateJobsAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/events/BootstrapEvent.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/ActivityDiagramView.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteDefinitionAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteInstanceAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeploymentPanel.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDataView.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDetailView.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadActivityDiagramAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDetailView.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/StartNewInstanceAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/StateChangeAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateDefinitionsAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstanceDataAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstanceDetailAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstancesAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/events/ActivityDiagramResultEvent.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/search/SearchDefinitionView.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/search/UpdateSearchDefinitionsAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/AbstractTaskList.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignTaskAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/ClaimTaskAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksParticipationAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/ParticipantPanel.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/ReleaseTaskAction.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailView.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/rebind/WorkspaceGenerator.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/json/JSONObject.java
bpm-console/trunk/bpm/gui/war/src/main/java/org/json/Test.java
bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java
bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/Authentication.java
bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java
bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/JSONWalk.java
Log:
Refactor build, part 2
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/DefaultTypeAdapters.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/DefaultTypeAdapters.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/DefaultTypeAdapters.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -28,19 +28,7 @@
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
-import java.util.Collection;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Queue;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.StringTokenizer;
-import java.util.TreeSet;
+import java.util.*;
/**
* List of all the default type adapters ({@link JsonSerializer}s, {@link JsonDeserializer}s,
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/Gson.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/Gson.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/Gson.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -16,12 +16,7 @@
package com.google.gson;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.io.Writer;
+import java.io.*;
import java.lang.reflect.Modifier;
import java.lang.reflect.Type;
import java.util.LinkedList;
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/JsonObject.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/JsonObject.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/JsonObject.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -18,8 +18,8 @@
import java.util.LinkedHashMap;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Set;
-import java.util.Map.Entry;
/**
* A class representing an object type in Json. An object consists of name-value pairs where names
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/MappedObjectConstructor.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/MappedObjectConstructor.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/MappedObjectConstructor.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -16,11 +16,7 @@
package com.google.gson;
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Array;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Type;
+import java.lang.reflect.*;
import java.util.logging.Level;
import java.util.logging.Logger;
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/TypeInfoFactory.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/TypeInfoFactory.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/TypeInfoFactory.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -16,12 +16,7 @@
package com.google.gson;
-import java.lang.reflect.Field;
-import java.lang.reflect.GenericArrayType;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.lang.reflect.TypeVariable;
-import java.lang.reflect.WildcardType;
+import java.lang.reflect.*;
/**
* A static factory class used to construct the "TypeInfo" objects.
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/reflect/TypeToken.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/reflect/TypeToken.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/com/google/gson/reflect/TypeToken.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -16,11 +16,7 @@
package com.google.gson.reflect;
-import java.lang.reflect.Array;
-import java.lang.reflect.GenericArrayType;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.lang.reflect.TypeVariable;
+import java.lang.reflect.*;
import java.util.HashMap;
import java.util.Map;
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/jmaki/xhp/HttpClient.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/jmaki/xhp/HttpClient.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/jmaki/xhp/HttpClient.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -3,12 +3,16 @@
$Id: HttpClient.java 2631 2008-10-27 17:25:05Z heiko.braun at jboss.com $
*/package jmaki.xhp;
-import java.io.*;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.security.Security;
+import java.util.Iterator;
import java.util.Map;
-import java.util.Iterator;
-import java.net.*;
-import java.util.logging.*;
-import java.security.Security;
+import java.util.logging.Logger;
/**
* @author Yutaka Yoshida, Greg Murray
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/jmaki/xhp/XmlHttpProxy.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/jmaki/xhp/XmlHttpProxy.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/jmaki/xhp/XmlHttpProxy.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -9,17 +9,21 @@
$Id: XmlHttpProxy.java 2660 2008-10-29 14:40:28Z heiko.braun at jboss.com $
*/
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
import java.io.*;
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.*;
-import java.util.logging.*;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.logging.Logger;
-import javax.xml.transform.*;
-import javax.xml.transform.stream.*;
-
-import org.json.*;
-
public class XmlHttpProxy {
public static String GET = "GET";
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/jmaki/xhp/XmlHttpProxyServlet.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/jmaki/xhp/XmlHttpProxyServlet.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/jmaki/xhp/XmlHttpProxyServlet.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -4,18 +4,29 @@
*/
package jmaki.xhp;
-import java.io.*;
-import java.util.*;
+import org.json.JSONObject;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
-import java.util.logging.*;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.StringTokenizer;
+import java.util.logging.Level;
+import java.util.logging.Logger;
-import javax.servlet.*;
-import javax.servlet.http.*;
-
-import org.json.*;
-
/** XmlHttpProxyServlet
* @author Greg Murray
*/
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/Application.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/Application.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/Application.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,13 +21,13 @@
*/
package org.jboss.bpm.console.client;
+import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.DeferredCommand;
-import com.google.gwt.user.client.DOM;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
-import com.allen_sauer.gwt.log.client.Log;
/**
* Setup the main {@link com.mvc4g.client.Controller} and fire
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/BootstrapAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/BootstrapAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/BootstrapAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,14 +21,14 @@
*/
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.JSONParser;
import com.google.gwt.json.client.JSONValue;
-import com.google.gwt.json.client.JSONParser;
import com.mvc4g.client.Controller;
+import org.jboss.bpm.console.client.common.AbstractRESTAction;
+import org.jboss.bpm.console.client.model.DTOParser;
+import org.jboss.bpm.console.client.model.ServerStatus;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
@@ -49,7 +49,7 @@
public String getUrl(Object event)
{
- return appContext.getUrlBuilder().getServerStatusURL();
+ return URLBuilder.getInstance().getServerStatusURL();
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/Header.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/Header.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/Header.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,20 +21,18 @@
*/
package org.jboss.bpm.console.client;
-import com.google.gwt.user.client.ui.*;
-import com.google.gwt.user.client.Timer;
import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.Timer;
+import com.google.gwt.user.client.ui.*;
import com.mvc4g.client.Controller;
import com.mvc4g.client.ViewInterface;
-
-import java.util.List;
-
-import org.gwt.mosaic.ui.client.layout.LayoutPanel;
import org.gwt.mosaic.ui.client.layout.BoxLayout;
import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
-import org.gwt.mosaic.ui.client.layout.AbsoluteLayout;
+import org.gwt.mosaic.ui.client.layout.LayoutPanel;
import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
+import java.util.List;
+
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
*/
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/LoginAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/LoginAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/LoginAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -23,9 +23,6 @@
import com.mvc4g.client.ActionInterface;
import com.mvc4g.client.Controller;
-import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.DeferredCommand;
-import com.google.gwt.user.client.Command;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -42,8 +42,7 @@
{
public final static String NAME = "loginView";
- private ConsoleConfig config;
- private URLBuilder urlBuilder;
+ private ConsoleConfig config;
private Authentication auth;
private WindowPanel window = null;
@@ -56,29 +55,18 @@
public LoginView()
{
- config = new ConsoleConfig();
- // setup
+ // setup base urls
+ String proxyUrl = null;
if (!GWT.isScript())
{
- String proxyUrl = GWT.getModuleBaseURL() + "xhp";
- config.setConsoleServerUrl(proxyUrl);
+ proxyUrl = GWT.getModuleBaseURL() + "xhp";
}
- else
- {
- // extract host
- String base = GWT.getHostPageBaseURL();
- String protocol = base.substring(0, base.indexOf("//")+2);
- String noProtocol = base.substring(base.indexOf(protocol)+protocol.length(), base.length());
- String host = noProtocol.substring(0, noProtocol.indexOf("/"));
-
- config.setConsoleServerUrl(protocol + host + config.getServerWebContext());
- }
-
+
+ config = new ConsoleConfig(proxyUrl);
ConsoleLog.debug("Console server: " + config.getConsoleServerUrl());
- urlBuilder = new URLBuilder(config);
-
+ URLBuilder.configureInstance(config);
}
public void setController(Controller controller)
@@ -152,7 +140,7 @@
String user = usernameInput.getText();
String pass = passwordInput.getText();
- String url = urlBuilder.getUserInRoleURL(KNOWN_ROLES);
+ String url = URLBuilder.getInstance().getUserInRoleURL(KNOWN_ROLES);
auth = new Authentication(url);
auth.setCallback(
new Authentication.AuthCallback()
@@ -176,7 +164,7 @@
// move the loading div to foreground
DOM.getElementById("splash").getStyle().setProperty("z-index", "1000");
DOM.getElementById("ui_loading").getStyle().setProperty("visibility", "visible");
- new MainLayout(controller, auth, urlBuilder, config);
+ new MainLayout(controller, auth, config);
}
});
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -27,19 +27,19 @@
import com.google.gwt.user.client.*;
import com.google.gwt.user.client.ui.*;
import com.google.gwt.user.client.ui.HTML;
-import com.mvc4g.client.*;
+import com.mvc4g.client.Controller;
import org.gwt.mosaic.ui.client.*;
import org.gwt.mosaic.ui.client.layout.BorderLayout;
import static org.gwt.mosaic.ui.client.layout.BorderLayout.Region;
import org.gwt.mosaic.ui.client.layout.BorderLayoutData;
import org.gwt.mosaic.ui.client.layout.LayoutPanel;
import org.gwt.mosaic.ui.client.util.ButtonHelper;
-import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
-import org.jboss.bpm.console.client.util.WindowUtil;
-import org.jboss.bpm.console.client.engine.ViewDeploymentAction;
import org.jboss.bpm.console.client.engine.UpdateDeploymentsAction;
+import org.jboss.bpm.console.client.engine.ViewDeploymentAction;
+import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
import org.jboss.bpm.console.client.process.UpdateDefinitionsAction;
import org.jboss.bpm.console.client.task.TaskEditor;
+import org.jboss.bpm.console.client.util.WindowUtil;
/**
* The main composite that assembles the gwt console application.
@@ -55,19 +55,18 @@
private Menu menu;
private Workspace workspace;
- private URLBuilder urlBuilder;
+
private Authentication auth;
private ConsoleConfig config;
private Controller controller;
private Viewport viewport;
- public MainLayout(Controller controller, Authentication auth, URLBuilder urlBuilder, ConsoleConfig config)
+ public MainLayout(Controller controller, Authentication auth, ConsoleConfig config)
{
this.controller = controller;
this.auth = auth;
- this.config = config;
- this.urlBuilder = urlBuilder;
+ this.config = config;
display();
}
@@ -216,11 +215,6 @@
return this.controller;
}
- public URLBuilder getUrlBuilder()
- {
- return this.urlBuilder;
- }
-
public void displayMessage(final String message, final boolean isError)
{
if(isError)
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/ServerPlugins.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/ServerPlugins.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/ServerPlugins.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,8 +21,8 @@
*/
package org.jboss.bpm.console.client;
+import org.jboss.bpm.console.client.model.PluginInfo;
import org.jboss.bpm.console.client.model.ServerStatus;
-import org.jboss.bpm.console.client.model.PluginInfo;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditorNavigation.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditorNavigation.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditorNavigation.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -24,8 +24,6 @@
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>
Copied: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java (from rev 705, bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java)
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java (rev 0)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -0,0 +1,236 @@
+/*
+ * 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.http.client.URL;
+import com.google.gwt.core.client.GWT;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
+import org.jboss.bpm.console.client.model.TokenReference;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class URLBuilder
+{
+ private static ConsoleConfig config;
+
+ private static URLBuilder instance = null;
+
+ public static void configureInstance(ConsoleConfig config)
+ {
+ instance = new URLBuilder(config);
+ }
+
+ public static URLBuilder getInstance()
+ {
+ if(null==instance)
+ throw new IllegalArgumentException("UrlBuilder not configured");
+
+ return instance;
+ }
+
+ private URLBuilder(ConsoleConfig config)
+ {
+ this.config = config;
+ }
+
+ public String getProcessDefinitionsURL()
+ {
+ return config.getConsoleServerUrl() + "/rs/process/definitions";
+ }
+
+ public String getProcessInstancesURL(String processId)
+ {
+ String encodedId = URL.encode(processId);
+ return config.getConsoleServerUrl() + "/rs/process/definition/" + encodedId + "/instances";
+ }
+
+ public String getUserInRoleURL(String[] possibleRoles)
+ {
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0; i < possibleRoles.length; i++)
+ {
+ sb.append(URL.encode(possibleRoles[i]));
+ if (i < possibleRoles.length - 1)
+ sb.append(",");
+ }
+ return config.getConsoleServerUrl() + "/rs/identity/user/roles?roleCheck=" + sb.toString();
+ }
+
+ public String getServerStatusURL()
+ {
+ return config.getConsoleServerUrl() + "/rs/server/status";
+ }
+
+ @Deprecated
+ public String getRemoveDefinitionURL(String processId)
+ {
+ String encodedId = URL.encode(processId);
+ return config.getConsoleServerUrl() + "/rs/process/definition/" + encodedId+ "/remove";
+ }
+
+ public String getProcessImageURL(String processId)
+ {
+ String encodedId = URL.encode(processId);
+ return config.getConsoleServerUrl() + "/rs/process/definition/"+ encodedId+ "/image";
+ }
+
+ public String getActiveNodeInfoURL(String instanceId)
+ {
+ return config.getConsoleServerUrl() + "/rs/process/instance/" + instanceId + "/activeNodeInfo";
+ }
+
+ public String getStateChangeURL(String instanceId, ProcessInstanceRef.STATE state)
+ {
+ return config.getConsoleServerUrl() + "/rs/process/instance/" + instanceId + "/state/" + state;
+ }
+
+ public String getInstanceEndURL(String instanceId, ProcessInstanceRef.RESULT result)
+ {
+ return config.getConsoleServerUrl() + "/rs/process/instance/" + instanceId + "/end/" + result;
+ }
+
+ public String getInstanceDeleteURL(String instanceId)
+ {
+ return config.getConsoleServerUrl() + "/rs/process/instance/" + instanceId + "/delete";
+ }
+
+ public String getInstanceDataURL(String instanceId)
+ {
+ return config.getConsoleServerUrl() + "/rs/process/instance/" + instanceId + "/dataset";
+ }
+
+ public String getStartNewInstanceURL(String processId)
+ {
+ String encodedID = URL.encode(processId);
+ return config.getConsoleServerUrl() + "/rs/process/definition/" + encodedID + "/new_instance";
+ }
+
+ public String getTaskListURL(String idRef)
+ {
+ return config.getConsoleServerUrl() + "/rs/tasks/" + URL.encode(idRef);
+ }
+
+ public String getParticipationTaskListURL(String idRef)
+ {
+ return config.getConsoleServerUrl() + "/rs/tasks/" + URL.encode(idRef) +"/participation";
+ }
+
+ public String getTaskReleaseURL(long id)
+ {
+ return config.getConsoleServerUrl() + "/rs/task/" + id + "/release";
+ }
+
+ public String getTaskCompleteURL(long id)
+ {
+ return config.getConsoleServerUrl() + "/rs/task/" + id + "/close";
+ }
+
+ public String getTaskCompleteURL(long id, String outcome)
+ {
+ return config.getConsoleServerUrl() + "/rs/task/" + id + "/close/" + URL.encode(outcome);
+ }
+
+ public String getTaskAssignURL(long id, String idRef)
+ {
+ return config.getConsoleServerUrl() + "/rs/task/" + id + "/assign/" + URL.encode(idRef);
+ }
+
+ public String getExecutionSignalUrl(TokenReference tok)
+ {
+ return config.getConsoleServerUrl() + "/rs/process/tokens/" + tok.getId() + "/transition/default";
+ }
+
+ public String getExecutionSignalUrl(TokenReference tok, String signal)
+ {
+ String encodedSignal = URL.encode(signal);
+ return config.getConsoleServerUrl() + "/rs/process/tokens/" + tok.getId() + "/transition?signal=" + encodedSignal;
+ }
+
+ public String getAvailableActorsUrl(String actorId)
+ {
+ return config.getConsoleServerUrl() + "/rs/identity/user/" + actorId + "/actors";
+ }
+
+ public String getDeployTestHarnessUrl()
+ {
+ return config.getConsoleServerUrl() + "/rs/test/deploy/harness";
+ }
+
+ public String getUndeployTestHarnessUrl()
+ {
+ return config.getConsoleServerUrl() + "/rs/test/undeploy/harness";
+ }
+
+ public String getOverallReportUrl()
+ {
+ String name = URL.encode(config.getOverallReportFile());
+ String url = config.getConsoleServerUrl() + "/rs/report/view/" + name;
+ if (!GWT.isScript())
+ url += "?id=birt";
+ return url;
+ }
+
+ public String getProcessSummaryReportUrl(String defintionId)
+ {
+ String encId = URL.encode(defintionId);
+ String reportFileName = URL.encode(config.getProcessSummaryReportFile());
+ String url = config.getConsoleServerUrl() + "/rs/report/view/" + reportFileName + "?procId=" + encId;
+ if (!GWT.isScript())
+ url += "&id=birt";
+ return url;
+ }
+
+ public String getDeploymentsUrl()
+ {
+ return config.getConsoleServerUrl() + "/rs/engine/deployments";
+ }
+
+ public String getSuspendDeploymentUrl(String id)
+ {
+ String encodedId = URL.encode(id);
+ return config.getConsoleServerUrl() + "/rs/engine/deployment/"+encodedId+"/suspend";
+ }
+
+ public String getResumeDeploymentUrl(String id)
+ {
+ String encodedId = URL.encode(id);
+ return config.getConsoleServerUrl() + "/rs/engine/deployment/"+encodedId+"/resume";
+ }
+
+ public String getDeleteDeploymentUrl(String id)
+ {
+ String encodedId = URL.encode(id);
+ return config.getConsoleServerUrl() + "/rs/engine/deployment/"+encodedId+"/delete";
+ }
+
+ public String getJobsUrl()
+ {
+ return config.getConsoleServerUrl() + "/rs/engine/jobs";
+ }
+
+ public String getExecuteJobURL(String id)
+ {
+ String encodedId = URL.encode(id);
+ return config.getConsoleServerUrl() + "/rs/engine/job/"+encodedId+"/execute";
+ }
+}
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractView.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractView.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractView.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,9 +21,9 @@
*/
package org.jboss.bpm.console.client.common;
-import com.mvc4g.client.ViewInterface;
import com.google.gwt.user.client.ui.AbstractImagePrototype;
import com.google.gwt.user.client.ui.HTML;
+import com.mvc4g.client.ViewInterface;
import org.gwt.mosaic.ui.client.layout.LayoutPanel;
import org.jboss.bpm.console.client.LazyPanel;
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeleteDeploymentAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeleteDeploymentAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeleteDeploymentAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,12 +21,13 @@
*/
package org.jboss.bpm.console.client.engine;
-import org.jboss.bpm.console.client.common.AbstractRESTAction;
-import org.jboss.bpm.console.client.ApplicationContext;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.Response;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.URLBuilder;
+import org.jboss.bpm.console.client.common.AbstractRESTAction;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
@@ -49,7 +50,7 @@
public String getUrl(Object event)
{
String id = (String)event;
- return appContext.getUrlBuilder().getDeleteDeploymentUrl(id);
+ return URLBuilder.getInstance().getDeleteDeploymentUrl(id);
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentDetailView.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentDetailView.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentDetailView.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -22,14 +22,14 @@
package org.jboss.bpm.console.client.engine;
import com.google.gwt.user.client.ui.ChangeListener;
+import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Widget;
-import com.google.gwt.user.client.ui.ClickListener;
import com.mvc4g.client.Controller;
+import com.mvc4g.client.Event;
import com.mvc4g.client.ViewInterface;
-import com.mvc4g.client.Event;
import org.gwt.mosaic.ui.client.*;
+import org.gwt.mosaic.ui.client.layout.BoxLayout;
import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
-import org.gwt.mosaic.ui.client.layout.BoxLayout;
import org.gwt.mosaic.ui.client.layout.LayoutPanel;
import org.jboss.bpm.console.client.common.PropertyGrid;
import org.jboss.bpm.console.client.model.DeploymentRef;
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -36,10 +36,10 @@
import org.jboss.bpm.console.client.common.AbstractView;
import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
import org.jboss.bpm.console.client.model.DeploymentRef;
-import org.jboss.bpm.console.client.model.util.SimpleDateFormat;
+import org.jboss.bpm.console.client.util.SimpleDateFormat;
+import java.util.Date;
import java.util.List;
-import java.util.Date;
/**
* List of deployments
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/ExecuteJobAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/ExecuteJobAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/ExecuteJobAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,12 +21,13 @@
*/
package org.jboss.bpm.console.client.engine;
-import org.jboss.bpm.console.client.common.AbstractRESTAction;
-import org.jboss.bpm.console.client.ApplicationContext;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.Response;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.URLBuilder;
+import org.jboss.bpm.console.client.common.AbstractRESTAction;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
@@ -49,7 +50,7 @@
public String getUrl(Object event)
{
String id = (String)event;
- return appContext.getUrlBuilder().getExecuteJobURL(id);
+ return URLBuilder.getInstance().getExecuteJobURL(id);
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListView.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListView.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListView.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -28,17 +28,16 @@
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
import org.gwt.mosaic.ui.client.ListBox;
+import org.gwt.mosaic.ui.client.MessageBox;
import org.gwt.mosaic.ui.client.ToolBar;
import org.gwt.mosaic.ui.client.ToolButton;
-import org.gwt.mosaic.ui.client.MessageBox;
import org.gwt.mosaic.ui.client.layout.*;
import org.gwt.mosaic.ui.client.list.DefaultListModel;
+import org.jboss.bpm.console.client.ApplicationContext;
import org.jboss.bpm.console.client.common.AbstractView;
import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
import org.jboss.bpm.console.client.model.JobRef;
-import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
-import org.jboss.bpm.console.client.model.util.SimpleDateFormat;
-import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.util.SimpleDateFormat;
import java.util.Date;
import java.util.List;
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/ResourcePanel.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/ResourcePanel.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/ResourcePanel.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,8 +21,8 @@
*/
package org.jboss.bpm.console.client.engine;
+import com.google.gwt.user.client.ui.HTML;
import com.mvc4g.client.Controller;
-import com.google.gwt.user.client.ui.HTML;
import org.gwt.mosaic.ui.client.layout.BoxLayout;
import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
import org.gwt.mosaic.ui.client.layout.LayoutPanel;
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/ResumeDeploymentAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/ResumeDeploymentAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/ResumeDeploymentAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,12 +21,13 @@
*/
package org.jboss.bpm.console.client.engine;
-import org.jboss.bpm.console.client.common.AbstractRESTAction;
-import org.jboss.bpm.console.client.ApplicationContext;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.Response;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.URLBuilder;
+import org.jboss.bpm.console.client.common.AbstractRESTAction;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
@@ -48,7 +49,7 @@
public String getUrl(Object event)
{
String id = (String)event;
- return appContext.getUrlBuilder().getResumeDeploymentUrl(id);
+ return URLBuilder.getInstance().getResumeDeploymentUrl(id);
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/SuspendDeploymentAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/SuspendDeploymentAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/SuspendDeploymentAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,12 +21,13 @@
*/
package org.jboss.bpm.console.client.engine;
-import org.jboss.bpm.console.client.common.AbstractRESTAction;
-import org.jboss.bpm.console.client.ApplicationContext;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.Response;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.URLBuilder;
+import org.jboss.bpm.console.client.common.AbstractRESTAction;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
@@ -48,7 +49,7 @@
public String getUrl(Object event)
{
String id = (String)event;
- return appContext.getUrlBuilder().getSuspendDeploymentUrl(id);
+ return URLBuilder.getInstance().getSuspendDeploymentUrl(id);
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateDeploymentsAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateDeploymentsAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateDeploymentsAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,17 +21,18 @@
*/
package org.jboss.bpm.console.client.engine;
-import org.jboss.bpm.console.client.common.AbstractRESTAction;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.process.UpdateDefinitionsAction;
-import org.jboss.bpm.console.client.model.DTOParser;
-import org.jboss.bpm.console.client.model.DeploymentRef;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.Response;
+import com.google.gwt.json.client.JSONParser;
import com.google.gwt.json.client.JSONValue;
-import com.google.gwt.json.client.JSONParser;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.URLBuilder;
+import org.jboss.bpm.console.client.common.AbstractRESTAction;
+import org.jboss.bpm.console.client.model.DTOParser;
+import org.jboss.bpm.console.client.model.DeploymentRef;
+import org.jboss.bpm.console.client.process.UpdateDefinitionsAction;
import java.util.List;
@@ -58,7 +59,7 @@
public String getUrl(Object event)
{
- return appContext.getUrlBuilder().getDeploymentsUrl();
+ return URLBuilder.getInstance().getDeploymentsUrl();
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateJobsAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateJobsAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/engine/UpdateJobsAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -27,6 +27,7 @@
import com.google.gwt.json.client.JSONValue;
import com.mvc4g.client.Controller;
import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.URLBuilder;
import org.jboss.bpm.console.client.common.AbstractRESTAction;
import org.jboss.bpm.console.client.model.DTOParser;
import org.jboss.bpm.console.client.model.JobRef;
@@ -52,7 +53,7 @@
public String getUrl(Object event)
{
- return appContext.getUrlBuilder().getJobsUrl();
+ return URLBuilder.getInstance().getJobsUrl();
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/events/BootstrapEvent.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/events/BootstrapEvent.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/events/BootstrapEvent.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -22,8 +22,8 @@
package org.jboss.bpm.console.client.events;
import org.jboss.bpm.console.client.Authentication;
+import org.jboss.bpm.console.client.ConsoleConfig;
import org.jboss.bpm.console.client.URLBuilder;
-import org.jboss.bpm.console.client.ConsoleConfig;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
Copied: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java (from rev 705, bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java)
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java (rev 0)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -0,0 +1,387 @@
+/*
+ * 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 com.google.gwt.json.client.*;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.bpm.console.client.util.JSONWalk;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class DTOParser
+{
+ public static List<ProcessDefinitionRef> parseProcessDefinitions(JSONValue jso)
+ {
+ List<ProcessDefinitionRef> results = new ArrayList<ProcessDefinitionRef>();
+
+ JSONArray arr = JSONWalk.on(jso).next("definitions").asArray();
+ for(int i=0; i<arr.size(); i++)
+ {
+ results.add(parseProcessDefinition(arr.get(i)));
+ }
+ return results;
+ }
+
+ public static ProcessDefinitionRef parseProcessDefinition(JSONValue root)
+ {
+ ConsoleLog.debug("parse " + root);
+
+ String id = JSONWalk.on(root).next("id").asString();
+ Long version = JSONWalk.on(root).next("version").asLong();
+ String name = JSONWalk.on(root).next("name").asString();
+ boolean isSuspended = JSONWalk.on(root).next("suspended").asBool();
+
+ String dplId = JSONWalk.on(root).next("deploymentId").asString();
+ ProcessDefinitionRef ref = new ProcessDefinitionRef(id, name, version);
+ ref.setDeploymentId(dplId);
+ ref.setSuspended(isSuspended);
+
+ // optional start form url
+ JSONWalk.JSONWrapper formUrl = JSONWalk.on(root).next("formUrl");
+ if(formUrl !=null)
+ ref.setFormUrl(formUrl.asString());
+
+ // optional diagram url
+ JSONWalk.JSONWrapper diagramUrl = JSONWalk.on(root).next("diagramUrl");
+ if(diagramUrl !=null)
+ ref.setDiagramUrl(diagramUrl.asString());
+
+ return ref;
+ }
+
+ public static ProcessDefinitionRef parseProcessDefinition(String json)
+ {
+ JSONValue root = JSONParser.parse(json);
+ return parseProcessDefinition(root);
+ }
+
+ public static List<TaskRef> parseTaskReferenceList(String json)
+ {
+ List<TaskRef> results = new ArrayList<TaskRef>();
+
+ JSONValue root = JSONParser.parse(json);
+ JSONArray array = JSONWalk.on(root).next("tasks").asArray();
+
+ for (int i = 0; i < array.size(); ++i)
+ {
+ JSONObject item = array.get(i).isObject();
+ TaskRef ref = parseTaskReference(item);
+ results.add(ref);
+ }
+
+ return results;
+ }
+
+ public static TaskRef parseTaskReference(JSONObject item)
+ {
+ ConsoleLog.debug("parse " + item);
+
+ long id = JSONWalk.on(item).next("id").asLong();
+ String executionId = JSONWalk.on(item).next("processInstanceId").asString();
+ String processId = JSONWalk.on(item).next("processId").asString();
+ String name = JSONWalk.on(item).next("name").asString();
+ String assignee = JSONWalk.on(item).next("assignee").asString();
+ boolean isBlocking = JSONWalk.on(item).next("isBlocking").asBool();
+ boolean isSignalling = JSONWalk.on(item).next("isSignalling").asBool();
+
+ TaskRef ref = new TaskRef(
+ id, executionId,
+ processId,
+ name, assignee,
+ isSignalling, isBlocking
+ );
+
+ // task url reference maybe null
+ JSONWalk.JSONWrapper jsonWrapper = JSONWalk.on(item).next("url");
+ if(jsonWrapper!=null)
+ {
+ String url = jsonWrapper.asString();
+ ref.setUrl(url);
+ }
+ else
+ {
+ ref.setUrl("");
+ }
+
+ // participant users
+ JSONArray arrUsers = JSONWalk.on(item).next("participantUsers").asArray();
+ for (int k = 0; k < arrUsers.size(); ++k)
+ {
+ JSONValue jsonValue = arrUsers.get(k);
+ ParticipantRef p = parseParticipant(jsonValue, k);
+ ref.getParticipantUsers().add(p);
+ }
+
+ JSONArray arrGroups = JSONWalk.on(item).next("participantGroups").asArray();
+ for (int k = 0; k < arrGroups.size(); ++k)
+ {
+ JSONValue jsonValue = arrGroups.get(k);
+ ParticipantRef p = parseParticipant(jsonValue, k);
+ ref.getParticipantGroups().add(p);
+ }
+
+ if (isSignalling)
+ {
+ JSONArray arr = JSONWalk.on(item).next("outcomes").asArray();
+ for (int k = 0; k < arr.size(); ++k)
+ {
+ JSONValue jsonValue = arr.get(k);
+ if (jsonValue.toString().equals("null"))
+ {
+ ConsoleLog.warn("FIXME JBPM-1828: Null value on outcomes:" + arr.toString());
+ continue; // TODO: JBPM-1828
+ }
+ JSONString t = jsonValue.isString();
+ ref.getOutcomes().add(t.stringValue());
+ }
+
+ }
+
+ int prio = JSONWalk.on(item).next("priority").asInt();
+ ref.setPriority(prio);
+
+ JSONWalk.JSONWrapper dueDate = JSONWalk.on(item).next("dueDate");
+ if(dueDate!=null) // optional
+ {
+ Date due = dueDate.asDate();
+ ref.setDueDate(due);
+ }
+
+ JSONWalk.JSONWrapper createDate = JSONWalk.on(item).next("createDate");
+ if(createDate!=null) // optional
+ {
+ Date due = createDate.asDate();
+ ref.setDueDate(due);
+ }
+
+ return ref;
+ }
+
+ private static ParticipantRef parseParticipant(JSONValue jsonValue, int k)
+ {
+ String type = JSONWalk.on(jsonValue).next("type").asString();
+ String idRef = JSONWalk.on(jsonValue).next("idRef").asString();
+ ParticipantRef p = new ParticipantRef(type, idRef);
+
+ boolean isGroup = JSONWalk.on(jsonValue).next("isGroup").asBool();
+ p.setGroup(isGroup);
+
+ return p;
+ }
+
+ public static List<ProcessInstanceRef> parseProcessInstances(JSONValue jso)
+ {
+ List<ProcessInstanceRef> results = new ArrayList<ProcessInstanceRef>();
+
+ JSONArray arr = JSONWalk.on(jso).next("instances").asArray();
+ for(int i=0; i<arr.size(); i++)
+ {
+ results.add(parseProcessInstance(arr.get(i)));
+ }
+ return results;
+ }
+
+ public static ProcessInstanceRef parseProcessInstance(JSONValue root)
+ {
+ ConsoleLog.debug("parse " + root);
+
+ String id = JSONWalk.on(root).next("id").asString();
+ String definitionId = JSONWalk.on(root).next("definitionId").asString();
+ Date start = JSONWalk.on(root).next("startDate").asDate();
+
+ JSONWalk.JSONWrapper endDateJSON = JSONWalk.on(root).next("endDate");
+ Date end = null;
+ if (endDateJSON != null)
+ end = endDateJSON.asDate();
+
+ boolean suspended = JSONWalk.on(root).next("suspended").asBool();
+
+ ProcessInstanceRef processInstance = new ProcessInstanceRef(
+ id, definitionId,
+ start, end,
+ suspended
+ );
+
+ // tokens
+ JSONObject tokJso = JSONWalk.on(root).next("rootToken").asObject();
+ TokenReference rootToken = parseTokenReference(tokJso);
+ processInstance.setRootToken(rootToken);
+ return processInstance;
+ }
+
+ public static TokenReference parseTokenReference(JSONObject jso)
+ {
+ ConsoleLog.debug("parse " + jso);
+
+ String rootTokenId = JSONWalk.on(jso).next("id").asString();
+ //String name = JSONWalk.on(jso).next("name").asString();
+ String nodeName = JSONWalk.on(jso).next("currentNodeName").asString();
+
+ // TDOD: Fix token name
+ TokenReference rt = new TokenReference(rootTokenId, "", nodeName);
+
+ boolean canBeSignaled = JSONWalk.on(jso).next("canBeSignaled").asBool();
+ rt.setCanBeSignaled(canBeSignaled);
+
+ JSONArray signals = JSONWalk.on(jso).next("availableSignals").asArray();
+ for (int i = 0; i < signals.size(); i++)
+ {
+ JSONValue jsonValue = signals.get(i);
+ if (jsonValue.toString().equals("null"))
+ {
+ ConsoleLog.warn("FIXME JBPM-1828: Null value on availableSignals:" + signals.toString());
+ continue; // TODO: JBPM-1828
+ }
+ JSONString item = jsonValue.isString();
+ rt.getAvailableSignals().add(item.stringValue());
+ }
+
+ JSONArray childArr = JSONWalk.on(jso).next("children").asArray();
+ for (int i = 0; i < childArr.size(); i++)
+ {
+ JSONObject item = childArr.get(i).isObject();
+ rt.getChildren().add(parseTokenReference(item));
+ }
+
+ return rt;
+ }
+
+ public static List<String> parseStringArray(JSONValue jso)
+ {
+ List<String> result = new ArrayList<String>();
+
+ JSONArray jsonArray = jso.isArray();
+
+ if (null == jsonArray)
+ throw new IllegalArgumentException("Not an array: " + jso);
+
+ for (int i = 0; i < jsonArray.size(); i++)
+ {
+ JSONValue jsonValue = jsonArray.get(i);
+ if (jsonValue.toString().equals("null"))
+ {
+ ConsoleLog.warn("FIXME JBPM-1828: Null value on string array:" + jsonArray.toString());
+ continue; // TODO: JBPM-1828
+ }
+ JSONString item = jsonValue.isString();
+ result.add(item.stringValue());
+ }
+
+ return result;
+ }
+
+ public static ServerStatus parseStatus(JSONValue json)
+ {
+ ConsoleLog.debug("parse " + json);
+
+ 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;
+ }
+
+ public static List<DeploymentRef> parseDeploymentRefList(JSONValue json)
+ {
+ ConsoleLog.debug("parse " + json);
+
+ List<DeploymentRef> result = new ArrayList<DeploymentRef>();
+
+ JSONArray jsonArray = JSONWalk.on(json).next("deployments").asArray();
+ for (int i = 0; i < jsonArray.size(); i++)
+ {
+ JSONValue item = jsonArray.get(i);
+ String id = JSONWalk.on(item).next("id").asString();
+ boolean suspended = JSONWalk.on(item).next("suspended").asBool();
+
+ String name = JSONWalk.on(item).next("name").asString();
+ long ts = JSONWalk.on(item).next("timestamp").asLong();
+
+ DeploymentRef ref = new DeploymentRef(id, suspended);
+ ref.setName(name);
+ ref.setTimestamp(ts);
+
+ // defintions
+ JSONArray defArr = JSONWalk.on(item).next("definitions").asArray();
+ for (int c = 0; c < defArr.size(); c++)
+ {
+ String defId = defArr.get(c).isString().stringValue();
+ ref.getDefinitions().add(defId);
+ }
+
+ // resource names
+ JSONArray resArr = JSONWalk.on(item).next("resourceNames").asArray();
+ for (int c = 0; c < resArr.size(); c++)
+ {
+ String resourceName = resArr.get(c).isString().stringValue();
+ ref.getResourceNames().add(resourceName);
+ }
+
+ result.add(ref);
+ }
+
+ return result;
+ }
+
+ public static List<JobRef> parseJobRefList(JSONValue json)
+ {
+ ConsoleLog.debug("parse " + json);
+
+ List<JobRef> result = new ArrayList<JobRef>();
+
+ JSONArray jsonArray = JSONWalk.on(json).next("jobs").asArray();
+ for (int i = 0; i < jsonArray.size(); i++)
+ {
+ JSONValue item = jsonArray.get(i);
+ String id = JSONWalk.on(item).next("id").asString();
+ String type = JSONWalk.on(item).next("type").asString();
+
+ JobRef ref = new JobRef();
+ ref.setId(id);
+ ref.setType(type);
+
+ JSONWalk.JSONWrapper tsEl = JSONWalk.on(item).next("timestamp");
+ if(tsEl!=null)
+ ref.setTimestamp(tsEl.asLong());
+
+ JSONWalk.JSONWrapper err = JSONWalk.on(item).next("errMsg");
+ if(err!=null) // optional
+ ref.setErrMsg(err.asString());
+
+ result.add(ref);
+ }
+
+ return result;
+ }
+}
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/ActivityDiagramView.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/ActivityDiagramView.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/ActivityDiagramView.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,17 +21,16 @@
*/
package org.jboss.bpm.console.client.process;
-import java.util.List;
-
+import com.google.gwt.user.client.ui.HTML;
+import com.mvc4g.client.Controller;
+import com.mvc4g.client.ViewInterface;
import org.gwt.mosaic.ui.client.ScrollLayoutPanel;
import org.jboss.bpm.console.client.model.ActiveNodeInfo;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
import org.jboss.bpm.console.client.model.ProcessInstanceRef;
import org.jboss.bpm.console.client.process.events.ActivityDiagramResultEvent;
-import com.google.gwt.user.client.ui.HTML;
-import com.mvc4g.client.Controller;
-import com.mvc4g.client.ViewInterface;
+import java.util.List;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -36,7 +36,6 @@
import org.jboss.bpm.console.client.common.AbstractView;
import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
-import org.jboss.bpm.console.client.ServerPlugins;
import java.util.List;
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteDefinitionAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteDefinitionAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteDefinitionAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,12 +21,13 @@
*/
package org.jboss.bpm.console.client.process;
-import org.jboss.bpm.console.client.common.AbstractRESTAction;
-import org.jboss.bpm.console.client.ApplicationContext;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.Response;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.URLBuilder;
+import org.jboss.bpm.console.client.common.AbstractRESTAction;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
/**
@@ -49,7 +50,7 @@
public String getUrl(Object event)
{
ProcessDefinitionRef procRef = (ProcessDefinitionRef)event;
- return appContext.getUrlBuilder().getRemoveDefinitionURL(procRef.getId());
+ return URLBuilder.getInstance().getRemoveDefinitionURL(procRef.getId());
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteInstanceAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteInstanceAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteInstanceAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,14 +21,15 @@
*/
package org.jboss.bpm.console.client.process;
-import org.jboss.bpm.console.client.common.AbstractRESTAction;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.model.ProcessInstanceRef;
-import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.Response;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.URLBuilder;
+import org.jboss.bpm.console.client.common.AbstractRESTAction;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
@@ -51,7 +52,7 @@
public String getUrl(Object event)
{
ProcessInstanceRef instance = (ProcessInstanceRef)event;
- return appContext.getUrlBuilder().getInstanceDeleteURL(instance.getId());
+ return URLBuilder.getInstance().getInstanceDeleteURL(instance.getId());
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeploymentPanel.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeploymentPanel.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeploymentPanel.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,10 +21,8 @@
*/
package org.jboss.bpm.console.client.process;
-import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
-import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Widget;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
@@ -33,7 +31,6 @@
import org.gwt.mosaic.ui.client.layout.LayoutPanel;
import org.jboss.bpm.console.client.common.PropertyGrid;
import org.jboss.bpm.console.client.engine.ViewDeploymentAction;
-import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDataView.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDataView.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDataView.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,8 +21,10 @@
*/
package org.jboss.bpm.console.client.process;
-import com.google.gwt.user.client.Window;
-import com.google.gwt.xml.client.*;
+import com.google.gwt.xml.client.Document;
+import com.google.gwt.xml.client.NamedNodeMap;
+import com.google.gwt.xml.client.Node;
+import com.google.gwt.xml.client.NodeList;
import com.mvc4g.client.Controller;
import com.mvc4g.client.ViewInterface;
import org.gwt.mosaic.ui.client.ListBox;
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDetailView.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDetailView.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceDetailView.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,25 +21,25 @@
*/
package org.jboss.bpm.console.client.process;
-import com.mvc4g.client.Controller;
-import com.mvc4g.client.ViewInterface;
-import com.mvc4g.client.Event;
+import com.google.gwt.user.client.WindowCloseListener;
+import com.google.gwt.user.client.WindowResizeListener;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Widget;
-import com.google.gwt.user.client.WindowCloseListener;
-import com.google.gwt.user.client.WindowResizeListener;
+import com.mvc4g.client.Controller;
+import com.mvc4g.client.Event;
+import com.mvc4g.client.ViewInterface;
import org.gwt.mosaic.ui.client.*;
import org.gwt.mosaic.ui.client.layout.BoxLayout;
import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
import org.gwt.mosaic.ui.client.layout.LayoutPanel;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.ServerPlugins;
import org.jboss.bpm.console.client.common.PropertyGrid;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
import org.jboss.bpm.console.client.model.ProcessInstanceRef;
-import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
-import org.jboss.bpm.console.client.model.util.SimpleDateFormat;
+import org.jboss.bpm.console.client.util.SimpleDateFormat;
import org.jboss.bpm.console.client.util.WindowUtil;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.ServerPlugins;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -34,13 +34,13 @@
import org.gwt.mosaic.ui.client.layout.*;
import org.gwt.mosaic.ui.client.list.DefaultListModel;
import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.process.events.InstanceEvent;
import org.jboss.bpm.console.client.common.AbstractView;
import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
import org.jboss.bpm.console.client.model.ProcessInstanceRef;
-import org.jboss.bpm.console.client.model.util.SimpleDateFormat;
+import org.jboss.bpm.console.client.process.events.InstanceEvent;
import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.bpm.console.client.util.SimpleDateFormat;
import org.jboss.bpm.console.client.util.WindowUtil;
import java.util.Date;
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadActivityDiagramAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadActivityDiagramAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadActivityDiagramAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,10 +21,15 @@
*/
package org.jboss.bpm.console.client.process;
-import java.util.ArrayList;
-import java.util.List;
-
+import com.google.gwt.http.client.RequestBuilder;
+import com.google.gwt.http.client.Response;
+import com.google.gwt.json.client.JSONArray;
+import com.google.gwt.json.client.JSONObject;
+import com.google.gwt.json.client.JSONParser;
+import com.google.gwt.json.client.JSONValue;
+import com.mvc4g.client.Controller;
import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.URLBuilder;
import org.jboss.bpm.console.client.common.AbstractRESTAction;
import org.jboss.bpm.console.client.model.ActiveNodeInfo;
import org.jboss.bpm.console.client.model.DiagramNodeInfo;
@@ -34,13 +39,8 @@
import org.jboss.bpm.console.client.util.JSONWalk;
import org.jboss.bpm.console.client.util.JSONWalk.JSONWrapper;
-import com.google.gwt.http.client.RequestBuilder;
-import com.google.gwt.http.client.Response;
-import com.google.gwt.json.client.JSONArray;
-import com.google.gwt.json.client.JSONObject;
-import com.google.gwt.json.client.JSONParser;
-import com.google.gwt.json.client.JSONValue;
-import com.mvc4g.client.Controller;
+import java.util.ArrayList;
+import java.util.List;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
@@ -62,7 +62,7 @@
public String getUrl(Object event)
{
ProcessInstanceRef inst = (ProcessInstanceRef)event;
- return appContext.getUrlBuilder().getActiveNodeInfoURL(inst.getId());
+ return URLBuilder.getInstance().getActiveNodeInfoURL(inst.getId());
}
public RequestBuilder.Method getRequestMethod()
@@ -110,7 +110,7 @@
ActivityDiagramView view = (ActivityDiagramView) controller.getView(ActivityDiagramView.ID);
view.update(
new ActivityDiagramResultEvent(
- appContext.getUrlBuilder().getProcessImageURL(inst.getDefinitionId()),
+ URLBuilder.getInstance().getProcessImageURL(inst.getDefinitionId()),
activeNodeInfos
)
);
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDetailView.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDetailView.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDetailView.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -29,9 +29,9 @@
import org.gwt.mosaic.ui.client.CaptionLayoutPanel;
import org.gwt.mosaic.ui.client.DeckLayoutPanel;
import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
+import org.jboss.bpm.console.client.ServerPlugins;
import org.jboss.bpm.console.client.common.PropertyGrid;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
-import org.jboss.bpm.console.client.ServerPlugins;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,9 +21,9 @@
*/
package org.jboss.bpm.console.client.process;
+import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.SourcesTabEvents;
import com.google.gwt.user.client.ui.TabListener;
-import com.google.gwt.core.client.GWT;
import com.mvc4g.client.ActionInterface;
import com.mvc4g.client.Event;
import org.gwt.mosaic.ui.client.DecoratedTabLayoutPanel;
@@ -33,8 +33,8 @@
import org.gwt.mosaic.ui.client.layout.BorderLayoutData;
import org.jboss.bpm.console.client.ApplicationContext;
import org.jboss.bpm.console.client.Editor;
+import org.jboss.bpm.console.client.LazyPanel;
import org.jboss.bpm.console.client.MenuSection;
-import org.jboss.bpm.console.client.LazyPanel;
import org.jboss.bpm.console.client.common.AbstractView;
import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/StartNewInstanceAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/StartNewInstanceAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/StartNewInstanceAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -26,6 +26,7 @@
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.URLBuilder;
import org.jboss.bpm.console.client.common.AbstractRESTAction;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
@@ -52,7 +53,7 @@
public String getUrl(Object event)
{
final ProcessDefinitionRef def = (ProcessDefinitionRef)event;
- return appContext.getUrlBuilder().getStartNewInstanceURL(def.getId());
+ return URLBuilder.getInstance().getStartNewInstanceURL(def.getId());
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/StateChangeAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/StateChangeAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/StateChangeAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,13 +21,15 @@
*/
package org.jboss.bpm.console.client.process;
+import com.google.gwt.http.client.RequestBuilder;
+import com.google.gwt.http.client.Response;
+import com.mvc4g.client.Controller;
+import com.mvc4g.client.Event;
import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.URLBuilder;
import org.jboss.bpm.console.client.common.AbstractRESTAction;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
import org.jboss.bpm.console.client.model.ProcessInstanceRef;
-import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
-import com.mvc4g.client.Controller;
-import com.mvc4g.client.Event;
-import com.google.gwt.http.client.*;
/**
* Starts a new process instance.
@@ -53,9 +55,9 @@
{
final ProcessInstanceRef inst = (ProcessInstanceRef)event;
if(ProcessInstanceRef.STATE.ENDED == inst.getState())
- return appContext.getUrlBuilder().getInstanceEndURL(inst.getId(), inst.getEndResult());
+ return URLBuilder.getInstance().getInstanceEndURL(inst.getId(), inst.getEndResult());
else
- return appContext.getUrlBuilder().getStateChangeURL(inst.getId(), inst.getState());
+ return URLBuilder.getInstance().getStateChangeURL(inst.getId(), inst.getState());
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateDefinitionsAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateDefinitionsAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateDefinitionsAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -27,10 +27,11 @@
import com.google.gwt.json.client.JSONValue;
import com.mvc4g.client.Controller;
import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.bpm.console.client.URLBuilder;
import org.jboss.bpm.console.client.common.AbstractRESTAction;
import org.jboss.bpm.console.client.model.DTOParser;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import java.util.List;
@@ -56,7 +57,7 @@
public String getUrl(Object event)
{
- return appContext.getUrlBuilder().getProcessDefinitionsURL();
+ return URLBuilder.getInstance().getProcessDefinitionsURL();
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstanceDataAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstanceDataAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstanceDataAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,13 +21,14 @@
*/
package org.jboss.bpm.console.client.process;
-import org.jboss.bpm.console.client.common.AbstractRESTAction;
-import org.jboss.bpm.console.client.ApplicationContext;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.Response;
import com.google.gwt.xml.client.Document;
import com.google.gwt.xml.client.XMLParser;
import com.mvc4g.client.Controller;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.URLBuilder;
+import org.jboss.bpm.console.client.common.AbstractRESTAction;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
@@ -50,7 +51,7 @@
public String getUrl(Object event)
{
String id = (String)event;
- return appContext.getUrlBuilder().getInstanceDataURL(id);
+ return URLBuilder.getInstance().getInstanceDataURL(id);
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstanceDetailAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstanceDetailAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstanceDetailAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -23,7 +23,6 @@
import com.mvc4g.client.ActionInterface;
import com.mvc4g.client.Controller;
-import org.jboss.bpm.console.client.model.ProcessInstanceRef;
import org.jboss.bpm.console.client.process.events.InstanceEvent;
/**
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstancesAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstancesAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstancesAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -27,11 +27,12 @@
import com.google.gwt.json.client.JSONValue;
import com.mvc4g.client.Controller;
import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.bpm.console.client.URLBuilder;
import org.jboss.bpm.console.client.common.AbstractRESTAction;
import org.jboss.bpm.console.client.model.DTOParser;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
import org.jboss.bpm.console.client.model.ProcessInstanceRef;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import java.util.List;
@@ -59,7 +60,7 @@
public String getUrl(Object event)
{
final ProcessDefinitionRef def = (ProcessDefinitionRef)event;
- return appContext.getUrlBuilder().getProcessInstancesURL(def.getId());
+ return URLBuilder.getInstance().getProcessInstancesURL(def.getId());
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/events/ActivityDiagramResultEvent.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/events/ActivityDiagramResultEvent.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/process/events/ActivityDiagramResultEvent.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,10 +21,10 @@
*/
package org.jboss.bpm.console.client.process.events;
+import org.jboss.bpm.console.client.model.ActiveNodeInfo;
+
import java.util.List;
-import org.jboss.bpm.console.client.model.ActiveNodeInfo;
-
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
*/
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,19 +21,19 @@
*/
package org.jboss.bpm.console.client.report;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.ui.SourcesTabEvents;
+import com.google.gwt.user.client.ui.TabListener;
+import com.mvc4g.client.ActionInterface;
+import org.gwt.mosaic.ui.client.DecoratedTabLayoutPanel;
+import org.gwt.mosaic.ui.client.layout.BorderLayout;
+import org.gwt.mosaic.ui.client.layout.BorderLayoutData;
+import org.jboss.bpm.console.client.ApplicationContext;
import org.jboss.bpm.console.client.Editor;
+import org.jboss.bpm.console.client.LazyPanel;
import org.jboss.bpm.console.client.MenuSection;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.LazyPanel;
import org.jboss.bpm.console.client.common.AbstractView;
import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
-import org.gwt.mosaic.ui.client.DecoratedTabLayoutPanel;
-import org.gwt.mosaic.ui.client.layout.BorderLayoutData;
-import org.gwt.mosaic.ui.client.layout.BorderLayout;
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.ui.TabListener;
-import com.google.gwt.user.client.ui.SourcesTabEvents;
-import com.mvc4g.client.ActionInterface;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -26,18 +26,18 @@
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.Frame;
-import com.google.gwt.user.client.ui.MenuBar;
import com.google.gwt.user.client.ui.Widget;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
+import org.gwt.mosaic.ui.client.Label;
import org.gwt.mosaic.ui.client.PopupMenu;
import org.gwt.mosaic.ui.client.ToolBar;
import org.gwt.mosaic.ui.client.ToolButton;
-import org.gwt.mosaic.ui.client.Label;
import org.gwt.mosaic.ui.client.layout.BoxLayout;
import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
import org.gwt.mosaic.ui.client.layout.LayoutPanel;
import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.URLBuilder;
import org.jboss.bpm.console.client.common.AbstractView;
import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
import org.jboss.bpm.console.client.search.SearchDefinitionView;
@@ -95,7 +95,7 @@
{
public void handleResult(String procDefId)
{
- String reportUrl = appContext.getUrlBuilder().getProcessSummaryReportUrl(procDefId);
+ String reportUrl = URLBuilder.getInstance().getProcessSummaryReportUrl(procDefId);
// load report
controller.handleEvent(
@@ -153,7 +153,7 @@
controller.handleEvent(
new Event(RenderReportAction.ID,
new RenderDispatchEvent(
- ReportView.ID, appContext.getUrlBuilder().getOverallReportUrl()
+ ReportView.ID, URLBuilder.getInstance().getOverallReportUrl()
)
)
);
@@ -178,7 +178,7 @@
// Make a command that we will execute from all menu items.
Command cmd1 = new Command() {
public void execute() {
- setFrameUrl(appContext.getUrlBuilder().getOverallReportUrl());
+ setFrameUrl(URLBuilder.getInstance().getOverallReportUrl());
}
};
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/search/SearchDefinitionView.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/search/SearchDefinitionView.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/search/SearchDefinitionView.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -25,9 +25,9 @@
import com.mvc4g.client.Controller;
import com.mvc4g.client.ViewInterface;
import org.gwt.mosaic.ui.client.Label;
-import org.gwt.mosaic.ui.client.layout.LayoutPanel;
import org.gwt.mosaic.ui.client.layout.BoxLayout;
import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
+import org.gwt.mosaic.ui.client.layout.LayoutPanel;
import org.jboss.bpm.console.client.ApplicationContext;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/search/UpdateSearchDefinitionsAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/search/UpdateSearchDefinitionsAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/search/UpdateSearchDefinitionsAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -27,10 +27,11 @@
import com.google.gwt.json.client.JSONValue;
import com.mvc4g.client.Controller;
import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.bpm.console.client.URLBuilder;
import org.jboss.bpm.console.client.common.AbstractRESTAction;
import org.jboss.bpm.console.client.model.DTOParser;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import java.util.List;
@@ -56,7 +57,7 @@
public String getUrl(Object event)
{
- return appContext.getUrlBuilder().getProcessDefinitionsURL();
+ return URLBuilder.getInstance().getProcessDefinitionsURL();
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/AbstractTaskList.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/AbstractTaskList.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/AbstractTaskList.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,14 +21,11 @@
*/
package org.jboss.bpm.console.client.task;
-import org.gwt.mosaic.ui.client.layout.LayoutPanel;
-import org.gwt.mosaic.ui.client.list.DefaultListModel;
+import com.mvc4g.client.Controller;
import org.gwt.mosaic.ui.client.ListBox;
-import org.jboss.bpm.console.client.LazyPanel;
+import org.gwt.mosaic.ui.client.layout.LayoutPanel;
import org.jboss.bpm.console.client.common.AbstractView;
import org.jboss.bpm.console.client.model.TaskRef;
-import com.mvc4g.client.ViewInterface;
-import com.mvc4g.client.Controller;
import java.util.List;
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignTaskAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignTaskAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignTaskAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -26,6 +26,7 @@
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.URLBuilder;
import org.jboss.bpm.console.client.common.AbstractRESTAction;
import org.jboss.bpm.console.client.task.events.AssignEvent;
@@ -50,7 +51,7 @@
public String getUrl(Object event)
{
AssignEvent payload = (AssignEvent)event;
- return appContext.getUrlBuilder().getTaskAssignURL(payload.getTask().getId(), payload.getIdRef());
+ return URLBuilder.getInstance().getTaskAssignURL(payload.getTask().getId(), payload.getIdRef());
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,13 +21,13 @@
*/
package org.jboss.bpm.console.client.task;
+import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.WindowCloseListener;
import com.google.gwt.user.client.ui.ChangeListener;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Frame;
import com.google.gwt.user.client.ui.Widget;
-import com.google.gwt.core.client.GWT;
import com.mvc4g.client.Event;
import org.gwt.mosaic.ui.client.*;
import org.gwt.mosaic.ui.client.layout.*;
@@ -36,14 +36,14 @@
import org.jboss.bpm.console.client.ServerPlugins;
import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
import org.jboss.bpm.console.client.model.TaskRef;
-import org.jboss.bpm.console.client.model.util.SimpleDateFormat;
+import org.jboss.bpm.console.client.task.events.DetailViewEvent;
import org.jboss.bpm.console.client.task.events.TaskIdentityEvent;
-import org.jboss.bpm.console.client.task.events.DetailViewEvent;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.bpm.console.client.util.SimpleDateFormat;
import org.jboss.bpm.console.client.util.WindowUtil;
-import org.jboss.bpm.console.client.util.ConsoleLog;
+import java.util.Date;
import java.util.List;
-import java.util.Date;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/ClaimTaskAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/ClaimTaskAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/ClaimTaskAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,13 +21,14 @@
*/
package org.jboss.bpm.console.client.task;
-import org.jboss.bpm.console.client.common.AbstractRESTAction;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.task.events.TaskIdentityEvent;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.Response;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.URLBuilder;
+import org.jboss.bpm.console.client.common.AbstractRESTAction;
+import org.jboss.bpm.console.client.task.events.TaskIdentityEvent;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
@@ -50,7 +51,7 @@
{
TaskIdentityEvent claimEvent = (TaskIdentityEvent)event;
- return appContext.getUrlBuilder().getTaskAssignURL(
+ return URLBuilder.getInstance().getTaskAssignURL(
claimEvent.getTask().getId(), claimEvent.getIdentity()
);
}
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,16 +21,15 @@
*/
package org.jboss.bpm.console.client.task;
-import org.jboss.bpm.console.client.common.AbstractRESTAction;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.task.events.DetailViewEvent;
-import org.jboss.bpm.console.client.util.ConsoleLog;
-import org.jboss.bpm.console.client.model.DTOParser;
-import org.jboss.bpm.console.client.model.TaskRef;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.Response;
import com.mvc4g.client.Controller;
-import com.mvc4g.client.Event;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.URLBuilder;
+import org.jboss.bpm.console.client.common.AbstractRESTAction;
+import org.jboss.bpm.console.client.model.DTOParser;
+import org.jboss.bpm.console.client.model.TaskRef;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import java.util.List;
@@ -58,7 +57,7 @@
public String getUrl(Object event)
{
String identity = (String)event;
- return appContext.getUrlBuilder().getTaskListURL(identity);
+ return URLBuilder.getInstance().getTaskListURL(identity);
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksParticipationAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksParticipationAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/LoadTasksParticipationAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,16 +21,15 @@
*/
package org.jboss.bpm.console.client.task;
-import org.jboss.bpm.console.client.common.AbstractRESTAction;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.task.events.DetailViewEvent;
-import org.jboss.bpm.console.client.util.ConsoleLog;
-import org.jboss.bpm.console.client.model.DTOParser;
-import org.jboss.bpm.console.client.model.TaskRef;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.Response;
import com.mvc4g.client.Controller;
-import com.mvc4g.client.Event;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.URLBuilder;
+import org.jboss.bpm.console.client.common.AbstractRESTAction;
+import org.jboss.bpm.console.client.model.DTOParser;
+import org.jboss.bpm.console.client.model.TaskRef;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import java.util.List;
@@ -58,7 +57,7 @@
public String getUrl(Object event)
{
String identity = (String)event;
- return appContext.getUrlBuilder().getParticipationTaskListURL(identity);
+ return URLBuilder.getInstance().getParticipationTaskListURL(identity);
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -22,18 +22,22 @@
package org.jboss.bpm.console.client.task;
import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.ui.*;
+import com.google.gwt.user.client.ui.ChangeListener;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.Widget;
import com.mvc4g.client.Event;
-import org.gwt.mosaic.ui.client.*;
import org.gwt.mosaic.ui.client.ListBox;
+import org.gwt.mosaic.ui.client.MessageBox;
+import org.gwt.mosaic.ui.client.ToolBar;
+import org.gwt.mosaic.ui.client.ToolButton;
import org.gwt.mosaic.ui.client.layout.*;
import org.gwt.mosaic.ui.client.list.DefaultListModel;
+import org.jboss.bpm.console.client.ApplicationContext;
import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
import org.jboss.bpm.console.client.model.TaskRef;
-import org.jboss.bpm.console.client.model.util.SimpleDateFormat;
+import org.jboss.bpm.console.client.task.events.DetailViewEvent;
import org.jboss.bpm.console.client.task.events.TaskIdentityEvent;
-import org.jboss.bpm.console.client.task.events.DetailViewEvent;
-import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.util.SimpleDateFormat;
import java.util.List;
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/ParticipantPanel.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/ParticipantPanel.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/ParticipantPanel.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -23,9 +23,9 @@
import com.google.gwt.user.client.ui.*;
-import com.mvc4g.client.ViewInterface;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
+import com.mvc4g.client.ViewInterface;
import org.gwt.mosaic.ui.client.ScrollLayoutPanel;
import org.gwt.mosaic.ui.client.layout.BoxLayout;
import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/ReleaseTaskAction.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/ReleaseTaskAction.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/ReleaseTaskAction.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -26,6 +26,7 @@
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.URLBuilder;
import org.jboss.bpm.console.client.common.AbstractRESTAction;
import org.jboss.bpm.console.client.task.events.TaskIdentityEvent;
@@ -49,7 +50,7 @@
public String getUrl(Object event)
{
TaskIdentityEvent tie = (TaskIdentityEvent)event;
- return appContext.getUrlBuilder().getTaskReleaseURL(tie.getTask().getId());
+ return URLBuilder.getInstance().getTaskReleaseURL(tie.getTask().getId());
}
public RequestBuilder.Method getRequestMethod()
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailView.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailView.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailView.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -28,12 +28,11 @@
import org.gwt.mosaic.ui.client.Caption;
import org.gwt.mosaic.ui.client.CaptionLayoutPanel;
import org.gwt.mosaic.ui.client.DeckLayoutPanel;
-import org.gwt.mosaic.ui.client.layout.BoxLayout;
import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
import org.gwt.mosaic.ui.client.layout.LayoutPanel;
+import org.jboss.bpm.console.client.LazyPanel;
import org.jboss.bpm.console.client.common.PropertyGrid;
import org.jboss.bpm.console.client.model.TaskRef;
-import org.jboss.bpm.console.client.LazyPanel;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/rebind/WorkspaceGenerator.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/rebind/WorkspaceGenerator.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/jboss/bpm/console/rebind/WorkspaceGenerator.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -22,11 +22,11 @@
package org.jboss.bpm.console.rebind;
import com.google.gwt.core.ext.Generator;
+import com.google.gwt.core.ext.GeneratorContext;
import com.google.gwt.core.ext.TreeLogger;
-import com.google.gwt.core.ext.GeneratorContext;
import com.google.gwt.core.ext.UnableToCompleteException;
+import com.google.gwt.core.ext.typeinfo.JClassType;
import com.google.gwt.core.ext.typeinfo.TypeOracle;
-import com.google.gwt.core.ext.typeinfo.JClassType;
import com.google.gwt.user.rebind.ClassSourceFileComposerFactory;
import com.google.gwt.user.rebind.SourceWriter;
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/json/JSONObject.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/json/JSONObject.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/json/JSONObject.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -28,11 +28,7 @@
import java.io.Writer;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.TreeSet;
+import java.util.*;
/**
* A JSONObject is an unordered collection of name/value pairs. Its
Modified: bpm-console/trunk/bpm/gui/war/src/main/java/org/json/Test.java
===================================================================
--- bpm-console/trunk/bpm/gui/war/src/main/java/org/json/Test.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/gui/war/src/main/java/org/json/Test.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -1,9 +1,9 @@
package org.json;
+import java.io.StringWriter;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
-import java.io.StringWriter;
/**
* Test class. This file is not formally a member of the org.json library.
Added: bpm-console/trunk/bpm/rpc/bpm-rpc.iml
===================================================================
--- bpm-console/trunk/bpm/rpc/bpm-rpc.iml (rev 0)
+++ bpm-console/trunk/bpm/rpc/bpm-rpc.iml 2009-07-30 11:01:39 UTC (rev 707)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+ <component name="ModuleRootManager" />
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gson/gson/1.2.2/gson-1.2.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: com.google.gwt:gwt-user:jar:1.5.3:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/gwt/gwt-user/1.5.3/gwt-user-1.5.3.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.activation:activation:jar:1.1:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntryProperties />
+ </component>
+</module>
+
Deleted: bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/DateLocale.java
===================================================================
--- bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/DateLocale.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/DateLocale.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -1,86 +0,0 @@
-/*
- * Copyright 2006 Robert Hanson <iamroberthanson AT gmail.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.bpm.console.client.model.util;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Date locale support for the {@link SimpleDateParser}. You are encouraged to
- * extend this class and provide implementations for other locales.
- * @author <a href="mailto:g.georgovassilis at gmail.com">George Georgovassilis</a>
- *
- */
-public class DateLocale {
- public final static String TOKEN_DAY_OF_WEEK = "E";
-
- public final static String TOKEN_DAY_OF_MONTH = "d";
-
- public final static String TOKEN_MONTH = "M";
-
- public final static String TOKEN_YEAR = "y";
-
- public final static String TOKEN_HOUR_12 = "h";
-
- public final static String TOKEN_HOUR_24 = "H";
-
- public final static String TOKEN_MINUTE = "m";
-
- public final static String TOKEN_SECOND = "s";
-
- public final static String TOKEN_MILLISECOND = "S";
-
- public final static String TOKEN_AM_PM = "a";
-
- public final static String AM = "AM";
-
- public final static String PM = "PM";
-
- public final static List SUPPORTED_DF_TOKENS = Arrays.asList(new String[] {
- TOKEN_DAY_OF_WEEK, TOKEN_DAY_OF_MONTH, TOKEN_MONTH, TOKEN_YEAR,
- TOKEN_HOUR_12, TOKEN_HOUR_24, TOKEN_MINUTE, TOKEN_SECOND,
- TOKEN_AM_PM });
-
- public String[] MONTH_LONG = { "January", "February", "March", "April",
- "May", "June", "July", "August", "September", "October",
- "November", "December" };
-
- public String[] MONTH_SHORT = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sept", "Oct", "Nov", "Dec" };
-
- public String[] WEEKDAY_LONG = { "Sunday", "Monday", "Tuesday",
- "Wednesday", "Thursday", "Friday", "Saturday" };
-
- public String[] WEEKDAY_SHORT = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri",
- "Sat" };
-
- public static String getAM() {
- return AM;
- }
-
- public static String getPM() {
- return PM;
- }
-
- public String[] getWEEKDAY_LONG() {
- return WEEKDAY_LONG;
- }
-
- public String[] getWEEKDAY_SHORT() {
- return WEEKDAY_SHORT;
- }
-
-}
Deleted: bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/MapEntry.java
===================================================================
--- bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/MapEntry.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/MapEntry.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -1,47 +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.model.util;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class MapEntry
-{
- String name;
- Object value;
-
- public MapEntry(String name, Object value)
- {
- this.name = name;
- this.value = value;
- }
-
- public String getName()
- {
- return name;
- }
-
- public Object getValue()
- {
- return value;
- }
-}
Deleted: bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/SimpleDateFormat.java
===================================================================
--- bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/SimpleDateFormat.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/SimpleDateFormat.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -1,190 +0,0 @@
-/*
- * Copyright 2006 Robert Hanson <iamroberthanson AT gmail.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.bpm.console.client.model.util;
-
-import java.util.Date;
-
- at SuppressWarnings("deprecation")
-public class SimpleDateFormat {
- private String format;
- private DateLocale locale = new DateLocale();
- public static final String DEFAULT_FORMAT = "yyyy-MM-dd HH:mm:ss";
-
-
- /**
- * Gets the support locale for formatting and parsing dates
- * @return
- */
- public DateLocale getLocale() {
- return locale;
- }
-
- public void setLocale(DateLocale locale) {
- this.locale = locale;
- }
-
- /**
- * Use {@link #DEFAULT_FORMAT}
- */
- public SimpleDateFormat()
- {
- format = DEFAULT_FORMAT;
- }
-
- /**
- * Use a custom format
- */
- public SimpleDateFormat(String pattern) {
- format = pattern;
- }
-
- public String format(Date date) {
- String f = "";
- if (format != null && format.length() > 0) {
- String lastTokenType = null;
- String currentToken = "";
- for (int i = 0; i < format.length(); i++) {
- String thisChar = format.substring(i, i + 1);
- String currentTokenType = DateLocale.SUPPORTED_DF_TOKENS
- .contains(thisChar) ? thisChar : "";
- if (currentTokenType.equals(lastTokenType) || i == 0) {
- currentToken += thisChar;
- lastTokenType = currentTokenType;
- } else {
- if ("".equals(lastTokenType))
- f += currentToken;
- else
- f += handleToken(currentToken, date);
- currentToken = thisChar;
- lastTokenType = currentTokenType;
- }
- }
- if ("".equals(lastTokenType))
- f += currentToken;
- else
- f += handleToken(currentToken, date);
- }
- return f;
- }
-
- /**
- * takes a date format string and returns the formatted portion of the date.
- * For instance if the token is MMMM then the full month name is returned.
- *
- * @param token
- * date format token
- * @param date
- * date to format
- * @return formatted portion of the date
- */
- private String handleToken(String token, Date date) {
- String response = token;
- String tc = token.substring(0, 1);
- if (DateLocale.TOKEN_DAY_OF_WEEK.equals(tc)) {
- if (token.length() > 3)
- response = locale.getWEEKDAY_LONG()[date.getDay()];
- else
- response = locale.getWEEKDAY_SHORT()[date.getDay()];
- } else if (DateLocale.TOKEN_DAY_OF_MONTH.equals(tc)) {
- if (token.length() == 1)
- response = Integer.toString(date.getDate());
- else
- response = twoCharDateField(date.getDate());
- } else if (DateLocale.TOKEN_MONTH.equals(tc)) {
- switch (token.length()) {
- case 1:
- response = Integer.toString(date.getMonth() + 1);
- break;
- case 2:
- response = twoCharDateField(date.getMonth() + 1);
- break;
- case 3:
- response = locale.MONTH_SHORT[date.getMonth()];
- break;
- default:
- response = locale.MONTH_LONG[date.getMonth()];
- break;
- }
- } else if (DateLocale.TOKEN_YEAR.equals(tc)) {
- if (token.length() > 2)
- response = Integer.toString(date.getYear() + 1900);
- else
- response = twoCharDateField(date.getYear());
- } else if (DateLocale.TOKEN_HOUR_12.equals(tc)) {
- int h = date.getHours();
- if (h == 0)
- h = 12;
- else if (h > 12)
- h -= 12;
- if (token.length() > 1)
- response = twoCharDateField(h);
- else
- response = Integer.toString(h);
- } else if (DateLocale.TOKEN_HOUR_24.equals(tc)) {
- if (token.length() > 1)
- response = twoCharDateField(date.getHours());
- else
- response = Integer.toString(date.getHours());
- } else if (DateLocale.TOKEN_MINUTE.equals(tc)) {
- if (token.length() > 1)
- response = twoCharDateField(date.getMinutes());
- else
- response = Integer.toString(date.getMinutes());
- } else if (DateLocale.TOKEN_SECOND.equals(tc)) {
- if (token.length() > 1)
- response = twoCharDateField(date.getSeconds());
- else
- response = Integer.toString(date.getSeconds());
- } else if (DateLocale.TOKEN_AM_PM.equals(tc)) {
- int hour = date.getHours();
- if (hour > 11)
- response = DateLocale.getPM();
- else
- response = DateLocale.getAM();
- }
- return response;
- }
-
- /**
- * This is basically just a sneaky way to guarantee that our 1 or 2 digit
- * numbers come out as a 2 character string. we add an arbitrary number
- * larger than 100, convert this new number to a string, then take the right
- * most 2 characters.
- *
- * @param num
- * @return
- */
- private String twoCharDateField(int num) {
- String res = Integer.toString(num + 1900);
- res = res.substring(res.length() - 2);
- return res;
- }
-
- private static Date newDate(long time) {
- return new Date(time);
- }
-
- /**
- * Parses text and returns the corresponding date object.
- *
- * @param source
- * @return java.util.Date
- */
- public Date parse(String source){
- return SimpleDateParser.parse(source, format);
- };
-
-}
\ No newline at end of file
Deleted: bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/SimpleDateParser.java
===================================================================
--- bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/SimpleDateParser.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/SimpleDateParser.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -1,161 +0,0 @@
-/*
- * Copyright 2006 Robert Hanson <iamroberthanson AT gmail.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.bpm.console.client.model.util;
-
-import org.jboss.bpm.console.client.model.util.regex.Pattern;
-
-import java.util.Date;
-
-
-/**
- * This is a simple regular expression based parser for date notations.
- * While our aim is to fully support in the future the JDK date parser, currently
- * only numeric notations and literals are supported such as <code>dd/MM/yyyy HH:mm:ss.SSSS</code>.
- * Each entity is parsed with the same number of digits, i.e. for <code>dd</code> two digits will be
- * parsed while for <code>d</code> only one will be parsed.
- * @author <a href="mailto:g.georgovassilis at gmail.com">George Georgovassilis</a>
- *
- */
-
- at SuppressWarnings("deprecation")
-public class SimpleDateParser {
-
-
- private final static String DAY_IN_MONTH = "d";
-
- private final static String MONTH = "M";
-
- private final static String YEAR = "y";
-
- private final static String LITERAL = "\\";
-
- private final static int DATE_PATTERN = 0;
-
- private final static int REGEX_PATTERN = 1;
-
- private final static int COMPONENT = 2;
-
- private final static int REGEX = 0;
-
- private final static int INSTRUCTION = 1;
-
- private final static String[] TOKENS[] = {
- { "SSSS", "(\\d\\d\\d\\d)",DateLocale.TOKEN_MILLISECOND },
- { "SSS", "(\\d\\d\\d)", DateLocale.TOKEN_MILLISECOND },
- { "SS", "(\\d\\d)", DateLocale.TOKEN_MILLISECOND },
- { "S", "(\\d)", DateLocale.TOKEN_MILLISECOND },
- { "ss", "(\\d\\d)", DateLocale.TOKEN_SECOND },
- { "s", "(\\d)", DateLocale.TOKEN_SECOND },
- { "mm", "(\\d\\d)", DateLocale.TOKEN_MINUTE },
- { "m", "(\\d)", DateLocale.TOKEN_MINUTE},
- { "HH", "(\\d\\d)", DateLocale.TOKEN_HOUR_24},
- { "H", "(\\d)", DateLocale.TOKEN_HOUR_24 },
- { "dd", "(\\d\\d)", DateLocale.TOKEN_DAY_OF_MONTH },
- { "d", "(\\d)", DateLocale.TOKEN_DAY_OF_MONTH },
- { "MM", "(\\d\\d)", DateLocale.TOKEN_MONTH },
- { "M", "(\\d)", DateLocale.TOKEN_MONTH },
- { "yyyy", "(\\d\\d\\d\\d)", DateLocale.TOKEN_YEAR },
- { "yyy", "(\\d\\d\\d)", DateLocale.TOKEN_YEAR },
- { "yy", "(\\d\\d)", DateLocale.TOKEN_YEAR },
- { "y", "(\\d)", DateLocale.TOKEN_YEAR }
- };
-
- private Pattern regularExpression;
-
- private String instructions = "";
-
- private static void _parse(String format, String[] args) {
- if (format.length() == 0)
- return;
- if (format.startsWith("'")){
- format = format.substring(1);
- int end = format.indexOf("'");
- if (end == -1)
- throw new IllegalArgumentException("Unmatched single quotes.");
- args[REGEX]+=Pattern.quote(format.substring(0,end));
- format = format.substring(end+1);
- }
- for (int i = 0; i < TOKENS.length; i++) {
- String[] row = TOKENS[i];
- String datePattern = row[DATE_PATTERN];
- if (!format.startsWith(datePattern))
- continue;
- format = format.substring(datePattern.length());
- args[REGEX] += row[REGEX_PATTERN];
- args[INSTRUCTION] += row[COMPONENT];
- _parse(format, args);
- return;
- }
- args[REGEX] += Pattern.quote(""+format.charAt(0));
- format = format.substring(1);
- _parse(format, args);
- }
-
- private static void load(Date date, String text, String component) {
- if (component.equals(DateLocale.TOKEN_MILLISECOND)) {
- //TODO: implement
- }
-
- if (component.equals(DateLocale.TOKEN_SECOND)) {
- date.setSeconds(Integer.parseInt(text));
- }
-
- if (component.equals(DateLocale.TOKEN_MINUTE)) {
- date.setMinutes(Integer.parseInt(text));
- }
-
- if (component.equals(DateLocale.TOKEN_HOUR_24)) {
- date.setHours(Integer.parseInt(text));
- }
-
- if (component.equals(DateLocale.TOKEN_DAY_OF_MONTH)) {
- date.setDate(Integer.parseInt(text));
- }
- if (component.equals(DateLocale.TOKEN_MONTH)) {
- date.setMonth(Integer.parseInt(text)-1);
- }
- if (component.equals(DateLocale.TOKEN_YEAR)) {
- //TODO: fix for short patterns
- date.setYear(Integer.parseInt(text)-1900);
- }
-
- }
-
- public SimpleDateParser(String format) {
- String[] args = new String[] { "", "" };
- _parse(format, args);
- regularExpression = new Pattern(args[REGEX]);
- instructions = args[INSTRUCTION];
- }
-
- public Date parse(String input) {
- Date date = new Date(0, 0, 1, 0, 0, 0);
- String matches[] = regularExpression.match(input);
- if (matches == null)
- throw new IllegalArgumentException(input+" does not match "+regularExpression.pattern());
- if (matches.length-1!=instructions.length())
- throw new IllegalArgumentException("Different group count - "+input+" does not match "+regularExpression.pattern());
- for (int group = 0; group < instructions.length(); group++) {
- String match = matches[group + 1];
- load(date, match, ""+instructions.charAt(group));
- }
- return date;
- }
-
- public static Date parse(String input, String pattern){
- return new SimpleDateParser(pattern).parse(input);
- }
-}
Added: bpm-console/trunk/bpm/server/server-core/bpm-server-core.iml
===================================================================
--- bpm-console/trunk/bpm/server/server-core/bpm-server-core.iml (rev 0)
+++ bpm-console/trunk/bpm/server/server-core/bpm-server-core.iml 2009-07-30 11:01:39 UTC (rev 707)
@@ -0,0 +1,441 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+ <component name="ModuleRootManager" />
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <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$/src/test/java" isTestSource="true" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="bpm-rpc" />
+ <orderEntry type="module" module-name="bpm-server-integration" />
+ <orderEntry type="module" module-name="common" />
+ <orderEntry type="module-library">
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: junit:junit:jar:3.8.1:test">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: commons-logging:commons-logging:jar:1.1.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.eclipse.birt:modelapi:jar:2.3.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/eclipse/birt/modelapi/2.3.2/modelapi-2.3.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: commons-discovery:commons-discovery:jar:0.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/commons-discovery/commons-discovery/0.2/commons-discovery-0.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: com.google.gwt:gwt-user:jar:1.5.3:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/com/google/gwt/gwt-user/1.5.3/gwt-user-1.5.3.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: javax.xml:jaxb-impl:jar:2.1:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/xml/jaxb-impl/2.1/jaxb-impl-2.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.eclipse.birt:dataadapterapi:jar:2.3.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/eclipse/birt/dataadapterapi/2.3.2/dataadapterapi-2.3.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: commons-beanutils:commons-beanutils:jar:1.7.0:test">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.eclipse.birt:chartengineapi:jar:2.3.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/eclipse/birt/chartengineapi/2.3.2/chartengineapi-2.3.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.eclipse.emf:common:jar:2.4.0:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/eclipse/emf/common/2.4.0/common-2.4.0.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.eclipse.emf:ecore-xmi:jar:2.4.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/eclipse/emf/ecore-xmi/2.4.1/ecore-xmi-2.4.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: commons-cli:commons-cli:jar:1.0:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/commons-cli/commons-cli/1.0/commons-cli-1.0.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.eclipse.birt:scriptapi:jar:2.3.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/eclipse/birt/scriptapi/2.3.2/scriptapi-2.3.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: javax.activation:activation:jar:1.1:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.eclipse.birt:engineapi:jar:2.3.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/eclipse/birt/engineapi/2.3.2/engineapi-2.3.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.eclipse.birt:dteapi:jar:2.3.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/eclipse/birt/dteapi/2.3.2/dteapi-2.3.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: commons-codec:commons-codec:jar:1.3:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: commons-lang:commons-lang:jar:2.4:test">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.w3c:sac:jar:1.3:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/w3c/sac/1.3/sac-1.3.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: javax.ejb:ejb-api:jar:3.0:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: com.google.gwt:gwt-servlet:jar:1.5.3:runtime">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/com/google/gwt/gwt-servlet/1.5.3/gwt-servlet-1.5.3.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.eclipse.birt:coreapi:jar:2.3.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/eclipse/birt/coreapi/2.3.2/coreapi-2.3.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: rhino:js:jar:1.6R2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/rhino/js/1.6R2/js-1.6R2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: com.lowagie:itext:jar:1.3:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/com/lowagie/itext/1.3/itext-1.3.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.jboss.bpm:report-core:jar:1.0.0-SNAPSHOT:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jboss/bpm/report-core/1.0.0-SNAPSHOT/report-core-1.0.0-SNAPSHOT.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <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">
+ <library name="M2 Dep: org.eclipse.emf:ecore:jar:2.4.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/eclipse/emf/ecore/2.4.2/ecore-2.4.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/com/google/code/gson/gson/1.2.2/gson-1.2.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.w3c:flute:jar:1.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/w3c/flute/1.2/flute-1.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: com.ibm.icu:icu4j:jar:3.8.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/com/ibm/icu/icu4j/3.8.1/icu4j-3.8.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntryProperties />
+ </component>
+</module>
+
Added: bpm-console/trunk/bpm/server/server-integration/bpm-server-integration.iml
===================================================================
--- bpm-console/trunk/bpm/server/server-integration/bpm-server-integration.iml (rev 0)
+++ bpm-console/trunk/bpm/server/server-integration/bpm-server-integration.iml 2009-07-30 11:01:39 UTC (rev 707)
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+ <component name="ModuleRootManager" />
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="bpm-rpc" exported="" />
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: commons-logging:commons-logging:jar:1.1.1:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.ejb:ejb-api:jar:3.0:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/com/google/code/gson/gson/1.2.2/gson-1.2.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.activation:activation:jar:1.1:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: org.jboss.javaee:jboss-javaee:jar:5.0.0.GA:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jboss/javaee/jboss-javaee/5.0.0.GA/jboss-javaee-5.0.0.GA.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jboss/javaee/jboss-javaee/5.0.0.GA/jboss-javaee-5.0.0.GA-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntryProperties />
+ </component>
+</module>
+
Added: bpm-console/trunk/workspace/common/common.iml
===================================================================
--- bpm-console/trunk/workspace/common/common.iml (rev 0)
+++ bpm-console/trunk/workspace/common/common.iml 2009-07-30 11:01:39 UTC (rev 707)
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+ <component name="ModuleRootManager" />
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gson/gson/1.2.2/gson-1.2.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <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!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntryProperties />
+ </component>
+</module>
+
Modified: bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java
===================================================================
--- bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -33,8 +33,6 @@
{
Workspace getWorkpace();
- URLBuilder getUrlBuilder();
-
void displayMessage(String message, boolean isError);
Authentication getAuthentication();
Modified: bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/Authentication.java
===================================================================
--- bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/Authentication.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/Authentication.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -21,13 +21,17 @@
*/
package org.jboss.bpm.console.client;
+import com.google.gwt.core.client.GWT;
import com.google.gwt.http.client.*;
-import com.google.gwt.core.client.GWT;
+import com.google.gwt.json.client.JSONArray;
+import com.google.gwt.json.client.JSONObject;
+import com.google.gwt.json.client.JSONParser;
+import com.google.gwt.json.client.JSONValue;
import org.jboss.bpm.console.client.util.ConsoleLog;
-import org.jboss.bpm.console.client.model.DTOParser;
+import org.jboss.bpm.console.client.util.JSONWalk;
+import java.util.ArrayList;
import java.util.List;
-import java.util.ArrayList;
/**
* Does HTTP Basic Auth and keeps assigned roles
@@ -99,7 +103,7 @@
// parse roles
if (200 == response.getStatusCode())
{
- rolesAssigned = DTOParser.parseRolesAssigned(response.getText());
+ rolesAssigned = Authentication.parseRolesAssigned(response.getText());
if (callback != null) callback.onLoginSuccess(request, response);
}
else
@@ -155,4 +159,29 @@
{
return username;
}
+
+ public static List<String> parseRolesAssigned(String json)
+ {
+ // parse roles
+ List<String> roles = new ArrayList<String>();
+
+ // {"roles":[{"isAssigned":true,"role":"admin"},{"isAssigned":true,"role":"user"}]}
+
+ JSONValue root = JSONParser.parse(json);
+ JSONArray array = JSONWalk.on(root).next("roles").asArray();
+
+ for (int i = 0; i < array.size(); ++i)
+ {
+ JSONObject item = array.get(i).isObject();
+ boolean assigned = JSONWalk.on(item).next("assigned").asBool();
+ String roleName = JSONWalk.on(item).next("role").asString();
+
+ if (assigned)
+ {
+ roles.add(roleName);
+ }
+ }
+
+ return roles;
+ }
}
Modified: bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java
===================================================================
--- bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -22,6 +22,7 @@
package org.jboss.bpm.console.client;
import com.google.gwt.i18n.client.Dictionary;
+import com.google.gwt.core.client.GWT;
/**
* Initialize console config from host page (<code>Application.html</code>) variable:
@@ -49,7 +50,7 @@
private String consoleServerUrl;
- public ConsoleConfig()
+ public ConsoleConfig(String proxyUrl)
{
Dictionary theme = Dictionary.getDictionary("consoleConfig");
profileName = theme.get("profileName");
@@ -60,6 +61,18 @@
overallReportFile = theme.get("overallReportFile");
processSummaryReportFile = theme.get("processSummaryReportFile");
instanceSummaryReportFile = theme.get("instanceSummaryReportFile");
+
+ if(null==proxyUrl)
+ {
+ // extract host
+ String base = GWT.getHostPageBaseURL();
+ String protocol = base.substring(0, base.indexOf("//")+2);
+ String noProtocol = base.substring(base.indexOf(protocol)+protocol.length(), base.length());
+ String host = noProtocol.substring(0, noProtocol.indexOf("/"));
+
+ // default url
+ consoleServerUrl = protocol + host + serverWebContext;
+ }
}
public String getProfileName()
@@ -75,7 +88,7 @@
public String getConsoleServerUrl()
{
if(consoleServerUrl ==null)
- throw new RuntimeException("Config not properly setup: console server URL is null");
+ throw new RuntimeException("Config not properly setup: console server URL is null");
return consoleServerUrl;
}
@@ -92,7 +105,7 @@
public void setServerWebContext(String serverWebContext)
{
this.serverWebContext = serverWebContext;
- }
+ }
public String getOverallReportFile()
{
Deleted: bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
===================================================================
--- bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -1,222 +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;
-
-import com.google.gwt.http.client.URL;
-import com.google.gwt.core.client.GWT;
-import org.jboss.bpm.console.client.model.ProcessInstanceRef;
-import org.jboss.bpm.console.client.model.TokenReference;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class URLBuilder
-{
- ConsoleConfig config;
-
- public URLBuilder(ConsoleConfig config)
- {
- this.config = config;
- }
-
-
- public String getProcessDefinitionsURL()
- {
- return config.getConsoleServerUrl() + "/rs/process/definitions";
- }
-
- public String getProcessInstancesURL(String processId)
- {
- String encodedId = URL.encode(processId);
- return config.getConsoleServerUrl() + "/rs/process/definition/" + encodedId + "/instances";
- }
-
- public String getUserInRoleURL(String[] possibleRoles)
- {
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < possibleRoles.length; i++)
- {
- sb.append(URL.encode(possibleRoles[i]));
- if (i < possibleRoles.length - 1)
- sb.append(",");
- }
- return config.getConsoleServerUrl() + "/rs/identity/user/roles?roleCheck=" + sb.toString();
- }
-
- public String getServerStatusURL()
- {
- return config.getConsoleServerUrl() + "/rs/server/status";
- }
-
- @Deprecated
- public String getRemoveDefinitionURL(String processId)
- {
- String encodedId = URL.encode(processId);
- return config.getConsoleServerUrl() + "/rs/process/definition/" + encodedId+ "/remove";
- }
-
- public String getProcessImageURL(String processId)
- {
- String encodedId = URL.encode(processId);
- return config.getConsoleServerUrl() + "/rs/process/definition/"+ encodedId+ "/image";
- }
-
- public String getActiveNodeInfoURL(String instanceId)
- {
- return config.getConsoleServerUrl() + "/rs/process/instance/" + instanceId + "/activeNodeInfo";
- }
-
- public String getStateChangeURL(String instanceId, ProcessInstanceRef.STATE state)
- {
- return config.getConsoleServerUrl() + "/rs/process/instance/" + instanceId + "/state/" + state;
- }
-
- public String getInstanceEndURL(String instanceId, ProcessInstanceRef.RESULT result)
- {
- return config.getConsoleServerUrl() + "/rs/process/instance/" + instanceId + "/end/" + result;
- }
-
- public String getInstanceDeleteURL(String instanceId)
- {
- return config.getConsoleServerUrl() + "/rs/process/instance/" + instanceId + "/delete";
- }
-
- public String getInstanceDataURL(String instanceId)
- {
- return config.getConsoleServerUrl() + "/rs/process/instance/" + instanceId + "/dataset";
- }
-
- public String getStartNewInstanceURL(String processId)
- {
- String encodedID = URL.encode(processId);
- return config.getConsoleServerUrl() + "/rs/process/definition/" + encodedID + "/new_instance";
- }
-
- public String getTaskListURL(String idRef)
- {
- return config.getConsoleServerUrl() + "/rs/tasks/" + URL.encode(idRef);
- }
-
- public String getParticipationTaskListURL(String idRef)
- {
- return config.getConsoleServerUrl() + "/rs/tasks/" + URL.encode(idRef) +"/participation";
- }
-
- public String getTaskReleaseURL(long id)
- {
- return config.getConsoleServerUrl() + "/rs/task/" + id + "/release";
- }
-
- public String getTaskCompleteURL(long id)
- {
- return config.getConsoleServerUrl() + "/rs/task/" + id + "/close";
- }
-
- public String getTaskCompleteURL(long id, String outcome)
- {
- return config.getConsoleServerUrl() + "/rs/task/" + id + "/close/" + URL.encode(outcome);
- }
-
- public String getTaskAssignURL(long id, String idRef)
- {
- return config.getConsoleServerUrl() + "/rs/task/" + id + "/assign/" + URL.encode(idRef);
- }
-
- public String getExecutionSignalUrl(TokenReference tok)
- {
- return config.getConsoleServerUrl() + "/rs/process/tokens/" + tok.getId() + "/transition/default";
- }
-
- public String getExecutionSignalUrl(TokenReference tok, String signal)
- {
- String encodedSignal = URL.encode(signal);
- return config.getConsoleServerUrl() + "/rs/process/tokens/" + tok.getId() + "/transition?signal=" + encodedSignal;
- }
-
- public String getAvailableActorsUrl(String actorId)
- {
- return config.getConsoleServerUrl() + "/rs/identity/user/" + actorId + "/actors";
- }
-
- public String getDeployTestHarnessUrl()
- {
- return config.getConsoleServerUrl() + "/rs/test/deploy/harness";
- }
-
- public String getUndeployTestHarnessUrl()
- {
- return config.getConsoleServerUrl() + "/rs/test/undeploy/harness";
- }
-
- public String getOverallReportUrl()
- {
- String name = URL.encode(config.getOverallReportFile());
- String url = config.getConsoleServerUrl() + "/rs/report/view/" + name;
- if (!GWT.isScript())
- url += "?id=birt";
- return url;
- }
-
- public String getProcessSummaryReportUrl(String defintionId)
- {
- String encId = URL.encode(defintionId);
- String reportFileName = URL.encode(config.getProcessSummaryReportFile());
- String url = config.getConsoleServerUrl() + "/rs/report/view/" + reportFileName + "?procId=" + encId;
- if (!GWT.isScript())
- url += "&id=birt";
- return url;
- }
-
- public String getDeploymentsUrl()
- {
- return config.getConsoleServerUrl() + "/rs/engine/deployments";
- }
-
- public String getSuspendDeploymentUrl(String id)
- {
- String encodedId = URL.encode(id);
- return config.getConsoleServerUrl() + "/rs/engine/deployment/"+encodedId+"/suspend";
- }
-
- public String getResumeDeploymentUrl(String id)
- {
- String encodedId = URL.encode(id);
- return config.getConsoleServerUrl() + "/rs/engine/deployment/"+encodedId+"/resume";
- }
-
- public String getDeleteDeploymentUrl(String id)
- {
- String encodedId = URL.encode(id);
- return config.getConsoleServerUrl() + "/rs/engine/deployment/"+encodedId+"/delete";
- }
-
- public String getJobsUrl()
- {
- return config.getConsoleServerUrl() + "/rs/engine/jobs";
- }
-
- public String getExecuteJobURL(String id)
- {
- String encodedId = URL.encode(id);
- return config.getConsoleServerUrl() + "/rs/engine/job/"+encodedId+"/execute";
- }
-}
Deleted: bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java
===================================================================
--- bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -1,412 +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.model;
-
-import com.google.gwt.json.client.*;
-import org.jboss.bpm.console.client.util.ConsoleLog;
-import org.jboss.bpm.console.client.util.JSONWalk;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class DTOParser
-{
- public static List<ProcessDefinitionRef> parseProcessDefinitions(JSONValue jso)
- {
- List<ProcessDefinitionRef> results = new ArrayList<ProcessDefinitionRef>();
-
- JSONArray arr = JSONWalk.on(jso).next("definitions").asArray();
- for(int i=0; i<arr.size(); i++)
- {
- results.add(parseProcessDefinition(arr.get(i)));
- }
- return results;
- }
-
- public static ProcessDefinitionRef parseProcessDefinition(JSONValue root)
- {
- ConsoleLog.debug("parse " + root);
-
- String id = JSONWalk.on(root).next("id").asString();
- Long version = JSONWalk.on(root).next("version").asLong();
- String name = JSONWalk.on(root).next("name").asString();
- boolean isSuspended = JSONWalk.on(root).next("suspended").asBool();
-
- String dplId = JSONWalk.on(root).next("deploymentId").asString();
- ProcessDefinitionRef ref = new ProcessDefinitionRef(id, name, version);
- ref.setDeploymentId(dplId);
- ref.setSuspended(isSuspended);
-
- // optional start form url
- JSONWalk.JSONWrapper formUrl = JSONWalk.on(root).next("formUrl");
- if(formUrl !=null)
- ref.setFormUrl(formUrl.asString());
-
- // optional diagram url
- JSONWalk.JSONWrapper diagramUrl = JSONWalk.on(root).next("diagramUrl");
- if(diagramUrl !=null)
- ref.setDiagramUrl(diagramUrl.asString());
-
- return ref;
- }
-
- public static ProcessDefinitionRef parseProcessDefinition(String json)
- {
- JSONValue root = JSONParser.parse(json);
- return parseProcessDefinition(root);
- }
-
- public static List<String> parseRolesAssigned(String json)
- {
- // parse roles
- List<String> roles = new ArrayList<String>();
-
- // {"roles":[{"isAssigned":true,"role":"admin"},{"isAssigned":true,"role":"user"}]}
-
- JSONValue root = JSONParser.parse(json);
- JSONArray array = JSONWalk.on(root).next("roles").asArray();
-
- for (int i = 0; i < array.size(); ++i)
- {
- JSONObject item = array.get(i).isObject();
- boolean assigned = JSONWalk.on(item).next("assigned").asBool();
- String roleName = JSONWalk.on(item).next("role").asString();
-
- if (assigned)
- {
- roles.add(roleName);
- }
- }
-
- return roles;
- }
-
- public static List<TaskRef> parseTaskReferenceList(String json)
- {
- List<TaskRef> results = new ArrayList<TaskRef>();
-
- JSONValue root = JSONParser.parse(json);
- JSONArray array = JSONWalk.on(root).next("tasks").asArray();
-
- for (int i = 0; i < array.size(); ++i)
- {
- JSONObject item = array.get(i).isObject();
- TaskRef ref = parseTaskReference(item);
- results.add(ref);
- }
-
- return results;
- }
-
- public static TaskRef parseTaskReference(JSONObject item)
- {
- ConsoleLog.debug("parse " + item);
-
- long id = JSONWalk.on(item).next("id").asLong();
- String executionId = JSONWalk.on(item).next("processInstanceId").asString();
- String processId = JSONWalk.on(item).next("processId").asString();
- String name = JSONWalk.on(item).next("name").asString();
- String assignee = JSONWalk.on(item).next("assignee").asString();
- boolean isBlocking = JSONWalk.on(item).next("isBlocking").asBool();
- boolean isSignalling = JSONWalk.on(item).next("isSignalling").asBool();
-
- TaskRef ref = new TaskRef(
- id, executionId,
- processId,
- name, assignee,
- isSignalling, isBlocking
- );
-
- // task url reference maybe null
- JSONWalk.JSONWrapper jsonWrapper = JSONWalk.on(item).next("url");
- if(jsonWrapper!=null)
- {
- String url = jsonWrapper.asString();
- ref.setUrl(url);
- }
- else
- {
- ref.setUrl("");
- }
-
- // participant users
- JSONArray arrUsers = JSONWalk.on(item).next("participantUsers").asArray();
- for (int k = 0; k < arrUsers.size(); ++k)
- {
- JSONValue jsonValue = arrUsers.get(k);
- ParticipantRef p = parseParticipant(jsonValue, k);
- ref.getParticipantUsers().add(p);
- }
-
- JSONArray arrGroups = JSONWalk.on(item).next("participantGroups").asArray();
- for (int k = 0; k < arrGroups.size(); ++k)
- {
- JSONValue jsonValue = arrGroups.get(k);
- ParticipantRef p = parseParticipant(jsonValue, k);
- ref.getParticipantGroups().add(p);
- }
-
- if (isSignalling)
- {
- JSONArray arr = JSONWalk.on(item).next("outcomes").asArray();
- for (int k = 0; k < arr.size(); ++k)
- {
- JSONValue jsonValue = arr.get(k);
- if (jsonValue.toString().equals("null"))
- {
- ConsoleLog.warn("FIXME JBPM-1828: Null value on outcomes:" + arr.toString());
- continue; // TODO: JBPM-1828
- }
- JSONString t = jsonValue.isString();
- ref.getOutcomes().add(t.stringValue());
- }
-
- }
-
- int prio = JSONWalk.on(item).next("priority").asInt();
- ref.setPriority(prio);
-
- JSONWalk.JSONWrapper dueDate = JSONWalk.on(item).next("dueDate");
- if(dueDate!=null) // optional
- {
- Date due = dueDate.asDate();
- ref.setDueDate(due);
- }
-
- JSONWalk.JSONWrapper createDate = JSONWalk.on(item).next("createDate");
- if(createDate!=null) // optional
- {
- Date due = createDate.asDate();
- ref.setDueDate(due);
- }
-
- return ref;
- }
-
- private static ParticipantRef parseParticipant(JSONValue jsonValue, int k)
- {
- String type = JSONWalk.on(jsonValue).next("type").asString();
- String idRef = JSONWalk.on(jsonValue).next("idRef").asString();
- ParticipantRef p = new ParticipantRef(type, idRef);
-
- boolean isGroup = JSONWalk.on(jsonValue).next("isGroup").asBool();
- p.setGroup(isGroup);
-
- return p;
- }
-
- public static List<ProcessInstanceRef> parseProcessInstances(JSONValue jso)
- {
- List<ProcessInstanceRef> results = new ArrayList<ProcessInstanceRef>();
-
- JSONArray arr = JSONWalk.on(jso).next("instances").asArray();
- for(int i=0; i<arr.size(); i++)
- {
- results.add(parseProcessInstance(arr.get(i)));
- }
- return results;
- }
-
- public static ProcessInstanceRef parseProcessInstance(JSONValue root)
- {
- ConsoleLog.debug("parse " + root);
-
- String id = JSONWalk.on(root).next("id").asString();
- String definitionId = JSONWalk.on(root).next("definitionId").asString();
- Date start = JSONWalk.on(root).next("startDate").asDate();
-
- JSONWalk.JSONWrapper endDateJSON = JSONWalk.on(root).next("endDate");
- Date end = null;
- if (endDateJSON != null)
- end = endDateJSON.asDate();
-
- boolean suspended = JSONWalk.on(root).next("suspended").asBool();
-
- ProcessInstanceRef processInstance = new ProcessInstanceRef(
- id, definitionId,
- start, end,
- suspended
- );
-
- // tokens
- JSONObject tokJso = JSONWalk.on(root).next("rootToken").asObject();
- TokenReference rootToken = parseTokenReference(tokJso);
- processInstance.setRootToken(rootToken);
- return processInstance;
- }
-
- public static TokenReference parseTokenReference(JSONObject jso)
- {
- ConsoleLog.debug("parse " + jso);
-
- String rootTokenId = JSONWalk.on(jso).next("id").asString();
- //String name = JSONWalk.on(jso).next("name").asString();
- String nodeName = JSONWalk.on(jso).next("currentNodeName").asString();
-
- // TDOD: Fix token name
- TokenReference rt = new TokenReference(rootTokenId, "", nodeName);
-
- boolean canBeSignaled = JSONWalk.on(jso).next("canBeSignaled").asBool();
- rt.setCanBeSignaled(canBeSignaled);
-
- JSONArray signals = JSONWalk.on(jso).next("availableSignals").asArray();
- for (int i = 0; i < signals.size(); i++)
- {
- JSONValue jsonValue = signals.get(i);
- if (jsonValue.toString().equals("null"))
- {
- ConsoleLog.warn("FIXME JBPM-1828: Null value on availableSignals:" + signals.toString());
- continue; // TODO: JBPM-1828
- }
- JSONString item = jsonValue.isString();
- rt.getAvailableSignals().add(item.stringValue());
- }
-
- JSONArray childArr = JSONWalk.on(jso).next("children").asArray();
- for (int i = 0; i < childArr.size(); i++)
- {
- JSONObject item = childArr.get(i).isObject();
- rt.getChildren().add(parseTokenReference(item));
- }
-
- return rt;
- }
-
- public static List<String> parseStringArray(JSONValue jso)
- {
- List<String> result = new ArrayList<String>();
-
- JSONArray jsonArray = jso.isArray();
-
- if (null == jsonArray)
- throw new IllegalArgumentException("Not an array: " + jso);
-
- for (int i = 0; i < jsonArray.size(); i++)
- {
- JSONValue jsonValue = jsonArray.get(i);
- if (jsonValue.toString().equals("null"))
- {
- ConsoleLog.warn("FIXME JBPM-1828: Null value on string array:" + jsonArray.toString());
- continue; // TODO: JBPM-1828
- }
- JSONString item = jsonValue.isString();
- result.add(item.stringValue());
- }
-
- return result;
- }
-
- public static ServerStatus parseStatus(JSONValue json)
- {
- ConsoleLog.debug("parse " + json);
-
- 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;
- }
-
- public static List<DeploymentRef> parseDeploymentRefList(JSONValue json)
- {
- ConsoleLog.debug("parse " + json);
-
- List<DeploymentRef> result = new ArrayList<DeploymentRef>();
-
- JSONArray jsonArray = JSONWalk.on(json).next("deployments").asArray();
- for (int i = 0; i < jsonArray.size(); i++)
- {
- JSONValue item = jsonArray.get(i);
- String id = JSONWalk.on(item).next("id").asString();
- boolean suspended = JSONWalk.on(item).next("suspended").asBool();
-
- String name = JSONWalk.on(item).next("name").asString();
- long ts = JSONWalk.on(item).next("timestamp").asLong();
-
- DeploymentRef ref = new DeploymentRef(id, suspended);
- ref.setName(name);
- ref.setTimestamp(ts);
-
- // defintions
- JSONArray defArr = JSONWalk.on(item).next("definitions").asArray();
- for (int c = 0; c < defArr.size(); c++)
- {
- String defId = defArr.get(c).isString().stringValue();
- ref.getDefinitions().add(defId);
- }
-
- // resource names
- JSONArray resArr = JSONWalk.on(item).next("resourceNames").asArray();
- for (int c = 0; c < resArr.size(); c++)
- {
- String resourceName = resArr.get(c).isString().stringValue();
- ref.getResourceNames().add(resourceName);
- }
-
- result.add(ref);
- }
-
- return result;
- }
-
- public static List<JobRef> parseJobRefList(JSONValue json)
- {
- ConsoleLog.debug("parse " + json);
-
- List<JobRef> result = new ArrayList<JobRef>();
-
- JSONArray jsonArray = JSONWalk.on(json).next("jobs").asArray();
- for (int i = 0; i < jsonArray.size(); i++)
- {
- JSONValue item = jsonArray.get(i);
- String id = JSONWalk.on(item).next("id").asString();
- String type = JSONWalk.on(item).next("type").asString();
-
- JobRef ref = new JobRef();
- ref.setId(id);
- ref.setType(type);
-
- JSONWalk.JSONWrapper tsEl = JSONWalk.on(item).next("timestamp");
- if(tsEl!=null)
- ref.setTimestamp(tsEl.asLong());
-
- JSONWalk.JSONWrapper err = JSONWalk.on(item).next("errMsg");
- if(err!=null) // optional
- ref.setErrMsg(err.asString());
-
- result.add(ref);
- }
-
- return result;
- }
-}
Copied: bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/DateLocale.java (from rev 705, bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/DateLocale.java)
===================================================================
--- bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/DateLocale.java (rev 0)
+++ bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/DateLocale.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2006 Robert Hanson <iamroberthanson AT gmail.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.bpm.console.client.util;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Date locale support for the {@link SimpleDateParser}. You are encouraged to
+ * extend this class and provide implementations for other locales.
+ * @author <a href="mailto:g.georgovassilis at gmail.com">George Georgovassilis</a>
+ *
+ */
+public class DateLocale {
+ public final static String TOKEN_DAY_OF_WEEK = "E";
+
+ public final static String TOKEN_DAY_OF_MONTH = "d";
+
+ public final static String TOKEN_MONTH = "M";
+
+ public final static String TOKEN_YEAR = "y";
+
+ public final static String TOKEN_HOUR_12 = "h";
+
+ public final static String TOKEN_HOUR_24 = "H";
+
+ public final static String TOKEN_MINUTE = "m";
+
+ public final static String TOKEN_SECOND = "s";
+
+ public final static String TOKEN_MILLISECOND = "S";
+
+ public final static String TOKEN_AM_PM = "a";
+
+ public final static String AM = "AM";
+
+ public final static String PM = "PM";
+
+ public final static List SUPPORTED_DF_TOKENS = Arrays.asList(new String[] {
+ TOKEN_DAY_OF_WEEK, TOKEN_DAY_OF_MONTH, TOKEN_MONTH, TOKEN_YEAR,
+ TOKEN_HOUR_12, TOKEN_HOUR_24, TOKEN_MINUTE, TOKEN_SECOND,
+ TOKEN_AM_PM });
+
+ public String[] MONTH_LONG = { "January", "February", "March", "April",
+ "May", "June", "July", "August", "September", "October",
+ "November", "December" };
+
+ public String[] MONTH_SHORT = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ "Jul", "Aug", "Sept", "Oct", "Nov", "Dec" };
+
+ public String[] WEEKDAY_LONG = { "Sunday", "Monday", "Tuesday",
+ "Wednesday", "Thursday", "Friday", "Saturday" };
+
+ public String[] WEEKDAY_SHORT = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri",
+ "Sat" };
+
+ public static String getAM() {
+ return AM;
+ }
+
+ public static String getPM() {
+ return PM;
+ }
+
+ public String[] getWEEKDAY_LONG() {
+ return WEEKDAY_LONG;
+ }
+
+ public String[] getWEEKDAY_SHORT() {
+ return WEEKDAY_SHORT;
+ }
+
+}
Modified: bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/JSONWalk.java
===================================================================
--- bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/JSONWalk.java 2009-07-30 10:03:32 UTC (rev 706)
+++ bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/JSONWalk.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -25,7 +25,7 @@
import com.google.gwt.json.client.JSONException;
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.json.client.JSONValue;
-import org.jboss.bpm.console.client.model.util.SimpleDateFormat;
+import org.jboss.bpm.console.client.util.SimpleDateFormat;
import java.util.Date;
import java.util.Iterator;
Copied: bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/MapEntry.java (from rev 705, bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/MapEntry.java)
===================================================================
--- bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/MapEntry.java (rev 0)
+++ bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/MapEntry.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -0,0 +1,47 @@
+/*
+ * 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 MapEntry
+{
+ String name;
+ Object value;
+
+ public MapEntry(String name, Object value)
+ {
+ this.name = name;
+ this.value = value;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public Object getValue()
+ {
+ return value;
+ }
+}
Copied: bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/SimpleDateFormat.java (from rev 705, bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/SimpleDateFormat.java)
===================================================================
--- bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/SimpleDateFormat.java (rev 0)
+++ bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/SimpleDateFormat.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -0,0 +1,193 @@
+/*
+ * Copyright 2006 Robert Hanson <iamroberthanson AT gmail.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.bpm.console.client.util;
+
+import org.jboss.bpm.console.client.util.DateLocale;
+import org.jboss.bpm.console.client.util.SimpleDateParser;
+
+import java.util.Date;
+
+ at SuppressWarnings("deprecation")
+public class SimpleDateFormat {
+ private String format;
+ private DateLocale locale = new DateLocale();
+ public static final String DEFAULT_FORMAT = "yyyy-MM-dd HH:mm:ss";
+
+
+ /**
+ * Gets the support locale for formatting and parsing dates
+ * @return
+ */
+ public DateLocale getLocale() {
+ return locale;
+ }
+
+ public void setLocale(DateLocale locale) {
+ this.locale = locale;
+ }
+
+ /**
+ * Use {@link #DEFAULT_FORMAT}
+ */
+ public SimpleDateFormat()
+ {
+ format = DEFAULT_FORMAT;
+ }
+
+ /**
+ * Use a custom format
+ */
+ public SimpleDateFormat(String pattern) {
+ format = pattern;
+ }
+
+ public String format(Date date) {
+ String f = "";
+ if (format != null && format.length() > 0) {
+ String lastTokenType = null;
+ String currentToken = "";
+ for (int i = 0; i < format.length(); i++) {
+ String thisChar = format.substring(i, i + 1);
+ String currentTokenType = DateLocale.SUPPORTED_DF_TOKENS
+ .contains(thisChar) ? thisChar : "";
+ if (currentTokenType.equals(lastTokenType) || i == 0) {
+ currentToken += thisChar;
+ lastTokenType = currentTokenType;
+ } else {
+ if ("".equals(lastTokenType))
+ f += currentToken;
+ else
+ f += handleToken(currentToken, date);
+ currentToken = thisChar;
+ lastTokenType = currentTokenType;
+ }
+ }
+ if ("".equals(lastTokenType))
+ f += currentToken;
+ else
+ f += handleToken(currentToken, date);
+ }
+ return f;
+ }
+
+ /**
+ * takes a date format string and returns the formatted portion of the date.
+ * For instance if the token is MMMM then the full month name is returned.
+ *
+ * @param token
+ * date format token
+ * @param date
+ * date to format
+ * @return formatted portion of the date
+ */
+ private String handleToken(String token, Date date) {
+ String response = token;
+ String tc = token.substring(0, 1);
+ if (DateLocale.TOKEN_DAY_OF_WEEK.equals(tc)) {
+ if (token.length() > 3)
+ response = locale.getWEEKDAY_LONG()[date.getDay()];
+ else
+ response = locale.getWEEKDAY_SHORT()[date.getDay()];
+ } else if (DateLocale.TOKEN_DAY_OF_MONTH.equals(tc)) {
+ if (token.length() == 1)
+ response = Integer.toString(date.getDate());
+ else
+ response = twoCharDateField(date.getDate());
+ } else if (DateLocale.TOKEN_MONTH.equals(tc)) {
+ switch (token.length()) {
+ case 1:
+ response = Integer.toString(date.getMonth() + 1);
+ break;
+ case 2:
+ response = twoCharDateField(date.getMonth() + 1);
+ break;
+ case 3:
+ response = locale.MONTH_SHORT[date.getMonth()];
+ break;
+ default:
+ response = locale.MONTH_LONG[date.getMonth()];
+ break;
+ }
+ } else if (DateLocale.TOKEN_YEAR.equals(tc)) {
+ if (token.length() > 2)
+ response = Integer.toString(date.getYear() + 1900);
+ else
+ response = twoCharDateField(date.getYear());
+ } else if (DateLocale.TOKEN_HOUR_12.equals(tc)) {
+ int h = date.getHours();
+ if (h == 0)
+ h = 12;
+ else if (h > 12)
+ h -= 12;
+ if (token.length() > 1)
+ response = twoCharDateField(h);
+ else
+ response = Integer.toString(h);
+ } else if (DateLocale.TOKEN_HOUR_24.equals(tc)) {
+ if (token.length() > 1)
+ response = twoCharDateField(date.getHours());
+ else
+ response = Integer.toString(date.getHours());
+ } else if (DateLocale.TOKEN_MINUTE.equals(tc)) {
+ if (token.length() > 1)
+ response = twoCharDateField(date.getMinutes());
+ else
+ response = Integer.toString(date.getMinutes());
+ } else if (DateLocale.TOKEN_SECOND.equals(tc)) {
+ if (token.length() > 1)
+ response = twoCharDateField(date.getSeconds());
+ else
+ response = Integer.toString(date.getSeconds());
+ } else if (DateLocale.TOKEN_AM_PM.equals(tc)) {
+ int hour = date.getHours();
+ if (hour > 11)
+ response = DateLocale.getPM();
+ else
+ response = DateLocale.getAM();
+ }
+ return response;
+ }
+
+ /**
+ * This is basically just a sneaky way to guarantee that our 1 or 2 digit
+ * numbers come out as a 2 character string. we add an arbitrary number
+ * larger than 100, convert this new number to a string, then take the right
+ * most 2 characters.
+ *
+ * @param num
+ * @return
+ */
+ private String twoCharDateField(int num) {
+ String res = Integer.toString(num + 1900);
+ res = res.substring(res.length() - 2);
+ return res;
+ }
+
+ private static Date newDate(long time) {
+ return new Date(time);
+ }
+
+ /**
+ * Parses text and returns the corresponding date object.
+ *
+ * @param source
+ * @return java.util.Date
+ */
+ public Date parse(String source){
+ return SimpleDateParser.parse(source, format);
+ };
+
+}
\ No newline at end of file
Copied: bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/SimpleDateParser.java (from rev 705, bpm-console/trunk/bpm/rpc/src/main/java/org/jboss/bpm/console/client/model/util/SimpleDateParser.java)
===================================================================
--- bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/SimpleDateParser.java (rev 0)
+++ bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/SimpleDateParser.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -0,0 +1,161 @@
+/*
+ * Copyright 2006 Robert Hanson <iamroberthanson AT gmail.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.bpm.console.client.util;
+
+import org.jboss.bpm.console.client.util.regex.Pattern;
+
+import java.util.Date;
+
+
+/**
+ * This is a simple regular expression based parser for date notations.
+ * While our aim is to fully support in the future the JDK date parser, currently
+ * only numeric notations and literals are supported such as <code>dd/MM/yyyy HH:mm:ss.SSSS</code>.
+ * Each entity is parsed with the same number of digits, i.e. for <code>dd</code> two digits will be
+ * parsed while for <code>d</code> only one will be parsed.
+ * @author <a href="mailto:g.georgovassilis at gmail.com">George Georgovassilis</a>
+ *
+ */
+
+ at SuppressWarnings("deprecation")
+public class SimpleDateParser {
+
+
+ private final static String DAY_IN_MONTH = "d";
+
+ private final static String MONTH = "M";
+
+ private final static String YEAR = "y";
+
+ private final static String LITERAL = "\\";
+
+ private final static int DATE_PATTERN = 0;
+
+ private final static int REGEX_PATTERN = 1;
+
+ private final static int COMPONENT = 2;
+
+ private final static int REGEX = 0;
+
+ private final static int INSTRUCTION = 1;
+
+ private final static String[] TOKENS[] = {
+ { "SSSS", "(\\d\\d\\d\\d)",DateLocale.TOKEN_MILLISECOND },
+ { "SSS", "(\\d\\d\\d)", DateLocale.TOKEN_MILLISECOND },
+ { "SS", "(\\d\\d)", DateLocale.TOKEN_MILLISECOND },
+ { "S", "(\\d)", DateLocale.TOKEN_MILLISECOND },
+ { "ss", "(\\d\\d)", DateLocale.TOKEN_SECOND },
+ { "s", "(\\d)", DateLocale.TOKEN_SECOND },
+ { "mm", "(\\d\\d)", DateLocale.TOKEN_MINUTE },
+ { "m", "(\\d)", DateLocale.TOKEN_MINUTE},
+ { "HH", "(\\d\\d)", DateLocale.TOKEN_HOUR_24},
+ { "H", "(\\d)", DateLocale.TOKEN_HOUR_24 },
+ { "dd", "(\\d\\d)", DateLocale.TOKEN_DAY_OF_MONTH },
+ { "d", "(\\d)", DateLocale.TOKEN_DAY_OF_MONTH },
+ { "MM", "(\\d\\d)", DateLocale.TOKEN_MONTH },
+ { "M", "(\\d)", DateLocale.TOKEN_MONTH },
+ { "yyyy", "(\\d\\d\\d\\d)", DateLocale.TOKEN_YEAR },
+ { "yyy", "(\\d\\d\\d)", DateLocale.TOKEN_YEAR },
+ { "yy", "(\\d\\d)", DateLocale.TOKEN_YEAR },
+ { "y", "(\\d)", DateLocale.TOKEN_YEAR }
+ };
+
+ private Pattern regularExpression;
+
+ private String instructions = "";
+
+ private static void _parse(String format, String[] args) {
+ if (format.length() == 0)
+ return;
+ if (format.startsWith("'")){
+ format = format.substring(1);
+ int end = format.indexOf("'");
+ if (end == -1)
+ throw new IllegalArgumentException("Unmatched single quotes.");
+ args[REGEX]+=Pattern.quote(format.substring(0,end));
+ format = format.substring(end+1);
+ }
+ for (int i = 0; i < TOKENS.length; i++) {
+ String[] row = TOKENS[i];
+ String datePattern = row[DATE_PATTERN];
+ if (!format.startsWith(datePattern))
+ continue;
+ format = format.substring(datePattern.length());
+ args[REGEX] += row[REGEX_PATTERN];
+ args[INSTRUCTION] += row[COMPONENT];
+ _parse(format, args);
+ return;
+ }
+ args[REGEX] += Pattern.quote(""+format.charAt(0));
+ format = format.substring(1);
+ _parse(format, args);
+ }
+
+ private static void load(Date date, String text, String component) {
+ if (component.equals(DateLocale.TOKEN_MILLISECOND)) {
+ //TODO: implement
+ }
+
+ if (component.equals(DateLocale.TOKEN_SECOND)) {
+ date.setSeconds(Integer.parseInt(text));
+ }
+
+ if (component.equals(DateLocale.TOKEN_MINUTE)) {
+ date.setMinutes(Integer.parseInt(text));
+ }
+
+ if (component.equals(DateLocale.TOKEN_HOUR_24)) {
+ date.setHours(Integer.parseInt(text));
+ }
+
+ if (component.equals(DateLocale.TOKEN_DAY_OF_MONTH)) {
+ date.setDate(Integer.parseInt(text));
+ }
+ if (component.equals(DateLocale.TOKEN_MONTH)) {
+ date.setMonth(Integer.parseInt(text)-1);
+ }
+ if (component.equals(DateLocale.TOKEN_YEAR)) {
+ //TODO: fix for short patterns
+ date.setYear(Integer.parseInt(text)-1900);
+ }
+
+ }
+
+ public SimpleDateParser(String format) {
+ String[] args = new String[] { "", "" };
+ _parse(format, args);
+ regularExpression = new Pattern(args[REGEX]);
+ instructions = args[INSTRUCTION];
+ }
+
+ public Date parse(String input) {
+ Date date = new Date(0, 0, 1, 0, 0, 0);
+ String matches[] = regularExpression.match(input);
+ if (matches == null)
+ throw new IllegalArgumentException(input+" does not match "+regularExpression.pattern());
+ if (matches.length-1!=instructions.length())
+ throw new IllegalArgumentException("Different group count - "+input+" does not match "+regularExpression.pattern());
+ for (int group = 0; group < instructions.length(); group++) {
+ String match = matches[group + 1];
+ load(date, match, ""+instructions.charAt(group));
+ }
+ return date;
+ }
+
+ public static Date parse(String input, String pattern){
+ return new SimpleDateParser(pattern).parse(input);
+ }
+}
Added: bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/regex/Pattern.java
===================================================================
--- bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/regex/Pattern.java (rev 0)
+++ bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/util/regex/Pattern.java 2009-07-30 11:01:39 UTC (rev 707)
@@ -0,0 +1,186 @@
+/*
+ * 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.regex;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.google.gwt.core.client.JavaScriptObject;
+
+/**
+ * <p>
+ * Implementation of the {@link java.util.regex.Pattern} class with a
+ * wrapper aroung the Javascript <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:Regular_Expressions">RegExp</a> object.
+ * As most of the methods delegate to the JavaScript RegExp object, certain differences in the
+ * declaration and behaviour of regular expressions must be expected.
+ * </p>
+ * <p>
+ * Please note that neither the {@link java.util.regex.Pattern#compile(String)} method nor
+ * {@link Matcher} instances are supported. For the later, consider using {@link Pattern#match(String)}.
+ * </p>
+ *
+ * @author George Georgovassilis
+ *
+ */
+public class Pattern {
+
+ /**
+ * Declares that regular expressions should be matched across line borders.
+ */
+ public final static int MULTILINE = 1;
+
+ /**
+ * Declares that characters are matched reglardless of case.
+ */
+ public final static int CASE_INSENSITIVE = 2;
+
+ private JavaScriptObject regExp;
+
+ private static JavaScriptObject createExpression(String pattern, int flags) {
+ String sFlags = "";
+ if ((flags & MULTILINE) != 0)
+ sFlags += "m";
+ if ((flags & CASE_INSENSITIVE) != 0)
+ sFlags += "i";
+ return _createExpression(pattern, sFlags);
+ }
+
+ private static native JavaScriptObject _createExpression(String pattern,
+ String flags)/*-{
+ return new RegExp(pattern, flags);
+ }-*/;
+
+ private native void _match(String text, List matches)/*-{
+ var regExp = this. at org.jboss.bpm.console.client.util.regex.Pattern::regExp;
+ var result = text.match(regExp);
+ if (result == null) return;
+ for (var i=0;i<result.length;i++)
+ matches. at java.util.ArrayList::add(Ljava/lang/Object;)(result[i]);
+ }-*/;
+
+ /**
+ * Determines wether the specified regular expression is validated by the
+ * provided input.
+ * @param regex Regular expression
+ * @param input String to validate
+ * @return <code>true</code> if matched.
+ */
+ public static boolean matches(String regex, String input) {
+ return new Pattern(regex).matches(input);
+ }
+
+ /**
+ * Escape a provided string so that it will be interpreted as a literal
+ * in regular expressions.
+ * The current implementation does escape each character even if not neccessary,
+ * generating verbose literals.
+ * @param input
+ * @return
+ */
+ public static String quote(String input) {
+ String output = "";
+ for (int i = 0; i < input.length(); i++) {
+ output += "\\" + input.charAt(i);
+ }
+ return output;
+ }
+
+ /**
+ * Class constructor
+ * @param pattern Regular expression
+ */
+ public Pattern(String pattern) {
+ this(pattern, 0);
+ }
+
+ /**
+ * Class constructor
+ * @param pattern Regular expression
+ * @param flags
+ */
+ public Pattern(String pattern, int flags) {
+ regExp = createExpression(pattern, flags);
+ }
+
+ /**
+ * This method is borrowed from the JavaScript RegExp object.
+ * It parses a string and returns as an array any assignments to parenthesis groups
+ * in the pattern's regular expression
+ * @param text
+ * @return Array of strings following java's Pattern convention for groups:
+ * Group 0 is the entire input string and the remaining groups are the matched parenthesis.
+ * In case nothing was matched an empty array is returned.
+ */
+ public String[] match(String text) {
+ List matches = new ArrayList();
+ _match(text, matches);
+ String arr[] = new String[matches.size()];
+ for (int i = 0; i < matches.size(); i++)
+ arr[i] = matches.get(i).toString();
+ return arr;
+ }
+
+ /**
+ * Determines wether a provided text matches the regular expression
+ * @param text
+ * @return
+ */
+ public native boolean matches(String text)/*-{
+ var regExp = this. at org.jboss.bpm.console.client.util.regex.Pattern::regExp;
+ return regExp.test(text);
+ }-*/;
+
+ /**
+ * Returns the regular expression for this pattern
+ * @return
+ */
+ public native String pattern()/*-{
+ var regExp = this. at org.jboss.bpm.console.client.util.regex.Pattern::regExp;
+ return regExp.source;
+ }-*/;
+
+ private native void _split(String input, List results)/*-{
+ var regExp = this. at org.jboss.bpm.console.client.util.regex.Pattern::regExp;
+ var parts = input.split(regExp);
+ for (var i=0;i<parts.length;i++)
+ results. at java.util.ArrayList::add(Ljava/lang/Object;)(parts[i] );
+ }-*/;
+
+ /**
+ * Split an input string by the pattern's regular expression
+ * @param input
+ * @return Array of strings
+ */
+ public String[] split(String input){
+ List results = new ArrayList();
+ _split(input, results);
+ String[] parts = new String[results.size()];
+ for (int i=0;i<results.size();i++)
+ parts[i] = (String)results.get(i);
+ return parts;
+ }
+
+ public String toString() {
+ return regExp.toString();
+ }
+}
+
Added: bpm-console/trunk/workspace/workspace-api/workspace-api.iml
===================================================================
--- bpm-console/trunk/workspace/workspace-api/workspace-api.iml (rev 0)
+++ bpm-console/trunk/workspace/workspace-api/workspace-api.iml 2009-07-30 11:01:39 UTC (rev 707)
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+ <component name="ModuleRootManager" />
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <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" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="bpm-rpc" exported="" />
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: commons-collections:commons-collections:jar:3.2.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: commons-lang:commons-lang:jar:2.4:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: com.googlecode.gwtmosaic:gwt-mosaic:jar:0.1.10:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/googlecode/gwtmosaic/gwt-mosaic/0.1.10/gwt-mosaic-0.1.10.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: commons-logging:commons-logging:jar:1.1.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: commons-digester:commons-digester:jar:1.8:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: com.googlecode.mvc4g:mvc4g:jar:1.0.0-jboss:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/googlecode/mvc4g/mvc4g/1.0.0-jboss/mvc4g-1.0.0-jboss.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: com.googlecode.gwtmosaic:gwt-mosaic-dnd:jar:0.1.10:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/googlecode/gwtmosaic/gwt-mosaic-dnd/0.1.10/gwt-mosaic-dnd-0.1.10.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: com.googlecode.gwtmosaic:gwt-mosaic-gwtx:jar:0.1.10:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/googlecode/gwtmosaic/gwt-mosaic-gwtx/0.1.10/gwt-mosaic-gwtx-0.1.10.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: com.google.gwt:gwt-user:jar:1.5.3:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/gwt/gwt-user/1.5.3/gwt-user-1.5.3.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: commons-beanutils:commons-beanutils:jar:1.7.0:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: commons-configuration:commons-configuration:jar:1.6:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gson/gson/1.2.2/gson-1.2.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: commons-beanutils:commons-beanutils-core:jar:1.8.0:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-beanutils/commons-beanutils-core/1.8.0/commons-beanutils-core-1.8.0.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: com.googlecode.gwtmosaic:gwt-mosaic-incubator:jar:0.1.10:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/googlecode/gwtmosaic/gwt-mosaic-incubator/0.1.10/gwt-mosaic-incubator-0.1.10.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.activation:activation:jar:1.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: com.google.code.gwt-log:gwt-log:jar:2.5.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gwt-log/gwt-log/2.5.2/gwt-log-2.5.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntryProperties />
+ </component>
+</module>
+
More information about the overlord-commits
mailing list