Tabnine Logo
ThreadLocalUserContext.getUserId
Code IndexAdd Tabnine 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)

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

/**
 * @return the tenants
 */
@Override
public Collection<TenantDO> getTenantsOfLoggedInUser()
{
 return getTenantsOfUser(ThreadLocalUserContext.getUserId());
}
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

/**
 * 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

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

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

/**
 * @return the tenants
 */
public Collection<TenantDO> getTenantsOfLoggedInUser()
{
 return getTenantsOfUser(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

  • Creating JSON documents from java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • getSharedPreferences (Context)
  • getResourceAsStream (ClassLoader)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Notification (javax.management)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • CodeWhisperer alternatives
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