Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
开发团队
Flowable Engine
提交
49ec078f
F
Flowable Engine
项目概览
开发团队
/
Flowable Engine
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Flowable Engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
49ec078f
编写于
6月 05, 2013
作者:
J
Joram Barrez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ACT-1696: cleanup
上级
9f32fcac
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
142 addition
and
12 deletion
+142
-12
modules/activiti-engine/src/main/java/org/activiti/engine/impl/cfg/ProcessEngineConfigurationImpl.java
...iviti/engine/impl/cfg/ProcessEngineConfigurationImpl.java
+2
-1
modules/activiti-engine/src/main/java/org/activiti/engine/impl/cmd/CreateMembershipCmd.java
...ava/org/activiti/engine/impl/cmd/CreateMembershipCmd.java
+1
-1
modules/activiti-engine/src/main/java/org/activiti/engine/impl/cmd/DeleteMembershipCmd.java
...ava/org/activiti/engine/impl/cmd/DeleteMembershipCmd.java
+1
-1
modules/activiti-engine/src/main/java/org/activiti/engine/impl/interceptor/CommandContext.java
.../org/activiti/engine/impl/interceptor/CommandContext.java
+3
-5
modules/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/AbstractManager.java
...org/activiti/engine/impl/persistence/AbstractManager.java
+3
-4
modules/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/MembershipEntityManagerFactory.java
...gine/impl/persistence/MembershipEntityManagerFactory.java
+34
-0
modules/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/entity/MembershipIdentityManager.java
...ne/impl/persistence/entity/MembershipIdentityManager.java
+27
-0
modules/activiti-ldap/pom.xml
modules/activiti-ldap/pom.xml
+9
-0
modules/activiti-ldap/src/main/java/org/activiti/ldap/LDAPConfigurator.java
...dap/src/main/java/org/activiti/ldap/LDAPConfigurator.java
+14
-0
modules/activiti-ldap/src/main/java/org/activiti/ldap/LDAPMembershipManagerFactory.java
.../java/org/activiti/ldap/LDAPMembershipManagerFactory.java
+48
-0
未找到文件。
modules/activiti-engine/src/main/java/org/activiti/engine/impl/cfg/ProcessEngineConfigurationImpl.java
浏览文件 @
49ec078f
...
...
@@ -137,6 +137,7 @@ import org.activiti.engine.impl.jobexecutor.TimerStartEventJobHandler;
import
org.activiti.engine.impl.jobexecutor.TimerSuspendProcessDefinitionHandler
;
import
org.activiti.engine.impl.persistence.GenericManagerFactory
;
import
org.activiti.engine.impl.persistence.GroupEntityManagerFactory
;
import
org.activiti.engine.impl.persistence.MembershipEntityManagerFactory
;
import
org.activiti.engine.impl.persistence.UserEntityManagerFactory
;
import
org.activiti.engine.impl.persistence.deploy.DefaultDeploymentCache
;
import
org.activiti.engine.impl.persistence.deploy.Deployer
;
...
...
@@ -711,7 +712,7 @@ public abstract class ProcessEngineConfigurationImpl extends ProcessEngineConfig
addSessionFactory
(
new
UserEntityManagerFactory
());
addSessionFactory
(
new
GroupEntityManagerFactory
());
addSessionFactory
(
new
GenericManagerFactory
(
MembershipEntityManager
.
class
));
addSessionFactory
(
new
MembershipEntityManagerFactory
(
));
}
if
(
customSessionFactories
!=
null
)
{
...
...
modules/activiti-engine/src/main/java/org/activiti/engine/impl/cmd/CreateMembershipCmd.java
浏览文件 @
49ec078f
...
...
@@ -42,7 +42,7 @@ public class CreateMembershipCmd implements Command<Object>, Serializable {
throw
new
ActivitiIllegalArgumentException
(
"groupId is null"
);
}
commandContext
.
getMembership
E
ntityManager
()
.
getMembership
Ide
ntityManager
()
.
createMembership
(
userId
,
groupId
);
return
null
;
}
...
...
modules/activiti-engine/src/main/java/org/activiti/engine/impl/cmd/DeleteMembershipCmd.java
浏览文件 @
49ec078f
...
...
@@ -42,7 +42,7 @@ public class DeleteMembershipCmd implements Command<Void>, Serializable {
}
commandContext
.
getMembership
E
ntityManager
()
.
getMembership
Ide
ntityManager
()
.
deleteMembership
(
userId
,
groupId
);
return
null
;
...
...
modules/activiti-engine/src/main/java/org/activiti/engine/impl/interceptor/CommandContext.java
浏览文件 @
49ec078f
...
...
@@ -32,7 +32,6 @@ import org.activiti.engine.impl.persistence.entity.CommentEntityManager;
import
org.activiti.engine.impl.persistence.entity.DeploymentEntityManager
;
import
org.activiti.engine.impl.persistence.entity.EventSubscriptionEntityManager
;
import
org.activiti.engine.impl.persistence.entity.ExecutionEntityManager
;
import
org.activiti.engine.impl.persistence.entity.GroupEntityManager
;
import
org.activiti.engine.impl.persistence.entity.GroupIdentityManager
;
import
org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntityManager
;
import
org.activiti.engine.impl.persistence.entity.HistoricDetailEntityManager
;
...
...
@@ -43,14 +42,13 @@ import org.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntit
import
org.activiti.engine.impl.persistence.entity.IdentityInfoEntityManager
;
import
org.activiti.engine.impl.persistence.entity.IdentityLinkEntityManager
;
import
org.activiti.engine.impl.persistence.entity.JobEntityManager
;
import
org.activiti.engine.impl.persistence.entity.Membership
E
ntityManager
;
import
org.activiti.engine.impl.persistence.entity.Membership
Ide
ntityManager
;
import
org.activiti.engine.impl.persistence.entity.ModelEntityManager
;
import
org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntityManager
;
import
org.activiti.engine.impl.persistence.entity.PropertyEntityManager
;
import
org.activiti.engine.impl.persistence.entity.ResourceEntityManager
;
import
org.activiti.engine.impl.persistence.entity.TableDataManager
;
import
org.activiti.engine.impl.persistence.entity.TaskEntityManager
;
import
org.activiti.engine.impl.persistence.entity.UserEntityManager
;
import
org.activiti.engine.impl.persistence.entity.UserIdentityManager
;
import
org.activiti.engine.impl.persistence.entity.VariableInstanceEntityManager
;
import
org.activiti.engine.impl.pvm.runtime.AtomicOperation
;
...
...
@@ -285,8 +283,8 @@ public class CommandContext {
return
getSession
(
IdentityInfoEntityManager
.
class
);
}
public
Membership
EntityManager
getMembershipE
ntityManager
()
{
return
getSession
(
Membership
E
ntityManager
.
class
);
public
Membership
IdentityManager
getMembershipIde
ntityManager
()
{
return
getSession
(
Membership
Ide
ntityManager
.
class
);
}
public
AttachmentEntityManager
getAttachmentEntityManager
()
{
...
...
modules/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/AbstractManager.java
浏览文件 @
49ec078f
...
...
@@ -22,7 +22,6 @@ import org.activiti.engine.impl.persistence.entity.AttachmentEntityManager;
import
org.activiti.engine.impl.persistence.entity.ByteArrayEntityManager
;
import
org.activiti.engine.impl.persistence.entity.DeploymentEntityManager
;
import
org.activiti.engine.impl.persistence.entity.ExecutionEntityManager
;
import
org.activiti.engine.impl.persistence.entity.GroupEntityManager
;
import
org.activiti.engine.impl.persistence.entity.GroupIdentityManager
;
import
org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntityManager
;
import
org.activiti.engine.impl.persistence.entity.HistoricDetailEntityManager
;
...
...
@@ -32,7 +31,7 @@ import org.activiti.engine.impl.persistence.entity.HistoricTaskInstanceEntityMan
import
org.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntityManager
;
import
org.activiti.engine.impl.persistence.entity.IdentityInfoEntityManager
;
import
org.activiti.engine.impl.persistence.entity.IdentityLinkEntityManager
;
import
org.activiti.engine.impl.persistence.entity.Membership
E
ntityManager
;
import
org.activiti.engine.impl.persistence.entity.Membership
Ide
ntityManager
;
import
org.activiti.engine.impl.persistence.entity.ModelEntityManager
;
import
org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntityManager
;
import
org.activiti.engine.impl.persistence.entity.ResourceEntityManager
;
...
...
@@ -135,8 +134,8 @@ public abstract class AbstractManager implements Session {
return
getSession
(
IdentityInfoEntityManager
.
class
);
}
protected
Membership
EntityManager
getMembership
Manager
()
{
return
getSession
(
Membership
E
ntityManager
.
class
);
protected
Membership
IdentityManager
getMembershipIdentity
Manager
()
{
return
getSession
(
Membership
Ide
ntityManager
.
class
);
}
protected
AttachmentEntityManager
getAttachmentManager
()
{
...
...
modules/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/MembershipEntityManagerFactory.java
0 → 100644
浏览文件 @
49ec078f
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.activiti.engine.impl.persistence
;
import
org.activiti.engine.impl.interceptor.Session
;
import
org.activiti.engine.impl.interceptor.SessionFactory
;
import
org.activiti.engine.impl.persistence.entity.MembershipEntityManager
;
import
org.activiti.engine.impl.persistence.entity.MembershipIdentityManager
;
/**
* @author Joram Barrez
*/
public
class
MembershipEntityManagerFactory
implements
SessionFactory
{
public
Class
<
?
>
getSessionType
()
{
return
MembershipIdentityManager
.
class
;
}
public
Session
openSession
()
{
return
new
MembershipEntityManager
();
}
}
modules/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/entity/MembershipIdentityManager.java
0 → 100644
浏览文件 @
49ec078f
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.activiti.engine.impl.persistence.entity
;
/**
* @author Joram Barrez
*/
public
interface
MembershipIdentityManager
{
void
createMembership
(
String
userId
,
String
groupId
);
void
deleteMembership
(
String
userId
,
String
groupId
);
}
modules/activiti-ldap/pom.xml
浏览文件 @
49ec078f
...
...
@@ -21,18 +21,22 @@
<dependency>
<groupId>
org.activiti
</groupId>
<artifactId>
activiti-spring
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-context
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-jdbc
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-tx
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
...
...
@@ -91,11 +95,13 @@
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-core
</artifactId>
<version>
3.1.4.RELEASE
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-config
</artifactId>
<version>
3.1.4.RELEASE
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.ldap
</groupId>
...
...
@@ -107,6 +113,7 @@
<artifactId>
commons-logging
</artifactId>
</exclusion>
</exclusions>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.ldap
</groupId>
...
...
@@ -118,11 +125,13 @@
<artifactId>
commons-logging
</artifactId>
</exclusion>
</exclusions>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-ldap
</artifactId>
<version>
3.1.4.RELEASE
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
...
...
modules/activiti-ldap/src/main/java/org/activiti/ldap/LDAPConfigurator.java
浏览文件 @
49ec078f
...
...
@@ -54,6 +54,7 @@ public class LDAPConfigurator implements ProcessEngineConfigurator {
// Pluggable factories
protected
LDAPUserManagerFactory
ldapUserManagerFactory
;
protected
LDAPGroupManagerFactory
ldapGroupManagerFactory
;
protected
LDAPMembershipManagerFactory
ldapMembershipManagerFactory
;
// Pluggable query helper bean
protected
LDAPQueryBuilder
ldapQueryBuilder
=
new
LDAPQueryBuilder
();
...
...
@@ -64,6 +65,7 @@ public class LDAPConfigurator implements ProcessEngineConfigurator {
LDAPGroupManagerFactory
ldapGroupManagerFactory
=
getLdapGroupManagerFactory
();
processEngineConfiguration
.
getSessionFactories
().
put
(
ldapGroupManagerFactory
.
getSessionType
(),
ldapGroupManagerFactory
);
}
// Can be overwritten for custom factories
...
...
@@ -84,6 +86,14 @@ public class LDAPConfigurator implements ProcessEngineConfigurator {
return
new
LDAPGroupManagerFactory
(
this
);
}
protected
LDAPMembershipManagerFactory
getLdapMembershipManagerFactory
()
{
if
(
this
.
ldapMembershipManagerFactory
!=
null
)
{
this
.
ldapMembershipManagerFactory
.
setLdapConfigurator
(
this
);
}
return
new
LDAPMembershipManagerFactory
(
this
);
}
// Getters and Setters
public
String
getServer
()
{
...
...
@@ -229,6 +239,10 @@ public class LDAPConfigurator implements ProcessEngineConfigurator {
public
void
setLdapGroupManagerFactory
(
LDAPGroupManagerFactory
ldapGroupManagerFactory
)
{
this
.
ldapGroupManagerFactory
=
ldapGroupManagerFactory
;
}
public
void
setLdapMembershipManagerFactory
(
LDAPMembershipManagerFactory
ldapMembershipManagerFactory
)
{
this
.
ldapMembershipManagerFactory
=
ldapMembershipManagerFactory
;
}
public
LDAPQueryBuilder
getLdapQueryBuilder
()
{
return
ldapQueryBuilder
;
...
...
modules/activiti-ldap/src/main/java/org/activiti/ldap/LDAPMembershipManagerFactory.java
0 → 100644
浏览文件 @
49ec078f
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.activiti.ldap
;
import
org.activiti.engine.impl.interceptor.Session
;
import
org.activiti.engine.impl.interceptor.SessionFactory
;
import
org.activiti.engine.impl.persistence.entity.MembershipIdentityManager
;
/**
* @author Joram Barrez
*/
public
class
LDAPMembershipManagerFactory
implements
SessionFactory
{
protected
LDAPConfigurator
ldapConfigurator
;
public
LDAPMembershipManagerFactory
(
LDAPConfigurator
ldapConfigurator
)
{
this
.
ldapConfigurator
=
ldapConfigurator
;
}
@Override
public
Class
<?>
getSessionType
()
{
return
MembershipIdentityManager
.
class
;
}
@Override
public
Session
openSession
()
{
throw
new
UnsupportedOperationException
(
"Memberships are not supported in ldap"
);
}
public
LDAPConfigurator
getLdapConfigurator
()
{
return
ldapConfigurator
;
}
public
void
setLdapConfigurator
(
LDAPConfigurator
ldapConfigurator
)
{
this
.
ldapConfigurator
=
ldapConfigurator
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录