[jbpm-commits] JBoss JBPM SVN: r3311 - in projects/gwt-console/trunk: rpc/src/main/java/org/jboss/bpm/console/client/model and 11 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Dec 10 05:53:10 EST 2008
Author: heiko.braun at jboss.com
Date: 2008-12-10 05:53:09 -0500 (Wed, 10 Dec 2008)
New Revision: 3311
Added:
projects/gwt-console/trunk/server/src/test/
projects/gwt-console/trunk/server/src/test/java/
projects/gwt-console/trunk/server/src/test/java/org/
projects/gwt-console/trunk/server/src/test/java/org/jboss/
projects/gwt-console/trunk/server/src/test/java/org/jboss/bpm/
projects/gwt-console/trunk/server/src/test/java/org/jboss/bpm/console/
projects/gwt-console/trunk/server/src/test/java/org/jboss/bpm/console/server/
projects/gwt-console/trunk/server/src/test/java/org/jboss/bpm/console/server/AuthorizationTest.java
projects/gwt-console/trunk/server/src/test/java/org/jboss/bpm/console/server/BaseTC.java
projects/gwt-console/trunk/server/src/test/java/org/jboss/bpm/console/server/HTTP.java
Modified:
projects/gwt-console/trunk/gwt-parent.iml
projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentRef.java
projects/gwt-console/trunk/server/gwt-server.iml
projects/gwt-console/trunk/server/pom.xml
projects/gwt-console/trunk/war/gwt-war.iml
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java
Log:
Start work on server module test suite
Modified: projects/gwt-console/trunk/gwt-parent.iml
===================================================================
--- projects/gwt-console/trunk/gwt-parent.iml 2008-12-10 10:49:06 UTC (rev 3310)
+++ projects/gwt-console/trunk/gwt-parent.iml 2008-12-10 10:53:09 UTC (rev 3311)
@@ -7,6 +7,7 @@
<sourceFolder url="file://$MODULE_DIR$/rpc/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/server/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/server/src/main/resources" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/server/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/war/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/war/src/main/resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/war/src/test/java" isTestSource="true" />
@@ -14,9 +15,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="jbpm3-toplevel" />
- <orderEntry type="module" module-name="gwt-rpc" />
- <orderEntry type="module" module-name="jbpm3-identity" />
+ <orderEntry type="module" module-name="jbpm3-toplevel" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: org.slf4j:slf4j-simple:jar:1.5.2:compile">
<CLASSES>
@@ -198,15 +197,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: commons-collections:commons-collections:jar:2.1.1:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-collections/commons-collections/2.1.1/commons-collections-2.1.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss.resteasy:jaxrs-api:jar:1.0-beta-8:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/resteasy/jaxrs-api/1.0-beta-8/jaxrs-api-1.0-beta-8.jar!/" />
@@ -656,6 +646,51 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: net.sf.ezmorph:ezmorph:jar:1.0.6:test">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: net.sf.json-lib:json-lib:jar:2.2.3:test">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/net/sf/json-lib/json-lib/2.2.3/json-lib-2.2.3.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <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 />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <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" exported="">
+ <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>
<orderEntryProperties />
</component>
</module>
Modified: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentRef.java
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentRef.java 2008-12-10 10:49:06 UTC (rev 3310)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentRef.java 2008-12-10 10:53:09 UTC (rev 3311)
@@ -31,17 +31,17 @@
public class RoleAssignmentRef
{
private String role;
- private boolean isAssigned;
+ private boolean assigned;
public RoleAssignmentRef()
{
}
- public RoleAssignmentRef(String role, boolean assigned)
+ public RoleAssignmentRef(String role, boolean isAssigned)
{
this.role = role;
- isAssigned = assigned;
+ this.assigned = isAssigned;
}
@XmlElement(name = "role")
@@ -55,14 +55,15 @@
this.role = role;
}
- @XmlElement(name = "isAssigned")
+ @XmlElement(name = "assigned")
public boolean isAssigned()
{
- return isAssigned;
+ return assigned;
}
public void setAssigned(boolean assigned)
{
- isAssigned = assigned;
+ this.assigned = assigned;
}
+
}
Modified: projects/gwt-console/trunk/server/gwt-server.iml
===================================================================
--- projects/gwt-console/trunk/server/gwt-server.iml 2008-12-10 10:49:06 UTC (rev 3310)
+++ projects/gwt-console/trunk/server/gwt-server.iml 2008-12-10 10:53:09 UTC (rev 3311)
@@ -6,12 +6,12 @@
<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="gwt-rpc" exported="" />
- <orderEntry type="module" module-name="jbpm3-toplevel" exported="" />
- <orderEntry type="module" module-name="jbpm3-identity" exported="" />
+ <orderEntry type="module" module-name="gwt-parent" />
+ <orderEntry type="module" module-name="jbpm3-toplevel" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: org.slf4j:slf4j-simple:jar:1.5.2:compile">
<CLASSES>
@@ -193,15 +193,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: commons-collections:commons-collections:jar:2.1.1:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-collections/commons-collections/2.1.1/commons-collections-2.1.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss.resteasy:jaxrs-api:jar:1.0-beta-8:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/resteasy/jaxrs-api/1.0-beta-8/jaxrs-api-1.0-beta-8.jar!/" />
@@ -624,6 +615,51 @@
<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: 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: 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 />
+ </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: 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>
<orderEntryProperties />
</component>
</module>
Modified: projects/gwt-console/trunk/server/pom.xml
===================================================================
--- projects/gwt-console/trunk/server/pom.xml 2008-12-10 10:49:06 UTC (rev 3310)
+++ projects/gwt-console/trunk/server/pom.xml 2008-12-10 10:53:09 UTC (rev 3311)
@@ -21,6 +21,7 @@
<properties>
<jboss.bpm.spec.version>1.0.0-SNAPSHOT</jboss.bpm.spec.version>
<balalaika.version>1.0.0-SNAPSHOT</balalaika.version>
+ <json-lib.version>2.2.3</json-lib.version>
</properties>
<dependencies>
@@ -86,6 +87,12 @@
<artifactId>gson</artifactId>
</dependency>
<dependency>
+ <groupId>net.sf.json-lib</groupId>
+ <artifactId>json-lib</artifactId>
+ <version>${json-lib.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
</dependency>
Added: projects/gwt-console/trunk/server/src/test/java/org/jboss/bpm/console/server/AuthorizationTest.java
===================================================================
--- projects/gwt-console/trunk/server/src/test/java/org/jboss/bpm/console/server/AuthorizationTest.java (rev 0)
+++ projects/gwt-console/trunk/server/src/test/java/org/jboss/bpm/console/server/AuthorizationTest.java 2008-12-10 10:53:09 UTC (rev 3311)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server;
+
+import net.sf.json.JSONObject;
+import net.sf.json.util.JSONUtils;
+import net.sf.ezmorph.Morpher;
+import net.sf.ezmorph.MorpherRegistry;
+import net.sf.ezmorph.bean.BeanMorpher;
+import org.jboss.bpm.console.client.model.*;
+import org.apache.commons.beanutils.PropertyUtils;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class AuthorizationTest extends BaseTC
+{
+ public void testAuthorisation() throws Exception
+ {
+ String json = HTTP.get(
+ SERVER_URL + "/identity/user/roles?roleCheck=admin,user", DEFAULT_CREDENTIALS
+ );
+
+ JSONObject jsonObject = JSONObject.fromObject( json );
+ System.out.println(json);
+ RoleAssignmentRefWrapper dto = (RoleAssignmentRefWrapper)
+ JSONObject.toBean( jsonObject, RoleAssignmentRefWrapper.class );
+
+ // --
+ // Postprocessing required:
+ // See http://json-lib.sourceforge.net/usage.html
+ MorpherRegistry morpherRegistry = JSONUtils.getMorpherRegistry();
+ Morpher dynaMorpher = new BeanMorpher( RoleAssignmentRef.class, morpherRegistry);
+ morpherRegistry.registerMorpher( dynaMorpher );
+ List roles = new ArrayList();
+ for( Iterator i = dto.getRoles().iterator(); i.hasNext(); ){
+ roles.add( morpherRegistry.morph( RoleAssignmentRef.class, i.next() ) );
+ }
+ dto.setRoles(roles);
+ // --
+
+ RoleAssignmentRef adminRole = null;
+ for(int i=0; i<dto.getRoles().size(); i++)
+ {
+ RoleAssignmentRef ref = dto.getRoles().get(i);
+ if(ref.getRole().equals("admin"))
+ {
+ adminRole = ref;
+ break;
+ }
+ }
+
+ assertNotNull(adminRole);
+ assertTrue(adminRole.isAssigned());
+
+ }
+}
Added: projects/gwt-console/trunk/server/src/test/java/org/jboss/bpm/console/server/BaseTC.java
===================================================================
--- projects/gwt-console/trunk/server/src/test/java/org/jboss/bpm/console/server/BaseTC.java (rev 0)
+++ projects/gwt-console/trunk/server/src/test/java/org/jboss/bpm/console/server/BaseTC.java 2008-12-10 10:53:09 UTC (rev 3311)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public abstract class BaseTC extends TestCase
+{
+ protected final static String[] DEFAULT_CREDENTIALS = new String[] {"admin", "admin"};
+ protected String SERVER_URL = "http://localhost:8080/gwt-console-server/rs";
+}
Added: projects/gwt-console/trunk/server/src/test/java/org/jboss/bpm/console/server/HTTP.java
===================================================================
--- projects/gwt-console/trunk/server/src/test/java/org/jboss/bpm/console/server/HTTP.java (rev 0)
+++ projects/gwt-console/trunk/server/src/test/java/org/jboss/bpm/console/server/HTTP.java 2008-12-10 10:53:09 UTC (rev 3311)
@@ -0,0 +1,207 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server;
+
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.UUID;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class HTTP
+{
+ public static String post(String urlString, InputStream inputStream, String[] credentials)
+ throws Exception
+ {
+
+ HttpURLConnection conn = null;
+ BufferedReader br = null;
+ DataOutputStream dos = null;
+ DataInputStream inStream = null;
+
+ InputStream is = null;
+ OutputStream os = null;
+ boolean ret = false;
+ String StrMessage = "";
+
+
+ String lineEnd = "\r\n";
+ String twoHyphens = "--";
+ String boundary = "*****";
+
+
+ int bytesRead, bytesAvailable, bufferSize;
+
+ byte[] buffer;
+
+ int maxBufferSize = 1*1024*1024;
+
+ String responseFromServer = "";
+
+ try
+ {
+ //------------------ CLIENT REQUEST
+
+ // open a URL connection to the Servlet
+
+ URL url = new URL(urlString);
+
+
+ // Open a HTTP connection to the URL
+
+ conn = (HttpURLConnection) url.openConnection();
+
+ if(credentials!=null)
+ applyCredentials(credentials, conn);
+
+ // Allow Inputs
+ conn.setDoInput(true);
+
+ // Allow Outputs
+ conn.setDoOutput(true);
+
+ // Don't use a cached copy.
+ conn.setUseCaches(false);
+
+ // Use a post method.
+ conn.setRequestMethod("POST");
+
+ conn.setRequestProperty("Connection", "Keep-Alive");
+
+ conn.setRequestProperty("Content-Type", "multipart/form-data;boundary="+boundary);
+
+ dos = new DataOutputStream( conn.getOutputStream() );
+
+ dos.writeBytes(twoHyphens + boundary + lineEnd);
+ dos.writeBytes("Content-Disposition: form-data; name=\"upload\";"
+ + " filename=\"" + UUID.randomUUID().toString() +"\"" + lineEnd);
+ dos.writeBytes(lineEnd);
+
+ // create a buffer of maximum size
+ bytesAvailable = inputStream.available();
+ bufferSize = Math.min(bytesAvailable, maxBufferSize);
+ buffer = new byte[bufferSize];
+
+ // read file and write it into form...
+ bytesRead = inputStream.read(buffer, 0, bufferSize);
+
+ while (bytesRead > 0)
+ {
+ dos.write(buffer, 0, bufferSize);
+ bytesAvailable = inputStream.available();
+ bufferSize = Math.min(bytesAvailable, maxBufferSize);
+ bytesRead = inputStream.read(buffer, 0, bufferSize);
+ }
+
+ // send multipart form data necesssary after file data...
+
+ dos.writeBytes(lineEnd);
+ dos.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd);
+
+ // close streams
+
+ inputStream.close();
+ dos.flush();
+ dos.close();
+
+ }
+ catch (MalformedURLException ex)
+ {
+ throw ex;
+ }
+
+ catch (IOException ioe)
+ {
+ throw ioe;
+ }
+
+
+ //------------------ read the SERVER RESPONSE
+
+ StringBuffer sb = new StringBuffer();
+
+ try
+ {
+ inStream = new DataInputStream ( conn.getInputStream() );
+ String str;
+ while (( str = inStream.readLine()) != null)
+ {
+ sb.append(str).append("");
+ }
+ inStream.close();
+
+ }
+ catch (IOException ioex)
+ {
+ System.out.println("From (ServerResponse): "+ioex);
+
+ }
+
+
+ return sb.toString();
+
+ }
+
+ private static void applyCredentials(String[] credentials, HttpURLConnection conn)
+ {
+ String userPassword = credentials[0]+":"+credentials[1];
+ String encoding = new sun.misc.BASE64Encoder().encode (userPassword.getBytes());
+ conn.setRequestProperty ("Authorization", "Basic " + encoding);
+ }
+
+ public static String get(String urlString, String[] credentials)
+ {
+ StringBuffer sb = new StringBuffer();
+ try
+ {
+ URL url = new URL(urlString);
+ HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+ if(credentials!=null)
+ applyCredentials(credentials, conn);
+
+ BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
+ String str;
+
+
+ while ((str = in.readLine()) != null)
+ {
+ sb.append(str);
+ }
+
+ in.close();
+ }
+ catch (MalformedURLException e)
+ {
+ throw new RuntimeException(e);
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException(e);
+ }
+
+ return sb.toString();
+ }
+}
+
Modified: projects/gwt-console/trunk/war/gwt-war.iml
===================================================================
--- projects/gwt-console/trunk/war/gwt-war.iml 2008-12-10 10:49:06 UTC (rev 3310)
+++ projects/gwt-console/trunk/war/gwt-war.iml 2008-12-10 10:53:09 UTC (rev 3311)
@@ -11,7 +11,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="gwt-rpc" exported="" />
+ <orderEntry type="module" module-name="gwt-parent" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: junit:junit:jar:3.8.1:test">
<CLASSES>
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java 2008-12-10 10:49:06 UTC (rev 3310)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java 2008-12-10 10:53:09 UTC (rev 3311)
@@ -62,7 +62,7 @@
for (int i = 0; i < array.size(); ++i)
{
JSONObject item = array.get(i).isObject();
- boolean assigned = JSONWalk.on(item).next("isAssigned").asBool();
+ boolean assigned = JSONWalk.on(item).next("assigned").asBool();
String roleName = JSONWalk.on(item).next("role").asString();
if(assigned)
More information about the jbpm-commits
mailing list