This project has retired. For details please refer to its
Attic page.
CallContextImpl xref
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.chemistry.opencmis.server.impl;
20
21 import java.io.File;
22 import java.math.BigInteger;
23 import java.util.HashMap;
24 import java.util.Map;
25
26 import org.apache.chemistry.opencmis.commons.server.CallContext;
27
28
29
30
31 public class CallContextImpl implements CallContext {
32
33 private final String binding;
34 private final boolean objectInfoRequired;
35 private final Map<String, Object> parameter = new HashMap<String, Object>();
36
37 public CallContextImpl(String binding, String repositoryId, boolean objectInfoRequired) {
38 this.binding = binding;
39 this.objectInfoRequired = objectInfoRequired;
40 put(REPOSITORY_ID, repositoryId);
41 }
42
43 public String getBinding() {
44 return binding;
45 }
46
47 public boolean isObjectInfoRequired() {
48 return objectInfoRequired;
49 }
50
51 public Object get(String key) {
52 return parameter.get(key);
53 }
54
55 public String getRepositoryId() {
56 return (String) get(REPOSITORY_ID);
57 }
58
59 public String getUsername() {
60 return (String) get(USERNAME);
61 }
62
63 public String getPassword() {
64 return (String) get(PASSWORD);
65 }
66
67 public String getLocale() {
68 return (String) get(LOCALE);
69 }
70
71 public BigInteger getOffset() {
72 return (BigInteger) get(OFFSET);
73 }
74
75 public BigInteger getLength() {
76 return (BigInteger) get(LENGTH);
77 }
78
79 public File getTempDirectory() {
80 return (File) get(TEMP_DIR);
81 }
82
83 public int getMemoryThreshold() {
84 return (Integer) get(MEMORY_THRESHOLD);
85 }
86
87
88
89
90 public void put(String key, Object value) {
91 parameter.put(key, value);
92 }
93
94
95
96
97 public Object remove(String key) {
98 return parameter.remove(key);
99 }
100 }