]>
git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.detached/src/main/java/org/argeo/slc/detached/DetachedContextImpl.java
c60df2f44c47e6fbf40cccf9ca70cd6449d9f6b6
2 * Copyright (C) 2007-2012 Argeo GmbH
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.
16 package org
.argeo
.slc
.detached
;
18 import java
.util
.ArrayList
;
19 import java
.util
.List
;
22 import java
.util
.TreeMap
;
23 import java
.util
.Vector
;
25 public class DetachedContextImpl
implements DetachedContext
{
26 private List executedPaths
= new Vector();
27 private String currentPath
;
28 private Map dynamicRefs
= new TreeMap();
30 public String
getCurrentPath() {
34 public void setDynamicRef(String ref
, Object obj
) {
35 dynamicRefs
.put(ref
, obj
);
38 public Object
getDynamicRef(String ref
) {
39 if (dynamicRefs
.containsKey(ref
))
40 return dynamicRefs
.get(ref
);
45 public List
getExecutedPaths() {
46 return new ArrayList(executedPaths
);
49 public String
toString() {
50 StringBuffer buf
= new StringBuffer(getClass().getName());
51 buf
.append(" currentPath=").append(currentPath
);
52 buf
.append(" executedPaths=").append(executedPaths
);
53 return buf
.toString();
56 public Set
getDynamicRefKeys() {
57 return dynamicRefs
.keySet();