JBoss JBPM SVN: r3779 - in jbpm3/branches/jbpm-3.2.5.SP/modules/core/src: main/resources/org/jbpm/context/exe and 6 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-02-04 15:34:27 -0500 (Wed, 04 Feb 2009)
New Revision: 3779
Modified:
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/hibernate.properties.mysql.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/context/exe/TokenVariableMap.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/context/exe/VariableInstance.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/Comment.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/ProcessInstance.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/RuntimeAction.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/Token.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/job/Job.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/module/exe/ModuleInstance.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/PooledActor.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/jbpm1072/JBPM1072Test.java
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/jbpm983/JBPM983Test.java
Log:
JBPM-1953 revert r3778; without version checking, jobs get executed more than once
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/hibernate.properties.mysql.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/hibernate.properties.mysql.xml 2009-02-04 17:22:47 UTC (rev 3778)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/hibernate.properties.mysql.xml 2009-02-04 20:34:27 UTC (rev 3779)
@@ -7,5 +7,6 @@
<property name="hibernate.connection.url">${jdbc.mysql.url}</property>
<property name="hibernate.connection.username">${jdbc.mysql.username}</property>
<property name="hibernate.connection.password">${jdbc.mysql.password}</property>
+ <property name="hibernate.connection.isolation">2</property>
<property name="hibernate.query.substitutions">true 1, false 0</property>
<!-- JDBC connection properties (end) -->
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/context/exe/TokenVariableMap.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/context/exe/TokenVariableMap.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/context/exe/TokenVariableMap.hbm.xml 2009-02-04 20:34:27 UTC (rev 3779)
@@ -8,9 +8,7 @@
<class name="org.jbpm.context.exe.TokenVariableMap"
table="JBPM_TOKENVARIABLEMAP">
<id name="id" column="ID_"><generator class="native" /></id>
- <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
- -->
<many-to-one name="token"
column="TOKEN_"
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/context/exe/VariableInstance.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/context/exe/VariableInstance.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/context/exe/VariableInstance.hbm.xml 2009-02-04 20:34:27 UTC (rev 3779)
@@ -10,6 +10,7 @@
abstract="true"
discriminator-value="V">
<id name="id" column="ID_"><generator class="native" /></id>
+ <discriminator type="char" column="CLASS_"/>
<!-- V : org.jbpm.context.exe.VariableInstance -->
<!-- B : org.jbpm.context.exe.variableinstance.ByteArrayInstance -->
<!-- D : org.jbpm.context.exe.variableinstance.DateInstance -->
@@ -20,10 +21,7 @@
<!-- S : org.jbpm.context.exe.variableinstance.StringInstance -->
<!-- N : org.jbpm.context.exe.variableinstance.NullInstance -->
<!-- J : org.jbpm.context.exe.variableinstance.JcrNodeInstance -->
- <discriminator type="char" column="CLASS_"/>
- <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
- -->
<property name="name" column="NAME_"/>
<property name="converter"
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/Comment.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/Comment.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/Comment.hbm.xml 2009-02-04 20:34:27 UTC (rev 3779)
@@ -7,9 +7,7 @@
<class name="org.jbpm.graph.exe.Comment"
table="JBPM_COMMENT">
<id name="id" column="ID_"><generator class="native" /></id>
- <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
- -->
<property name="actorId" column="ACTORID_"/>
<property name="time" column="TIME_"/>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/ProcessInstance.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/ProcessInstance.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/ProcessInstance.hbm.xml 2009-02-04 20:34:27 UTC (rev 3779)
@@ -7,9 +7,7 @@
<class name="org.jbpm.graph.exe.ProcessInstance"
table="JBPM_PROCESSINSTANCE">
<id name="id" column="ID_"><generator class="native" /></id>
- <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
- -->
<property name="key" column="KEY_" index="IDX_PROCIN_KEY" />
<property name="start" column="START_" />
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/RuntimeAction.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/RuntimeAction.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/RuntimeAction.hbm.xml 2009-02-04 20:34:27 UTC (rev 3779)
@@ -7,9 +7,7 @@
<class name="org.jbpm.graph.exe.RuntimeAction"
table="JBPM_RUNTIMEACTION">
<id name="id" column="ID_"><generator class="native" /></id>
- <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
- -->
<property name="eventType" column="EVENTTYPE_"/>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/Token.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/Token.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/Token.hbm.xml 2009-02-04 20:34:27 UTC (rev 3779)
@@ -7,9 +7,7 @@
<class name="org.jbpm.graph.exe.Token"
table="JBPM_TOKEN">
<id name="id" column="ID_"><generator class="native" /></id>
- <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
- -->
<property name="name" column="NAME_"/>
<property name="start" column="START_"/>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/job/Job.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/job/Job.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/job/Job.hbm.xml 2009-02-04 20:34:27 UTC (rev 3779)
@@ -11,9 +11,7 @@
discriminator-value="J">
<id name="id" column="ID_"><generator class="native" /></id>
<discriminator type="char" column="CLASS_"/>
- <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
- -->
<property name="dueDate" column="DUEDATE_" type="timestamp"/>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/module/exe/ModuleInstance.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/module/exe/ModuleInstance.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/module/exe/ModuleInstance.hbm.xml 2009-02-04 20:34:27 UTC (rev 3779)
@@ -12,9 +12,7 @@
discriminator-value="M">
<id name="id" column="ID_"><generator class="native" /></id>
<discriminator type="char" column="CLASS_"/>
- <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
- -->
<!-- M : org.jbpm.module.exe.ModuleInstance -->
<!-- C : org.jbpm.context.exe.ContextInstance -->
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/PooledActor.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/PooledActor.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/PooledActor.hbm.xml 2009-02-04 20:34:27 UTC (rev 3779)
@@ -9,9 +9,7 @@
<class name="org.jbpm.taskmgmt.exe.PooledActor"
table="JBPM_POOLEDACTOR">
<id name="id" column="ID_"><generator class="native" /></id>
- <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
- -->
<property name="actorId" column="ACTORID_" index="IDX_PLDACTR_ACTID"/>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml 2009-02-04 20:34:27 UTC (rev 3779)
@@ -9,9 +9,7 @@
<class name="org.jbpm.taskmgmt.exe.SwimlaneInstance"
table="JBPM_SWIMLANEINSTANCE">
<id name="id" column="ID_"><generator class="native" /></id>
- <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
- -->
<property name="name" column="NAME_" />
<property name="actorId" column="ACTORID_" />
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml 2009-02-04 20:34:27 UTC (rev 3779)
@@ -11,9 +11,7 @@
discriminator-value="T">
<id name="id" column="ID_"><generator class="native" /></id>
<discriminator type="char" column="CLASS_"/>
- <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
- -->
<property name="name" column="NAME_" />
<property name="description" column="DESCRIPTION_" type="text"/>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/jbpm1072/JBPM1072Test.java
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/jbpm1072/JBPM1072Test.java 2009-02-04 17:22:47 UTC (rev 3778)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/jbpm1072/JBPM1072Test.java 2009-02-04 20:34:27 UTC (rev 3779)
@@ -32,10 +32,9 @@
import org.jbpm.job.executor.JobExecutor;
/**
- * Concurrent job executors can process the same job in parallel.
- * The test simulates multiple nodes in the network processing a common job set.
- * The key setting is to give each job executor a different name;
- * normally, a job executor is named after the node's inet address
+ * Concurrent job executors can process the same job in parallel. The test simulates multiple nodes
+ * in the network processing a common job set. The key setting is to give each job executor a
+ * different name; normally, a job executor is named after the node's inet address
*
* https://jira.jboss.org/jira/browse/JBPM-1072
*
@@ -49,28 +48,26 @@
private JobExecutor[] jobExecutors = new JobExecutor[JOB_EXECUTOR_COUNT];
private long processDefinitionId;
- private volatile static int executionCount;
-
private static final String PROCESS_DEFINITION = "<process-definition name='job-executors'>"
- + "<event type='process-end'>"
- + "<action expression='#{eventCallback.processEnd}' />"
- + "</event>"
- + "<start-state name='start-state1'>"
- + "<transition to='Service 1'></transition>"
- + "</start-state>"
- + "<node name='Service 1' async='true'>"
- + "<action class='"
+ + " <event type='process-end'>"
+ + " <action expression='#{eventCallback.processEnd}' />"
+ + " </event>"
+ + " <start-state name='start-state1'>"
+ + " <transition to='Service 1'></transition>"
+ + " </start-state>"
+ + " <node name='Service 1' async='true'>"
+ + " <action class='"
+ Counter.class.getName()
+ "' />"
- + "<transition to='Service 2' />"
- + "</node>"
- + "<node name='Service 2' async='true'>"
- + "<action class='"
+ + " <transition to='Service 2' />"
+ + " </node>"
+ + " <node name='Service 2' async='true'>"
+ + " <action class='"
+ Counter.class.getName()
+ "' />"
- + "<transition to='end-state1' />"
- + "</node>"
- + "<end-state name='end-state1' />"
+ + " <transition to='end-state1' />"
+ + " </node>"
+ + " <end-state name='end-state1' />"
+ "</process-definition>";
@Override
@@ -88,22 +85,21 @@
@Override
protected void tearDown() throws Exception {
stopJobExecutors();
+
graphSession.deleteProcessDefinition(processDefinitionId);
- super.tearDown();
EventCallback.clear();
+ super.tearDown();
}
- public void testMultipleJobExecutors()
- {
- executionCount = 0;
-
+ public void testMultipleJobExecutors() {
// Won't Fix [JBPM-1072] Concurrent JobExecutors can process the same job in parallel
- if (getHibernateDialect().indexOf("HSQL") != -1)
- {
+ if (getHibernateDialect().indexOf("HSQL") != -1) {
return;
}
-
+
+ Counter.resetCount();
+
// kick off process instance
ProcessDefinition processDefinition = graphSession.loadProcessDefinition(processDefinitionId);
ProcessInstance processInstance = new ProcessInstance(processDefinition);
@@ -114,7 +110,7 @@
commitAndCloseSession();
try {
EventCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
- assertEquals(2, executionCount);
+ assertEquals(2, Counter.getCount());
waitForJobs(EventCallback.DEFAULT_TIMEOUT);
}
@@ -125,9 +121,10 @@
private void startJobExecutors() {
for (int i = 0; i < jobExecutors.length; i++) {
- jobExecutors[i] = (JobExecutor) JbpmConfiguration.Configs.getObject("jbpm.job.executor");
- jobExecutors[i].setName("JbpmJobExecutor/" + i);
- jobExecutors[i].start();
+ JobExecutor executor = (JobExecutor) JbpmConfiguration.Configs.getObject("jbpm.job.executor");
+ executor.setName(executor.getName() + '/' + i);
+ executor.start();
+ jobExecutors[i] = executor;
}
}
@@ -142,17 +139,27 @@
}
}
- private static synchronized void incrementCount() {
- ++executionCount;
- }
-
public static class Counter implements ActionHandler {
+ private volatile static int count;
+
private static final long serialVersionUID = 1L;
public void execute(ExecutionContext exeContext) throws Exception {
incrementCount();
exeContext.leaveNode();
}
+
+ public static int getCount() {
+ return count;
+ }
+
+ public static void resetCount() {
+ count = 0;
+ }
+
+ private static synchronized void incrementCount() {
+ ++count;
+ }
}
}
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/jbpm983/JBPM983Test.java
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/jbpm983/JBPM983Test.java 2009-02-04 17:22:47 UTC (rev 3778)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/jbpm983/JBPM983Test.java 2009-02-04 20:34:27 UTC (rev 3779)
@@ -148,8 +148,6 @@
ProcessInstance pi = jbpmContext.loadProcessInstance(piId);
assertEquals("end-state-success", pi.getRootToken().getNode().getName());
}
-
- processJobs(30 * 1000);
}
protected void waitFor(long piId) throws Exception {
17 years, 2 months
JBoss JBPM SVN: r3778 - in jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm: graph/exe and 3 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-02-04 12:22:47 -0500 (Wed, 04 Feb 2009)
New Revision: 3778
Modified:
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/context/exe/TokenVariableMap.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/context/exe/VariableInstance.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/Comment.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/ProcessInstance.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/RuntimeAction.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/Token.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/job/Job.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/module/exe/ModuleInstance.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/PooledActor.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml
Log:
JBPM-1953 turn off version checking under SOA-P
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/context/exe/TokenVariableMap.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/context/exe/TokenVariableMap.hbm.xml 2009-02-04 15:58:33 UTC (rev 3777)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/context/exe/TokenVariableMap.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
@@ -8,7 +8,9 @@
<class name="org.jbpm.context.exe.TokenVariableMap"
table="JBPM_TOKENVARIABLEMAP">
<id name="id" column="ID_"><generator class="native" /></id>
+ <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
+ -->
<many-to-one name="token"
column="TOKEN_"
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/context/exe/VariableInstance.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/context/exe/VariableInstance.hbm.xml 2009-02-04 15:58:33 UTC (rev 3777)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/context/exe/VariableInstance.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
@@ -10,7 +10,6 @@
abstract="true"
discriminator-value="V">
<id name="id" column="ID_"><generator class="native" /></id>
- <discriminator type="char" column="CLASS_"/>
<!-- V : org.jbpm.context.exe.VariableInstance -->
<!-- B : org.jbpm.context.exe.variableinstance.ByteArrayInstance -->
<!-- D : org.jbpm.context.exe.variableinstance.DateInstance -->
@@ -21,7 +20,10 @@
<!-- S : org.jbpm.context.exe.variableinstance.StringInstance -->
<!-- N : org.jbpm.context.exe.variableinstance.NullInstance -->
<!-- J : org.jbpm.context.exe.variableinstance.JcrNodeInstance -->
+ <discriminator type="char" column="CLASS_"/>
+ <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
+ -->
<property name="name" column="NAME_"/>
<property name="converter"
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/Comment.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/Comment.hbm.xml 2009-02-04 15:58:33 UTC (rev 3777)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/Comment.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
@@ -7,7 +7,9 @@
<class name="org.jbpm.graph.exe.Comment"
table="JBPM_COMMENT">
<id name="id" column="ID_"><generator class="native" /></id>
+ <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
+ -->
<property name="actorId" column="ACTORID_"/>
<property name="time" column="TIME_"/>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/ProcessInstance.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/ProcessInstance.hbm.xml 2009-02-04 15:58:33 UTC (rev 3777)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/ProcessInstance.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
@@ -7,7 +7,9 @@
<class name="org.jbpm.graph.exe.ProcessInstance"
table="JBPM_PROCESSINSTANCE">
<id name="id" column="ID_"><generator class="native" /></id>
+ <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
+ -->
<property name="key" column="KEY_" index="IDX_PROCIN_KEY" />
<property name="start" column="START_" />
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/RuntimeAction.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/RuntimeAction.hbm.xml 2009-02-04 15:58:33 UTC (rev 3777)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/RuntimeAction.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
@@ -7,7 +7,9 @@
<class name="org.jbpm.graph.exe.RuntimeAction"
table="JBPM_RUNTIMEACTION">
<id name="id" column="ID_"><generator class="native" /></id>
+ <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
+ -->
<property name="eventType" column="EVENTTYPE_"/>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/Token.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/Token.hbm.xml 2009-02-04 15:58:33 UTC (rev 3777)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/exe/Token.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
@@ -7,7 +7,9 @@
<class name="org.jbpm.graph.exe.Token"
table="JBPM_TOKEN">
<id name="id" column="ID_"><generator class="native" /></id>
+ <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
+ -->
<property name="name" column="NAME_"/>
<property name="start" column="START_"/>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/job/Job.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/job/Job.hbm.xml 2009-02-04 15:58:33 UTC (rev 3777)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/job/Job.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
@@ -11,7 +11,9 @@
discriminator-value="J">
<id name="id" column="ID_"><generator class="native" /></id>
<discriminator type="char" column="CLASS_"/>
+ <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
+ -->
<property name="dueDate" column="DUEDATE_" type="timestamp"/>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/module/exe/ModuleInstance.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/module/exe/ModuleInstance.hbm.xml 2009-02-04 15:58:33 UTC (rev 3777)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/module/exe/ModuleInstance.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
@@ -12,7 +12,9 @@
discriminator-value="M">
<id name="id" column="ID_"><generator class="native" /></id>
<discriminator type="char" column="CLASS_"/>
+ <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
+ -->
<!-- M : org.jbpm.module.exe.ModuleInstance -->
<!-- C : org.jbpm.context.exe.ContextInstance -->
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/PooledActor.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/PooledActor.hbm.xml 2009-02-04 15:58:33 UTC (rev 3777)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/PooledActor.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
@@ -9,7 +9,9 @@
<class name="org.jbpm.taskmgmt.exe.PooledActor"
table="JBPM_POOLEDACTOR">
<id name="id" column="ID_"><generator class="native" /></id>
+ <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
+ -->
<property name="actorId" column="ACTORID_" index="IDX_PLDACTR_ACTID"/>
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml 2009-02-04 15:58:33 UTC (rev 3777)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
@@ -9,7 +9,9 @@
<class name="org.jbpm.taskmgmt.exe.SwimlaneInstance"
table="JBPM_SWIMLANEINSTANCE">
<id name="id" column="ID_"><generator class="native" /></id>
+ <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
+ -->
<property name="name" column="NAME_" />
<property name="actorId" column="ACTORID_" />
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml 2009-02-04 15:58:33 UTC (rev 3777)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml 2009-02-04 17:22:47 UTC (rev 3778)
@@ -11,7 +11,9 @@
discriminator-value="T">
<id name="id" column="ID_"><generator class="native" /></id>
<discriminator type="char" column="CLASS_"/>
+ <!-- JBPM-1953 turn off version checking under SOA-P
<version name="version" column="VERSION_" />
+ -->
<property name="name" column="NAME_" />
<property name="description" column="DESCRIPTION_" type="text"/>
17 years, 2 months
JBoss JBPM SVN: r3777 - jbpm4/trunk/modules/pvm/src/main/docs.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-02-04 10:58:33 -0500 (Wed, 04 Feb 2009)
New Revision: 3777
Added:
jbpm4/trunk/modules/pvm/src/main/docs/jobexecutor.ppt
Log:
added job executor docs
Added: jbpm4/trunk/modules/pvm/src/main/docs/jobexecutor.ppt
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/pvm/src/main/docs/jobexecutor.ppt
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 2 months
JBoss JBPM SVN: r3776 - jbpm4/trunk/modules.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-02-04 10:58:13 -0500 (Wed, 04 Feb 2009)
New Revision: 3776
Removed:
jbpm4/trunk/modules/identity/
Log:
removed empty identity module directory
17 years, 2 months
JBoss JBPM SVN: r3775 - in jbpm4/trunk/modules: api/src/main/java/org/jbpm/identity and 7 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-02-04 10:06:02 -0500 (Wed, 04 Feb 2009)
New Revision: 3775
Added:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/IdentityService.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/identity/
jbpm4/trunk/modules/api/src/main/java/org/jbpm/identity/Group.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/identity/User.java
jbpm4/trunk/modules/pvm/src/main/docs/
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateMembership.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindGroupsByUserNameAndGroupType.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/identity/IdentityTest.java
Removed:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/task/Group.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/task/User.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/IdentityService.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/identity/IdentityTest.java
Modified:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessDefinition.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateGroup.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/DeleteGroup.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/GetGroups.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/GetUsers.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/GroupImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/IdentityServiceImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/IdentitySessionImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/UserImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/spi/IdentitySession.java
Log:
JBPM-1993 further work out the identity integration
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/IdentityService.java (from rev 3754, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/IdentityService.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/IdentityService.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/IdentityService.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm;
+
+import java.util.List;
+
+import org.jbpm.identity.Group;
+import org.jbpm.identity.User;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public interface IdentityService {
+
+ void createUser(String userName, String givenName, String familyName);
+ void deleteUser(String userName);
+
+ void createGroup(String groupName, String groupType);
+ void createGroup(String groupName, String groupType, String parentgroupName);
+
+ void createMembership(String userName, String groupName, String groupType, String role);
+
+ List<User> getUsers();
+
+ List<Group> getGroups();
+
+ List<Group> findGroupsByUserAndGroupType(String userName, String groupType);
+}
Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/IdentityService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessDefinition.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessDefinition.java 2009-02-04 13:55:39 UTC (rev 3774)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessDefinition.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -51,7 +51,7 @@
/** automatically assigned during deployment of a process that
* represents the sequence number for process definitions with
- * the same {@link ObservableElement#getId() name}. */
+ * the same {@link ObservableElement#getName() name}. */
int getVersion();
/** the description name given to this process definition.
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/identity/Group.java (from rev 3754, jbpm4/trunk/modules/api/src/main/java/org/jbpm/task/Group.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/identity/Group.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/identity/Group.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.identity;
+
+
+/** a group.
+ *
+ * @author Tom Baeyens
+ */
+public interface Group {
+
+ String TYPE_ORGANISATION_UNIT = "ORGANIZATION_UNIT";
+
+ String getName();
+}
Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/identity/Group.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/identity/User.java (from rev 3754, jbpm4/trunk/modules/api/src/main/java/org/jbpm/task/User.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/identity/User.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/identity/User.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.identity;
+
+
+/** a user
+ * @author Tom Baeyens
+ */
+public interface User {
+
+ String getName();
+
+ String getGivenName();
+ String getFamilyName();
+}
Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/identity/User.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Deleted: jbpm4/trunk/modules/api/src/main/java/org/jbpm/task/Group.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/task/Group.java 2009-02-04 13:55:39 UTC (rev 3774)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/task/Group.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.task;
-
-
-/** a group.
- *
- * @author Tom Baeyens
- */
-public interface Group {
-
- String TYPE_ORGANISATION_UNIT = "ORGANIZATION_UNIT";
-
- String getId();
- String getName();
-}
Deleted: jbpm4/trunk/modules/api/src/main/java/org/jbpm/task/User.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/task/User.java 2009-02-04 13:55:39 UTC (rev 3774)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/task/User.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.task;
-
-
-/** a user
- * @author Tom Baeyens
- */
-public interface User {
-
- String getId();
-
- String getGivenName();
- String getFamilyName();
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/IdentityService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/IdentityService.java 2009-02-04 13:55:39 UTC (rev 3774)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/IdentityService.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.pvm.internal.identity;
-
-import java.util.List;
-
-import org.jbpm.task.Group;
-import org.jbpm.task.User;
-
-
-/**
- * @author Tom Baeyens
- */
-public interface IdentityService {
-
- void createUser(String userId, String givenName, String familyName);
- void deleteUser(String userId);
-
- void createGroup(String groupId, String groupName, String groupType);
- void createGroup(String groupId, String groupName, String groupType, String parentGroupId);
-
- List<User> getUsers();
-
- List<Group> getGroups();
-}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateGroup.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateGroup.java 2009-02-04 13:55:39 UTC (rev 3774)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateGroup.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -33,14 +33,12 @@
private static final long serialVersionUID = 1L;
- protected String groupId;
protected String groupName;
protected String groupType;
protected String parentGroupId;
- public CreateGroup(String groupId, String groupName, String groupType, String parentGroupId) {
- this.groupId = groupId;
+ public CreateGroup(String groupName, String groupType, String parentGroupId) {
this.groupName = groupName;
this.groupType = groupType;
this.parentGroupId = parentGroupId;
@@ -48,7 +46,7 @@
public Void execute(Environment environment) throws Exception {
IdentitySession identitySession = environment.get(IdentitySession.class);
- identitySession.createGroup(groupId, groupName, groupType, parentGroupId);
+ identitySession.createGroup(groupName, groupType, parentGroupId);
return null;
}
}
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateMembership.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateMembership.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateMembership.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.pvm.internal.identity.cmd;
+
+import org.jbpm.cmd.Command;
+import org.jbpm.env.Environment;
+import org.jbpm.pvm.internal.identity.spi.IdentitySession;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class CreateMembership implements Command<Object> {
+
+ private static final long serialVersionUID = 1L;
+
+ protected String userId;
+ protected String groupId;
+ protected String groupType;
+ protected String role;
+
+ public CreateMembership(String userId, String groupId, String groupType, String role) {
+ this.userId = userId;
+ this.groupId = groupId;
+ this.groupType = groupType;
+ this.role = role;
+ }
+
+ public Object execute(Environment environment) throws Exception {
+ IdentitySession identitySession = environment.get(IdentitySession.class);
+ identitySession.createMembership(userId, groupId, groupType, role);
+ return null;
+ }
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateMembership.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/DeleteGroup.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/DeleteGroup.java 2009-02-04 13:55:39 UTC (rev 3774)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/DeleteGroup.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -34,14 +34,16 @@
private static final long serialVersionUID = 1L;
protected String groupId;
+ protected String groupType;
- public DeleteGroup(String groupId) {
+ public DeleteGroup(String groupId, String groupType) {
this.groupId = groupId;
+ this.groupType = groupType;
}
public Void execute(Environment environment) throws Exception {
IdentitySession identitySession = environment.get(IdentitySession.class);
- identitySession.deleteGroup(groupId);
+ identitySession.deleteGroup(groupId, groupType);
return null;
}
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindGroupsByUserNameAndGroupType.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindGroupsByUserNameAndGroupType.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindGroupsByUserNameAndGroupType.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.pvm.internal.identity.cmd;
+
+import java.util.List;
+
+import org.jbpm.cmd.Command;
+import org.jbpm.env.Environment;
+import org.jbpm.identity.Group;
+import org.jbpm.pvm.internal.identity.spi.IdentitySession;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class FindGroupsByUserNameAndGroupType implements Command<List<Group>> {
+
+ private static final long serialVersionUID = 1L;
+
+ protected String userName;
+ protected String groupType;
+
+ public FindGroupsByUserNameAndGroupType(String userName, String groupType) {
+ this.userName = userName;
+ this.groupType = groupType;
+ }
+
+ public List<Group> execute(Environment environment) throws Exception {
+ IdentitySession identitySession = environment.get(IdentitySession.class);
+ return identitySession.findGroupsByUserAndGroupType(userName, groupType);
+ }
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindGroupsByUserNameAndGroupType.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/GetGroups.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/GetGroups.java 2009-02-04 13:55:39 UTC (rev 3774)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/GetGroups.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -25,8 +25,8 @@
import org.jbpm.cmd.Command;
import org.jbpm.env.Environment;
+import org.jbpm.identity.Group;
import org.jbpm.pvm.internal.identity.spi.IdentitySession;
-import org.jbpm.task.Group;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/GetUsers.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/GetUsers.java 2009-02-04 13:55:39 UTC (rev 3774)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/GetUsers.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -25,8 +25,8 @@
import org.jbpm.cmd.Command;
import org.jbpm.env.Environment;
+import org.jbpm.identity.User;
import org.jbpm.pvm.internal.identity.spi.IdentitySession;
-import org.jbpm.task.User;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/GroupImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/GroupImpl.java 2009-02-04 13:55:39 UTC (rev 3774)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/GroupImpl.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -23,7 +23,7 @@
import java.io.Serializable;
-import org.jbpm.task.Group;
+import org.jbpm.identity.Group;
/**
@@ -33,17 +33,12 @@
private static final long serialVersionUID = 1L;
- protected String id;
protected String name;
- public GroupImpl(String id, String name) {
- this.id = id;
+ public GroupImpl(String name) {
this.name = name;
}
- public String getId() {
- return id;
- }
public String getName() {
return name;
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/IdentityServiceImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/IdentityServiceImpl.java 2009-02-04 13:55:39 UTC (rev 3774)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/IdentityServiceImpl.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -23,16 +23,18 @@
import java.util.List;
+import org.jbpm.IdentityService;
import org.jbpm.cmd.CommandService;
-import org.jbpm.pvm.internal.identity.IdentityService;
+import org.jbpm.identity.Group;
+import org.jbpm.identity.User;
import org.jbpm.pvm.internal.identity.cmd.CreateGroup;
+import org.jbpm.pvm.internal.identity.cmd.CreateMembership;
import org.jbpm.pvm.internal.identity.cmd.CreateUser;
import org.jbpm.pvm.internal.identity.cmd.DeleteGroup;
import org.jbpm.pvm.internal.identity.cmd.DeleteUser;
+import org.jbpm.pvm.internal.identity.cmd.FindGroupsByUserNameAndGroupType;
import org.jbpm.pvm.internal.identity.cmd.GetGroups;
import org.jbpm.pvm.internal.identity.cmd.GetUsers;
-import org.jbpm.task.Group;
-import org.jbpm.task.User;
/**
@@ -50,23 +52,31 @@
return commandService.execute(new GetUsers());
}
- public void createUser(String userId, String givenName, String familyName) {
- commandService.execute(new CreateUser(userId, givenName, familyName));
+ public void createUser(String userName, String givenName, String familyName) {
+ commandService.execute(new CreateUser(userName, givenName, familyName));
}
- public void createGroup(String groupId, String groupName, String groupType) {
- commandService.execute(new CreateGroup(groupId, groupName, groupType, null));
+ public void createGroup(String groupName, String groupType) {
+ commandService.execute(new CreateGroup(groupName, groupType, null));
}
- public void createGroup(String groupId, String groupName, String groupType, String parentGroupId) {
- commandService.execute(new CreateGroup(groupId, groupName, groupType, parentGroupId));
+ public void createGroup(String groupName, String groupType, String parentGroupName) {
+ commandService.execute(new CreateGroup(groupName, groupType, parentGroupName));
}
- public void deleteUser(String userId) {
- commandService.execute(new DeleteUser(userId));
+ public void deleteUser(String userName) {
+ commandService.execute(new DeleteUser(userName));
}
- public void deleteGroup(String groupId) {
- commandService.execute(new DeleteGroup(groupId));
+ public void deleteGroup(String groupName, String groupType) {
+ commandService.execute(new DeleteGroup(groupName, groupType));
}
+
+ public void createMembership(String userName, String groupName, String groupType, String role) {
+ commandService.execute(new CreateMembership(userName, groupName, groupType, role));
+ }
+
+ public List<Group> findGroupsByUserAndGroupType(String userName, String groupType) {
+ return commandService.execute(new FindGroupsByUserNameAndGroupType(userName, groupType));
+ }
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/IdentitySessionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/IdentitySessionImpl.java 2009-02-04 13:55:39 UTC (rev 3774)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/IdentitySessionImpl.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -23,6 +23,7 @@
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.List;
import org.jboss.identity.idm.api.Attribute;
@@ -31,6 +32,8 @@
import org.jboss.identity.idm.api.Identity;
import org.jboss.identity.idm.api.IdentitySearchControl;
import org.jboss.identity.idm.api.IdentitySession;
+import org.jboss.identity.idm.api.Role;
+import org.jboss.identity.idm.api.RoleType;
import org.jboss.identity.idm.exception.IdentityException;
import org.jboss.identity.idm.impl.api.NameFilterSearchControl;
import org.jboss.identity.idm.impl.api.SimpleAttribute;
@@ -38,9 +41,9 @@
import org.jboss.identity.idm.p3p.P3PConstants;
import org.jbpm.JbpmException;
import org.jbpm.env.Environment;
+import org.jbpm.identity.Group;
+import org.jbpm.identity.User;
import org.jbpm.pvm.internal.tx.StandardTransaction;
-import org.jbpm.task.Group;
-import org.jbpm.task.User;
/**
@@ -58,16 +61,16 @@
transaction.enlistResource(identitySessionResource);
}
- public void createUser(String userId, String givenName, String lastName) {
+ public void createUser(String userName, String givenName, String lastName) {
try {
- Identity identity = identitySession.getPersistenceManager().createIdentity(userId);
+ Identity identity = identitySession.getPersistenceManager().createIdentity(userName);
Attribute[] attributes = new Attribute[] {
new SimpleAttribute(P3PConstants.INFO_USER_NAME_GIVEN, new String[] { givenName }),
new SimpleAttribute(P3PConstants.INFO_USER_NAME_FAMILY, new String[] { lastName })
};
identitySession.getAttributesManager().addAttributes(identity, attributes);
} catch (IdentityException e) {
- throw new JbpmException("couldn't create user "+userId, e);
+ throw new JbpmException("couldn't create user "+userName, e);
}
}
@@ -94,64 +97,53 @@
}
}
- public void deleteUser(String userId) {
+ public void deleteUser(String userName) {
try {
- Collection<org.jboss.identity.idm.api.Identity> identities = identitySession
- .getPersistenceManager()
- .findIdentity(new IdentitySearchControl[]{
- new NameFilterSearchControl(userId)
- } );
+ org.jboss.identity.idm.api.Identity identity = findIdentity(userName);
- if ( (identities==null) || (identities.size()==0) ) {
+ if (identity==null) {
return;
}
- org.jboss.identity.idm.api.Identity identity = identities.iterator().next();
-
identitySession
.getPersistenceManager()
.removeIdentity(identity, true);
} catch (IdentityException e) {
- throw new JbpmException("couldn't delete group "+userId, e);
+ throw new JbpmException("couldn't delete group "+userName, e);
}
}
-
- public void createGroup(String groupId, String groupName, String groupType, String parentGroupId) {
+ public void createGroup(String groupName, String groupType, String parentGroupName) {
try {
- GroupType groupIdType = new SimpleGroupType(groupType);
- org.jboss.identity.idm.api.Group group = identitySession.getPersistenceManager().createGroup(groupId, groupIdType);
+ GroupType simpleGroupType = new SimpleGroupType(groupType);
+ org.jboss.identity.idm.api.Group group = identitySession.getPersistenceManager().createGroup(groupName, simpleGroupType);
- org.jboss.identity.idm.api.Group parentGroup = null;
- if (parentGroupId!=null) {
- parentGroup = identitySession.getPersistenceManager().findGroup(parentGroupId, groupIdType);
+ if (parentGroupName!=null) {
+ org.jboss.identity.idm.api.Group parentGroup = findGroup(parentGroupName, groupType);
+ if (parentGroup==null) {
+ throw new JbpmException("parent group "+parentGroupName+" doesn't exist");
+ }
identitySession.getRelationshipManager().associateGroups(parentGroup, group);
}
- Attribute[] attributes = new Attribute[] {
- new SimpleAttribute(P3PConstants.INFO_USER_NAME_GIVEN, new String[] { groupName })
- };
- identitySession.getAttributesManager().addAttributes(group, attributes);
-
} catch (IdentityException e) {
- throw new JbpmException("couldn't create group "+groupId, e);
+ throw new JbpmException("couldn't create group "+groupName, e);
}
}
public List<Group> getGroups(String groupType) {
try {
- GroupType groupIdType = new SimpleGroupType(groupType);
+ GroupType simpleGroupType = new SimpleGroupType(groupType);
Collection<org.jboss.identity.idm.api.Group> idGroups = identitySession
.getPersistenceManager()
- .findGroup(groupIdType);
+ .findGroup(simpleGroupType);
List<Group> groups = new ArrayList<Group>();
for (org.jboss.identity.idm.api.Group idGroup: idGroups) {
- String name = idGroup.getName();
- String groupName = getAttributeString(idGroup, P3PConstants.INFO_USER_NAME_GIVEN);
-
- GroupImpl group = new GroupImpl(name, groupName);
+ String groupName = idGroup.getName();
+
+ GroupImpl group = new GroupImpl(groupName);
groups.add(group);
}
@@ -162,37 +154,112 @@
}
}
- public void deleteGroup(String groupId) {
+ public void deleteGroup(String groupName, String groupType) {
try {
- GroupType groupIdType = new SimpleGroupType(groupId);
-
- Collection<org.jboss.identity.idm.api.Group> groups = identitySession
- .getPersistenceManager()
- .findGroup(groupIdType, new IdentitySearchControl[]{
- new NameFilterSearchControl(groupId)
- } );
-
- if ( (groups==null) || (groups.size()==0) ) {
+ org.jboss.identity.idm.api.Group group = findGroup(groupName, groupType);
+
+ if (group==null) {
return;
}
-
- org.jboss.identity.idm.api.Group group = groups.iterator().next();
-
+
identitySession
.getPersistenceManager()
.removeGroup(group, true);
} catch (IdentityException e) {
- throw new JbpmException("couldn't delete group "+groupId, e);
+ throw new JbpmException("couldn't delete group "+groupName, e);
}
}
+ public void createMembership(String userName, String groupName, String groupType, String role) {
+ try {
+ org.jboss.identity.idm.api.Group group = findGroup(groupName, groupType);
+ if (group==null) {
+ throw new JbpmException("group "+groupName+" doesn't exist");
+ }
+ org.jboss.identity.idm.api.Identity identity = findIdentity(userName);
+ if (identity==null) {
+ throw new JbpmException("user "+userName+" doesn't exist");
+ }
+
+
+ if (role!=null) {
+ RoleType roleType = identitySession.getRoleManager().getRoleType(role);
+ if (roleType==null) {
+ roleType = identitySession.getRoleManager().createRoleType(role);
+ }
+
+ identitySession.getRoleManager().createRole(roleType, identity, group);
+
+ } else {
+ identitySession.getRelationshipManager().associateIdentities(group, identity);
+ }
+
+ } catch (Exception e) {
+ throw new JbpmException("couldn't create membership "+userName+", "+groupName+", "+role, e);
+ }
+ }
+ public List<Group> findGroupsByUserAndGroupType(String userName, String groupType) {
+ try {
+ org.jboss.identity.idm.api.Identity identity = findIdentity(userName);
+ if (identity==null) {
+ return Collections.EMPTY_LIST;
+ }
+
+ List<Group> groups = new ArrayList<Group>();
+
+ GroupType identityGroupType = new SimpleGroupType(groupType);
+ Collection<org.jboss.identity.idm.api.Group> identityGroups = identitySession.getRelationshipManager().findAssociatedGroups(identity, identityGroupType);
+
+ for (org.jboss.identity.idm.api.Group identityGroup: identityGroups) {
+ String groupName = identityGroup.getName();
+ GroupImpl group = new GroupImpl(groupName);
+ groups.add(group);
+ }
+
+ return groups;
+
+ } catch (Exception e) {
+ throw new JbpmException("couldn't get groups for user "+userName+" and groupType "+groupType, e);
+ }
+ }
+
+ protected org.jboss.identity.idm.api.Identity findIdentity(String userName) throws IdentityException {
+ Collection<org.jboss.identity.idm.api.Identity> identities = identitySession
+ .getPersistenceManager()
+ .findIdentity(new IdentitySearchControl[]{
+ new NameFilterSearchControl(userName)
+ } );
+
+ if ( (identities==null) || (identities.size()==0) ) {
+ return null;
+ }
+
+ return identities.iterator().next();
+ }
+
+ protected org.jboss.identity.idm.api.Group findGroup(String groupName, String groupType) throws IdentityException {
+ GroupType groupIdType = new SimpleGroupType(groupType);
+
+ Collection<org.jboss.identity.idm.api.Group> groups = identitySession
+ .getPersistenceManager()
+ .findGroup(groupIdType, new IdentitySearchControl[]{
+ new NameFilterSearchControl(groupName)
+ } );
+
+ if ( (groups==null) || (groups.size()==0) ) {
+ return null;
+ }
+
+ return groups.iterator().next();
+ }
+
protected String getAttributeString(Identity identity, String attributeName) throws IdentityException {
return getAttributeString(identity, null, attributeName);
}
-
+
protected String getAttributeString(org.jboss.identity.idm.api.Group idGroup, String attributeName) throws IdentityException {
return getAttributeString(null, idGroup, attributeName);
}
@@ -210,7 +277,8 @@
}
return null;
}
-
+
+
public IdentitySession getIdentitySession() {
return identitySession;
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/UserImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/UserImpl.java 2009-02-04 13:55:39 UTC (rev 3774)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/UserImpl.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -23,7 +23,7 @@
import java.io.Serializable;
-import org.jbpm.task.User;
+import org.jbpm.identity.User;
/**
@@ -33,18 +33,18 @@
private static final long serialVersionUID = 1L;
- protected String id;
+ protected String name;
protected String givenName;
protected String familyName;
- public UserImpl(String id, String givenName, String familyName) {
- this.id = id;
+ public UserImpl(String name, String givenName, String familyName) {
+ this.name = name;
this.givenName = givenName;
this.familyName = familyName;
}
- public String getId() {
- return id;
+ public String getName() {
+ return name;
}
public String getGivenName() {
return givenName;
@@ -59,6 +59,6 @@
) {
return givenName+" "+familyName;
}
- return id;
+ return name;
}
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/spi/IdentitySession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/spi/IdentitySession.java 2009-02-04 13:55:39 UTC (rev 3774)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/spi/IdentitySession.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -23,8 +23,8 @@
import java.util.List;
-import org.jbpm.task.Group;
-import org.jbpm.task.User;
+import org.jbpm.identity.Group;
+import org.jbpm.identity.User;
/**
@@ -32,11 +32,15 @@
*/
public interface IdentitySession {
- void createUser(String userId, String givenName, String familyName);
+ void createUser(String userName, String givenName, String familyName);
List<User> getUsers();
- void deleteUser(String userId);
+ void deleteUser(String userName);
- void createGroup(String groupId, String groupName, String groupType, String parentGroupId);
+ void createGroup(String groupName, String groupType, String parentGroupName);
List<Group> getGroups(String groupType);
- void deleteGroup(String groupId);
+ void deleteGroup(String groupName, String groupType);
+
+ void createMembership(String userName, String groupName, String groupType, String role);
+
+ List<Group> findGroupsByUserAndGroupType(String userName, String groupType);
}
Deleted: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/identity/IdentityTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/identity/IdentityTest.java 2009-02-04 13:55:39 UTC (rev 3774)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/identity/IdentityTest.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -1,66 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.jbpm.pvm.internal.identity;
-
-import java.util.List;
-
-import org.jbpm.task.Group;
-import org.jbpm.task.User;
-import org.jbpm.test.DbTestCase;
-
-
-/**
- * @author Tom Baeyens
- */
-public class IdentityTest extends DbTestCase {
-
- public void testSingleUser() throws Exception {
- IdentityService identityService = processEngine.get(IdentityService.class);
-
- identityService.createUser("johndoe", "John", "Doe");
-
- List<User> users = identityService.getUsers();
- assertNotNull(users);
- assertEquals(1, users.size());
-
- User johndoe = users.get(0);
- assertEquals("johndoe", johndoe.getId());
- assertEquals("John", johndoe.getGivenName());
- assertEquals("Doe", johndoe.getFamilyName());
- assertEquals("John Doe", johndoe.toString());
-
- identityService.deleteUser("johndoe");
-
- assertEquals(0, identityService.getUsers().size());
- }
-
- public void testSingleGroup() throws Exception {
- IdentityService identityService = processEngine.get(IdentityService.class);
-
- identityService.createUser("johndoe", "John", "Doe");
- identityService.createUser("joesmoe", "Joe", "Smoe");
-
- identityService.createGroup("redhat", "Red Hat", Group.TYPE_ORGANISATION_UNIT);
- identityService.createGroup("jboss", "JBoss", Group.TYPE_ORGANISATION_UNIT, "redhat");
- identityService.createGroup("jbpm", "jBPM", Group.TYPE_ORGANISATION_UNIT, "jboss");
- }
-}
Added: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/identity/IdentityTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/identity/IdentityTest.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/identity/IdentityTest.java 2009-02-04 15:06:02 UTC (rev 3775)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.pvm.internal.identity;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.jbpm.IdentityService;
+import org.jbpm.identity.Group;
+import org.jbpm.identity.User;
+import org.jbpm.test.DbTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class IdentityTest extends DbTestCase {
+
+ public void testSingleUser() throws Exception {
+ IdentityService identityService = processEngine.get(IdentityService.class);
+
+ identityService.createUser("johndoe", "John", "Doe");
+
+ List<User> users = identityService.getUsers();
+ assertNotNull(users);
+ assertEquals(1, users.size());
+
+ User johndoe = users.get(0);
+ assertEquals("johndoe", johndoe.getName());
+ assertEquals("John", johndoe.getGivenName());
+ assertEquals("Doe", johndoe.getFamilyName());
+ assertEquals("John Doe", johndoe.toString());
+
+ identityService.deleteUser("johndoe");
+
+ assertEquals(0, identityService.getUsers().size());
+ }
+
+ public void testSingleGroup() throws Exception {
+ IdentityService identityService = processEngine.get(IdentityService.class);
+
+ identityService.createUser("johndoe", "John", "Doe");
+ identityService.createUser("joesmoe", "Joe", "Smoe");
+ identityService.createUser("jackblack", "Jack", "Black");
+
+ identityService.createGroup("redhat", Group.TYPE_ORGANISATION_UNIT);
+ identityService.createGroup("jboss", Group.TYPE_ORGANISATION_UNIT, "redhat");
+ identityService.createGroup("jbpm", Group.TYPE_ORGANISATION_UNIT, "jboss");
+
+ identityService.createMembership("johndoe", "jbpm", Group.TYPE_ORGANISATION_UNIT, "developer");
+ identityService.createMembership("joesmoe", "jbpm", Group.TYPE_ORGANISATION_UNIT, "developer");
+ identityService.createMembership("jackblack", "jboss", Group.TYPE_ORGANISATION_UNIT, "manager");
+
+ List<Group> groups = identityService.findGroupsByUserAndGroupType("jackblack", Group.TYPE_ORGANISATION_UNIT);
+
+ // assertEquals(1, groups.size());
+ // Group group = groups.get(0);
+ // assertEquals("jboss", group.getName());
+ }
+}
Property changes on: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/identity/IdentityTest.java
___________________________________________________________________
Name: svn:mergeinfo
+
17 years, 2 months
JBoss JBPM SVN: r3774 - jbpm4/trunk/hudson/jboss/bin.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-04 08:55:39 -0500 (Wed, 04 Feb 2009)
New Revision: 3774
Modified:
jbpm4/trunk/hudson/jboss/bin/http-spider.sh
Log:
More bash tricks
Modified: jbpm4/trunk/hudson/jboss/bin/http-spider.sh
===================================================================
--- jbpm4/trunk/hudson/jboss/bin/http-spider.sh 2009-02-04 13:46:11 UTC (rev 3773)
+++ jbpm4/trunk/hudson/jboss/bin/http-spider.sh 2009-02-04 13:55:39 UTC (rev 3774)
@@ -45,10 +45,8 @@
done
else
echo "$WGET can not be found, exiting"
- exit 1
fi
-
touch $2/spider.failed
echo "Unable to connect to $1, exiting..." > spider.failed
exit 0
17 years, 2 months
JBoss JBPM SVN: r3773 - jbpm4/trunk/hudson/jboss/bin.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-04 08:46:11 -0500 (Wed, 04 Feb 2009)
New Revision: 3773
Modified:
jbpm4/trunk/hudson/jboss/bin/http-spider.sh
Log:
Better pre-requisite checking on wget
Modified: jbpm4/trunk/hudson/jboss/bin/http-spider.sh
===================================================================
--- jbpm4/trunk/hudson/jboss/bin/http-spider.sh 2009-02-04 12:49:32 UTC (rev 3772)
+++ jbpm4/trunk/hudson/jboss/bin/http-spider.sh 2009-02-04 13:46:11 UTC (rev 3773)
@@ -14,10 +14,12 @@
#
#############################################################
-TIMEOUT=2 # wget timeout in sec
-SLEEP_TIME=10 # the actual sleep time in between test
-NUM_RETRIES=18 # equals 180 seconds before exit
+TIMEOUT=2 # wget timeout in sec
+SLEEP_TIME=10 # the actual sleep time in between test
+NUM_RETRIES=18 # equals 180 seconds before exit
+WGET="/usr/bin/wget" # the default unix wget location
+
if [ "x$1" = "x" -o "x$2" = "x" ]; then
echo "Usage: http-spider.sh <hostname:port> <output_dir>"
fi
@@ -28,22 +30,25 @@
echo "Check HTTP connection on $1"
-which wget > /dev/null
-if [ $? -eq 0 ]; then
- COUNTER=0
- while [ $COUNTER -lt $NUM_RETRIES ]; do
- if wget --spider --timeout=$TIMEOUT --tries=1 $1 &> /dev/null; then
- touch $2/spider.success
- echo "Try $COUNTER: '$1' is available" > ./spider.success
- exit 0
- else
- echo "Try $COUNTER: '$1' does not respond, wait another $SLEEP_TIME seconds"
- fi
- sleep $SLEEP_TIME
- let COUNTER=COUNTER+1
- done
+if [ -b $WGET ]; then
+ COUNTER=0
+ while [ $COUNTER -lt $NUM_RETRIES ]; do
+ if wget --spider --timeout=$TIMEOUT --tries=1 $1 &> /dev/null; then
+ touch $2/spider.success
+ echo "Try $COUNTER: '$1' is available" > ./spider.success
+ exit 0
+ else
+ echo "Try $COUNTER: '$1' does not respond, wait another $SLEEP_TIME seconds"
+ fi
+ sleep $SLEEP_TIME
+ let COUNTER=COUNTER+1
+ done
+else
+ echo "$WGET can not be found, exiting"
+ exit 1
fi
+
touch $2/spider.failed
echo "Unable to connect to $1, exiting..." > spider.failed
exit 0
17 years, 2 months
JBoss JBPM SVN: r3772 - jbpm4/trunk/hudson/jboss/bin.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-04 07:49:32 -0500 (Wed, 04 Feb 2009)
New Revision: 3772
Modified:
jbpm4/trunk/hudson/jboss/bin/http-spider.sh
jbpm4/trunk/hudson/jboss/bin/jboss.sh
Log:
Debug shell scripts
Modified: jbpm4/trunk/hudson/jboss/bin/http-spider.sh
===================================================================
--- jbpm4/trunk/hudson/jboss/bin/http-spider.sh 2009-02-04 12:20:19 UTC (rev 3771)
+++ jbpm4/trunk/hudson/jboss/bin/http-spider.sh 2009-02-04 12:49:32 UTC (rev 3772)
@@ -26,6 +26,8 @@
rm $2/spider.success 2&>1 /dev/null
rm $2/spider.failed 2&>1 /dev/null
+echo "Check HTTP connection on $1"
+
which wget > /dev/null
if [ $? -eq 0 ]; then
COUNTER=0
Modified: jbpm4/trunk/hudson/jboss/bin/jboss.sh
===================================================================
--- jbpm4/trunk/hudson/jboss/bin/jboss.sh 2009-02-04 12:20:19 UTC (rev 3771)
+++ jbpm4/trunk/hudson/jboss/bin/jboss.sh 2009-02-04 12:49:32 UTC (rev 3772)
@@ -25,7 +25,7 @@
# This version of run.sh obtains the pid of the JVM and saves it as jboss.pid
# It relies on bash specific features
# Do you want to hide jboss output?
- echo "Starting jboss with on address: $BINDADDR"
+ echo "Starting jboss w. bind address: $BINDADDR"
/bin/bash $DIRNAME/runjboss.sh -b $BINDADDR &
;;
stop)
17 years, 2 months
JBoss JBPM SVN: r3771 - in jbpm4/trunk/hudson: jboss/bin and 1 other directory.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-04 07:20:19 -0500 (Wed, 04 Feb 2009)
New Revision: 3771
Modified:
jbpm4/trunk/hudson/hudson-home/command.sh
jbpm4/trunk/hudson/jboss/bin/jboss.sh
Log:
Increase bash script verbositiy
Modified: jbpm4/trunk/hudson/hudson-home/command.sh
===================================================================
--- jbpm4/trunk/hudson/hudson-home/command.sh 2009-02-04 11:32:03 UTC (rev 3770)
+++ jbpm4/trunk/hudson/hudson-home/command.sh 2009-02-04 12:20:19 UTC (rev 3771)
@@ -66,10 +66,11 @@
rm $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/hibernate.cfg.xml
cp $JBOSS_HOME/docs/examples/jbpm/jbpm-$DATABASE-ds.xml $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-$DATABASE-ds.xml
cp $JBOSS_HOME/docs/examples/jbpm/hibernate.cfg.$DATABASE.xml $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/hibernate.cfg.xml
-if [ $CONTAINER = "jboss500" ]; then
- rm $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/slf4j-api.jar
-fi
+#if [ $CONTAINER = "jboss500" ]; then
+# rm $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/slf4j-api.jar
+#fi
+
# FIXME: find out whether jTDS can be made to work with XA data source
# https://jira.jboss.org/jira/browse/JBPM-1818
SYBASE_JDBC_DRIVER=~/.m2/repository/com/sybase/jconnect/6.0.5/jconnect-6.0.5.jar
Modified: jbpm4/trunk/hudson/jboss/bin/jboss.sh
===================================================================
--- jbpm4/trunk/hudson/jboss/bin/jboss.sh 2009-02-04 11:32:03 UTC (rev 3770)
+++ jbpm4/trunk/hudson/jboss/bin/jboss.sh 2009-02-04 12:20:19 UTC (rev 3771)
@@ -25,6 +25,7 @@
# This version of run.sh obtains the pid of the JVM and saves it as jboss.pid
# It relies on bash specific features
# Do you want to hide jboss output?
+ echo "Starting jboss with on address: $BINDADDR"
/bin/bash $DIRNAME/runjboss.sh -b $BINDADDR &
;;
stop)
17 years, 2 months
JBoss JBPM SVN: r3770 - jbpm4/trunk/hudson/jboss/bin.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-04 06:32:03 -0500 (Wed, 04 Feb 2009)
New Revision: 3770
Modified:
jbpm4/trunk/hudson/jboss/bin/runjboss.sh
Log:
Respect platform specific settings (cygwin & Mac OS)
Modified: jbpm4/trunk/hudson/jboss/bin/runjboss.sh
===================================================================
--- jbpm4/trunk/hudson/jboss/bin/runjboss.sh 2009-02-04 11:19:31 UTC (rev 3769)
+++ jbpm4/trunk/hudson/jboss/bin/runjboss.sh 2009-02-04 11:32:03 UTC (rev 3770)
@@ -29,6 +29,34 @@
exit 1
}
+# OS specific support (must be 'true' or 'false').
+cygwin=false;
+darwin=false;
+linux=false;
+case "`uname`" in
+ CYGWIN*)
+ cygwin=true
+ ;;
+
+ Darwin*)
+ darwin=true
+ ;;
+
+ Linux)
+ linux=true
+ ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$JBOSS_HOME" ] &&
+ JBOSS_HOME=`cygpath --unix "$JBOSS_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$JAVAC_JAR" ] &&
+ JAVAC_JAR=`cygpath --unix "$JAVAC_JAR"`
+fi
+
# Setup JBOSS_HOME
if [ "x$JBOSS_HOME" = "x" ]; then
# get the full path (without any relative bits)
@@ -60,14 +88,21 @@
fi
JBOSS_BOOT_CLASSPATH="$runjar"
-# Include the JDK javac compiler for JSP pages. The default is for a Sun JDK
+# Tomcat uses the JDT Compiler
+# Only include tools.jar if someone wants to use the JDK instead.
# compatible distribution which JAVA_HOME points to
if [ "x$JAVAC_JAR" = "x" ]; then
- JAVAC_JAR="$JAVA_HOME/lib/tools.jar"
+ JAVAC_JAR_FILE="$JAVA_HOME/lib/tools.jar"
+else
+ JAVAC_JAR_FILE="$JAVAC_JAR"
fi
-if [ ! -f "$JAVAC_JAR" ]; then
- warn "Missing file: $JAVAC_JAR"
- warn "Unexpected results may occur. Make sure JAVA_HOME points to a JDK and not a JRE."
+if [ ! -f "$JAVAC_JAR_FILE" ]; then
+ # MacOSX does not have a seperate tools.jar
+ if [ "$darwin" != "true" -a "x$JAVAC_JAR" != "x" ]; then
+ warn "Missing file: JAVAC_JAR=$JAVAC_JAR"
+ warn "Unexpected results may occur."
+ fi
+ JAVAC_JAR_FILE=
fi
if [ "x$JBOSS_CLASSPATH" = "x" ]; then
17 years, 2 months