Codota Logo
ThreadLocalUserContext.getUserId
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: micromata/projectforge

/**
 * @see org.projectforge.business.teamcal.filter.ICalendarFilter#setShowTimesheets(boolean)
 */
public TemplateEntry setShowTimesheets(final boolean showTimesheets)
{
 this.timesheetUserId = ThreadLocalUserContext.getUserId();
 return this;
}
origin: micromata/projectforge

public CalendarFilter()
{
 super();
 timesheetUserId = ThreadLocalUserContext.getUserId();
 selectedCalendar = Const.EVENT_CLASS_NAME;
}
origin: micromata/projectforge

@Override
public String getCurrentUserId()
{
 Integer userId = ThreadLocalUserContext.getUserId();
 if (userId != null) {
  return userId.toString();
 }
 return "anon";
}
origin: micromata/projectforge

/**
 * @see org.projectforge.web.calendar.AbstractICSExportDialog#getUrl()
 */
@Override
protected String getUrl()
{
 return calendarFeedService
   .getUrl4Timesheets(timesheetUserId != null ? timesheetUserId : ThreadLocalUserContext.getUserId());
}
origin: micromata/projectforge

/**
 * Uses the context user.
 *
 * @param data
 * @return
 * @see #encrypt(Integer, String)
 */
@Override
public String encrypt(final String data)
{
 return encrypt(ThreadLocalUserContext.getUserId(), data);
}
origin: micromata/projectforge

/**
 * Check for current logged in user.
 *
 * @param groupId
 * @return
 */
public boolean isLoggedInUserMemberOfGroup(final Integer groupId)
{
 return isUserMemberOfGroup(ThreadLocalUserContext.getUserId(), groupId);
}
origin: micromata/projectforge

/**
 * @return the tenants
 */
@Override
public Collection<TenantDO> getTenantsOfLoggedInUser()
{
 return getTenantsOfUser(ThreadLocalUserContext.getUserId());
}
origin: micromata/projectforge

public boolean isUserMemberOfMarketingGroup()
{
 return isUserMemberOfMarketingGroup(ThreadLocalUserContext.getUserId());
}
origin: micromata/projectforge

/**
 * @return the tenants
 */
public Collection<TenantDO> getTenantsOfLoggedInUser()
{
 return getTenantsOfUser(ThreadLocalUserContext.getUserId());
}
origin: micromata/projectforge

 @Override
 protected FFPDebtFilter newSearchFilterInstance()
 {
  return new FFPDebtFilter(ThreadLocalUserContext.getUserId());
 }
}
origin: micromata/projectforge

@Override
public void onSubmit()
{
 caller.select(selectProperty, ThreadLocalUserContext.getUserId());
 markTextFieldModelAsChanged();
}
origin: micromata/projectforge

 @Override
 public String getObject()
 {
  if (ThreadLocalUserContext.getUserId().equals(user.getId()) == true) {
   return userDao.getAuthenticationToken(user.getId());
  } else {
   // Administrators shouldn't see the token.
   return "*****";
  }
 }
}));
origin: micromata/projectforge

 @Override
 protected void onEvent(final AjaxRequestTarget target)
 {
  userXmlPreferencesDao.saveOrUpdate(ThreadLocalUserContext.getUserId(), "disableSnowEffectPermant", Boolean.TRUE, true);
  userXmlPreferencesCache.putEntry(ThreadLocalUserContext.getUserId(), "disableSnowEffectPermant", Boolean.TRUE, true);
  setResponsePage(getPage().getPageClass());
 }
}));
origin: micromata/projectforge

@Override
protected void onSave(final ToDoDO obj)
{
 if (ObjectUtils.equals(ThreadLocalUserContext.getUserId(), obj.getAssigneeId()) == false) {
  // To-do is changed by other user than assignee, so set recent flag for this to-do for the assignee.
  obj.setRecent(true);
 }
}
origin: micromata/projectforge

private boolean checkWriteAccess()
{
 if (data.getEmployee().getUser().getPk().equals(ThreadLocalUserContext.getUserId()) == true || (data.getManager() != null
   && data.getManager().getUser().getPk().equals(ThreadLocalUserContext.getUserId())) == true) {
  return true;
 }
 if (checkHRWriteRight()) {
  return true;
 }
 return false;
}
origin: micromata/projectforge

/**
 * @see org.projectforge.framework.persistence.api.BaseDao#getListForSearchDao(org.projectforge.framework.persistence.api.BaseSearchFilter)
 */
@Override
public List<TimesheetDO> getListForSearchDao(final BaseSearchFilter filter)
{
 final TimesheetFilter timesheetFilter = new TimesheetFilter(filter);
 if (filter.getModifiedByUserId() == null) {
  timesheetFilter.setUserId(ThreadLocalUserContext.getUserId());
 }
 return getList(timesheetFilter);
}
origin: micromata/projectforge

@Override
protected VacationFilter newSearchFilterInstance()
{
 EmployeeDO employee = employeeService.getEmployeeByUserId(ThreadLocalUserContext.getUserId());
 if (employee == null) {
  throw new AccessException("access.exception.noEmployeeToUser");
 }
 return new VacationFilter(employee.getPk());
}
origin: micromata/projectforge

 @Override
 protected void updateButtonVisibility()
 {
  super.updateButtonVisibility();
  //Set delete button only for employee or hr write right
  markAsDeletedButtonPanel.setVisible(false);
  if (data.getEmployee().getUser().getPk().equals(ThreadLocalUserContext.getUserId()) || checkHRWriteRight()) {
   markAsDeletedButtonPanel.setVisible(true);
  }
 }
}
origin: micromata/projectforge

private void createDefaultEntry()
{
 final TemplateEntry newTemplate = new TemplateEntry();
 newTemplate.setName(ThreadLocalUserContext.getLocalizedString("default"));
 newTemplate.setTimesheetUserId(ThreadLocalUserContext.getUserId()).setShowBirthdays(true).setShowBreaks(true)
   .setShowPlanning(true)
   .setShowStatistics(true);
 add(newTemplate);
}
origin: micromata/projectforge

 @Override
 public HRPlanningListFilter reset()
 {
  super.reset();
  setUserId(ThreadLocalUserContext.getUserId());
  final DateHolder date = new DateHolder(DatePrecision.DAY);
  date.setBeginOfWeek();
  setStartTime(date.getTimestamp());
  date.setEndOfWeek();
  setStopTime(date.getTimestamp());
  return this;
 }
}
org.projectforge.framework.persistence.user.apiThreadLocalUserContextgetUserId

Popular methods of ThreadLocalUserContext

  • getUser
  • getLocalizedString
  • getTimeZone
  • 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.
  • clear
  • 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

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getContentResolver (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now