All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.bdeploy.jersey.JerseyScopeService Maven / Gradle / Ivy

Go to download

Public API including dependencies, ready to be used for integrations and plugins.

There is a newer version: 7.3.6
Show newest version
package io.bdeploy.jersey;

import java.util.List;

import org.jvnet.hk2.annotations.Service;

import io.bdeploy.jersey.ws.change.msg.ObjectScope;

@Service
public class JerseyScopeService {

    private final ThreadLocal> scopes = new ThreadLocal<>();
    private final ThreadLocal users = new ThreadLocal<>();

    public void setScope(List scope, String user) {
        this.scopes.set(scope);
        this.users.set(user);
    }

    public List getScope() {
        return this.scopes.get();
    }

    public ObjectScope getObjectScope() {
        return new ObjectScope(this.scopes.get());
    }

    public String getUser() {
        return this.users.get();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy