com.softicar.platform.common.core.user.CurrentBasicUser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of platform-common Show documentation
Show all versions of platform-common Show documentation
The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.
package com.softicar.platform.common.core.user;
import com.softicar.platform.common.core.singleton.Singleton;
/**
* References the currently active {@link IBasicUser}.
*
* @author Oliver Richers
*/
public class CurrentBasicUser {
private static final Singleton VALUE = new Singleton().setInheritByIdentity();
/**
* Returns the currently active {@link IBasicUser} or null.
*
* @return the current user (may be null)
*/
public static IBasicUser get() {
return VALUE.get();
}
public static void set(IBasicUser user) {
VALUE.set(user);
}
}