1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.syncope.core.flowable.support;
20
21 import org.flowable.common.engine.impl.interceptor.CommandContext;
22 import org.flowable.common.engine.impl.interceptor.Session;
23 import org.flowable.common.engine.impl.interceptor.SessionFactory;
24
25 public class SyncopeSessionFactory implements SessionFactory {
26
27 private SyncopeSession syncopeSession;
28
29 @Override
30 public Class<?> getSessionType() {
31 return syncopeSession.getType();
32 }
33
34 @Override
35 public Session openSession(final CommandContext cc) {
36 return syncopeSession;
37 }
38
39 public SyncopeSession getSyncopeSession() {
40 return syncopeSession;
41 }
42
43 public void setSyncopeSession(final SyncopeSession syncopeSession) {
44 this.syncopeSession = syncopeSession;
45 }
46 }