/** * Performs the actual write of the VaadinSession to the underlying HTTP * session after sanity checks have been performed. * <p> * Called by {@link #storeSession(VaadinSession, WrappedSession)} * * @since 7.6 * @param wrappedSession * the underlying HTTP session * @param session * the VaadinSession to store */ protected void writeToHttpSession(WrappedSession wrappedSession, VaadinSession session) { wrappedSession.setAttribute(getSessionAttributeName(), session); }
/** * Associates the given lock with this service and the given wrapped * session. This method should not be called more than once when the lock is * initialized for the session. * * @see #getSessionLock(WrappedSession) * @param wrappedSession * The wrapped session the lock is associated with * @param lock * The lock object */ private void setSessionLock(WrappedSession wrappedSession, Lock lock) { if (wrappedSession == null) { throw new IllegalArgumentException( "Can't set a lock for a null session"); } Object currentSessionLock = wrappedSession .getAttribute(getLockAttributeName()); assert (currentSessionLock == null || currentSessionLock == lock) : "Changing the lock for a session is not allowed"; wrappedSession.setAttribute(getLockAttributeName(), lock); }
newSession.setAttribute(name, value);
@Override public void setProperty(String key, Object value) { instance.setAttribute(key, value); }
/** * Performs the actual write of the VaadinSession to the underlying HTTP * session after sanity checks have been performed. * <p> * Called by {@link #storeSession(VaadinSession, WrappedSession)} * * @since 7.6 * @param wrappedSession * the underlying HTTP session * @param session * the VaadinSession to store */ protected void writeToHttpSession(WrappedSession wrappedSession, VaadinSession session) { wrappedSession.setAttribute(getSessionAttributeName(), session); }
public void buttonClick(ClickEvent event) { ArrayList<ReplayEvent> replayEvents = new ArrayList<ReplayEvent>(); replayEvents.add(replayEvent); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("replayEvents", replayEvents); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("replayService", replayService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("platformConfigurationService", platformConfigurationService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("topologyService", topologyService); } });
public void buttonClick(ClickEvent event) { VaadinService.getCurrentRequest().getWrappedSession().setAttribute("exclusionEvents", getResubmissionEvents()); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("topologyService", topologyService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("errorReportingService", errorReportingService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("errorReportingManagementService", errorReportingManagementService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("exclusionManagementService", exclusionManagementService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("container", container); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("action", ResubmitIgnoreStatusPanel.IGNORE); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("hospitalService", hospitalService); } });
public void buttonClick(ClickEvent event) { VaadinService.getCurrentRequest().getWrappedSession().setAttribute("replayService", replayService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("platformConfigurationService", platformConfigurationService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("topologyService", topologyService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("replayEvent", (ReplayEvent)replayEvent); } });
public void buttonClick(ClickEvent event) { VaadinService.getCurrentRequest().getWrappedSession().setAttribute("categorisedErrorOccurrence", categorisedErrorOccurrence); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("errorReportManagementService", errorReportingManagementService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("hospitalManagementService", hospitalManagementService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("topologyService", topologyService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("exclusionManagementService", exclusionManagementService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("container", container); } });
public void buttonClick(ClickEvent event) { VaadinService.getCurrentRequest().getWrappedSession().setAttribute("errorReportService", errorReportingService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("errorReportManagementService", errorReportingManagementService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("platformConfigurationService", platformConfigurationService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("errorOccurrence", errorOccurrence); } });
public void buttonClick(ClickEvent event) { VaadinService.getCurrentRequest().getWrappedSession().setAttribute("replayService", replayService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("platformConfigurationService", platformConfigurationService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("topologyService", topologyService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("replayEvent", (ReplayEvent)replayEvent); } });
public void buttonClick(ClickEvent event) { // todo add replay events VaadinService.getCurrentRequest().getWrappedSession().setAttribute("replayEvents", getReplayEvents()); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("replayService", replayService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("topologyService",topologyService ); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("platformConfigurationService", platformConfigurationService); } });
public void buttonClick(ClickEvent event) { VaadinService.getCurrentRequest().getWrappedSession().setAttribute("exclusionEvents", getResubmissionEvents()); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("topologyService", topologyService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("errorReportingService", errorReportingService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("errorReportingManagementService", errorReportingManagementService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("exclusionManagementService", exclusionManagementService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("container", container); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("action", ResubmitIgnoreStatusPanel.RESUBMIT); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("hospitalService", hospitalService); } });
public void buttonClick(ClickEvent event) { VaadinService.getCurrentRequest().getWrappedSession().setAttribute("exclusionEvent", exclusionEvent); ExclusionEventAction action = hospitalManagementService.getExclusionEventActionByErrorUri(exclusionEvent.getErrorUri()); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("errorOccurrence", errorOccurrence); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("exclusionEventAction", action); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("hospitalManagementService", hospitalManagementService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("topologyService", topologyService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("errorReportingManagementService", errorReportingManagementService); VaadinService.getCurrentRequest().getWrappedSession().setAttribute("hospitalService", hospitalService); } });
/** * Returns the current users workplace settings.<p> * * @param cms the CMS context * @param session the session * * @return the settings */ private static CmsWorkplaceSettings getWorkplaceSettings(CmsObject cms, HttpSession session) { CmsWorkplaceSettings settings = (CmsWorkplaceSettings)session.getAttribute( CmsWorkplaceManager.SESSION_WORKPLACE_SETTINGS); if (settings == null) { settings = CmsLoginHelper.initSiteAndProject(cms); if (VaadinService.getCurrentRequest() != null) { VaadinService.getCurrentRequest().getWrappedSession().setAttribute( CmsWorkplaceManager.SESSION_WORKPLACE_SETTINGS, settings); } else { session.setAttribute(CmsWorkplaceManager.SESSION_WORKPLACE_SETTINGS, settings); } } return settings; }
@Override public void setUrls(String selectorId, List<String> urls) { VaadinRequest vaadinRequest = VaadinService.getCurrentRequest(); if (vaadinRequest != null) vaadinRequest.getWrappedSession().setAttribute(getAttributeName(selectorId), urls); else { HttpSession httpSession = getHttpSession(); if (httpSession != null) { httpSession.setAttribute(getAttributeName(selectorId), urls); } } }
public static void setUser(AnnisUser user) { if (user == null) { VaadinSession.getCurrent().getSession().removeAttribute( AnnisBaseUI.USER_KEY); } else { VaadinSession.getCurrent().getSession().setAttribute(AnnisBaseUI.USER_KEY, user); } }
/** * Returns the workplace settings.<p> * * @return the workplace settings */ public CmsWorkplaceSettings getWorkplaceSettings() { CmsWorkplaceSettings settings = (CmsWorkplaceSettings)getSession().getSession().getAttribute( CmsWorkplaceManager.SESSION_WORKPLACE_SETTINGS); if (settings == null) { settings = CmsLoginHelper.initSiteAndProject(getCmsObject()); VaadinService.getCurrentRequest().getWrappedSession().setAttribute( CmsWorkplaceManager.SESSION_WORKPLACE_SETTINGS, settings); } return settings; }
public void valueChange(ValueChangeEvent event) { CmsUUID viewId = (CmsUUID)(event.getProperty().getValue()); CmsElementView selectedView; if (viewId.equals(ID_VIEW_ALL)) { selectedView = VIEW_ALL; } else { selectedView = OpenCms.getADEManager().getElementViews(A_CmsUI.getCmsObject()).get( event.getProperty().getValue()); } init(selectedView, m_defaultLocationCheckbox.getValue().booleanValue()); if (selectedView != VIEW_ALL) { VaadinService.getCurrentRequest().getWrappedSession().setAttribute( SETTING_STANDARD_VIEW, (event.getProperty().getValue())); } } });
@Override protected void init(VaadinRequest request) { initLogging(); // store the webservice URL property explicitly in the session in order to // access it from the "external" servlets getSession().getSession().setAttribute(WEBSERVICEURL_KEY, getSession().getAttribute(Helper.KEY_WEB_SERVICE_URL)); getSession().setAttribute(CONTEXT_PATH, request.getContextPath()); alreadyAddedCSS.clear(); initPlugins(); checkIfRemoteLoggedIn(request); getSession().addRequestHandler(new RemoteUserRequestHandler()); }