]> git.argeo.org Git - gpl/argeo-slc.git/blob - sandbox/argeo.slc.executionflow/src/main/java/org/argeo/slc/executionflow/ExecutionScope.java
Introduce validation
[gpl/argeo-slc.git] / sandbox / argeo.slc.executionflow / src / main / java / org / argeo / slc / executionflow / ExecutionScope.java
1 package org.argeo.slc.executionflow;
2
3 import org.apache.commons.logging.Log;
4 import org.apache.commons.logging.LogFactory;
5 import org.springframework.beans.factory.ObjectFactory;
6 import org.springframework.beans.factory.config.Scope;
7
8 public class ExecutionScope implements Scope {
9 private final static Log log = LogFactory.getLog(ExecutionScope.class);
10
11 public Object get(String name, ObjectFactory objectFactory) {
12 log.info("Getting bean "+name);
13 ExecutionFlow executionFlow = SimpleExecutionFlow.getCurrentExecutionFlow();
14 Object obj = executionFlow.getAttributes().get(name);
15 log.info("Scoped object "+obj);
16 return obj;
17 }
18
19 public String getConversationId() {
20 ExecutionFlow executionFlow = SimpleExecutionFlow.getCurrentExecutionFlow();
21 return executionFlow.getUuid();
22 }
23
24 public void registerDestructionCallback(String name, Runnable callback) {
25 // TODO Auto-generated method stub
26
27 }
28
29 public Object remove(String name) {
30 // TODO Auto-generated method stub
31 return null;
32 }
33
34 }