blob: fee1141d980c24ae8bb8849accb8c4a5153b7e2f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/*
* SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
*
* SPDX-License-Identifier: EPL-2.0
*/
package tools.refinery.language.web.xtext.servlet;
import java.util.Map;
import java.util.Set;
import org.eclipse.xtext.web.server.IServiceContext;
import org.eclipse.xtext.web.server.ISession;
import com.google.common.collect.ImmutableSet;
public record SimpleServiceContext(ISession session, Map<String, String> parameters) implements IServiceContext {
@Override
public Set<String> getParameterKeys() {
return ImmutableSet.copyOf(parameters.keySet());
}
@Override
public String getParameter(String key) {
return parameters.get(key);
}
@Override
public ISession getSession() {
return session;
}
}
|