]>
git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.detached/src/main/java/org/argeo/slc/detached/DetachedContextImpl.java
bdda969b2431bd456f91a1f966a94c2fb785c8ea
2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org
.argeo
.slc
.detached
;
19 import java
.util
.ArrayList
;
20 import java
.util
.List
;
23 import java
.util
.TreeMap
;
24 import java
.util
.Vector
;
26 public class DetachedContextImpl
implements DetachedContext
{
27 private List executedPaths
= new Vector();
28 private String currentPath
;
29 private Map dynamicRefs
= new TreeMap();
31 public String
getCurrentPath() {
35 public void setDynamicRef(String ref
, Object obj
) {
36 dynamicRefs
.put(ref
, obj
);
39 public Object
getDynamicRef(String ref
) {
40 if (dynamicRefs
.containsKey(ref
))
41 return dynamicRefs
.get(ref
);
46 public List
getExecutedPaths() {
47 return new ArrayList(executedPaths
);
50 public String
toString() {
51 StringBuffer buf
= new StringBuffer(getClass().getName());
52 buf
.append(" currentPath=").append(currentPath
);
53 buf
.append(" executedPaths=").append(executedPaths
);
54 return buf
.toString();
57 public Set
getDynamicRefKeys() {
58 return dynamicRefs
.keySet();