Tabnine Logo
ThreadLocalUserContext.clear
Code IndexAdd Tabnine to your IDE (free)

How to use
clear
method
in
org.projectforge.framework.persistence.user.api.ThreadLocalUserContext

Best Java code snippets using org.projectforge.framework.persistence.user.api.ThreadLocalUserContext.clear (Showing top 5 results out of 315)

origin: micromata/projectforge

/**
 * If given user is null, {@link #clear()} is called.
 *
 * @param user
 */
public final static void setUser(UserGroupCache userGroupCache, final PFUserDO user)
{
 if (user == null) {
  clear();
  return;
 }
 final UserContext userContext = new UserContext(user, userGroupCache);
 setUserContext(userContext);
}
origin: micromata/projectforge

public void logout()
{
 PFUserDO user = userContext != null ? userContext.getUser() : null;
 if (user != null) {
  log.info("User logged out: " + user.getShortDisplayName());
  user = null;
 }
 ThreadLocalUserContext.clear();
 userContext = null;
 super.clear();
 super.invalidateNow();
}
origin: micromata/projectforge

private void internalShutdown()
{
 log.info("Shutdown...");
 upAndRunning = false;
 try {
  final UserContext internalSystemAdminUserContext = UserContext
    .__internalCreateWithSpecialUser(DatabaseService
      .__internalGetSystemAdminPseudoUser(), getUserGroupCache());
  ThreadLocalUserContext.setUserContext(internalSystemAdminUserContext); // Logon admin user.
  databaseUpdater.shutdownDatabase();
 } finally {
  ThreadLocalUserContext.clear();
 }
 log.info("Shutdown completed.");
}
origin: micromata/projectforge

ThreadLocalUserContext.clear();
MDC.remove("ip");
MDC.remove("session");
origin: micromata/projectforge

ThreadLocalUserContext.clear();
org.projectforge.framework.persistence.user.apiThreadLocalUserContextclear

Popular methods of ThreadLocalUserContext

  • getUser
  • getLocalizedString
  • getTimeZone
  • getUserId
  • getLocale
    If context user's locale is null and the given defaultLocale is not null, then the context user's cl
  • getDateTimeZone
  • setUser
    If given user is null, #clear() is called.
  • getLocalizedMessage
  • getUserContext
  • setUserContext
  • getCalendarFirstDayOfWeek
    The first day of the week, configured at the given user, if not configured ConfigXml#getFirstDayOfWe
  • getJodaFirstDayOfWeek
  • getCalendarFirstDayOfWeek,
  • getJodaFirstDayOfWeek

Popular in Java

  • Creating JSON documents from java classes using gson
  • setRequestProperty (URLConnection)
  • startActivity (Activity)
  • putExtra (Intent)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Runner (org.openjdk.jmh.runner)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now