private String getUser() { return vaadinApplicationContext.getUsername(); } }
private String createKey(VaadinApplicationContext context) { return clazz.getName() + ";" + context.getUiId() + ";" + context.getUsername(); } }
private Dictionary<String,Object> getProperties(VaadinApplicationContext applicationContext, Dictionary<String,Object> properties) { if (properties == null) properties = new Hashtable<String,Object>(); String sessionId = applicationContext.getSessionId(); if (sessionId != null && !sessionId.isEmpty()) properties.put("sessionId", applicationContext.getSessionId()); if (applicationContext.getUiId() > -1) properties.put("uiId", applicationContext.getUiId()); return properties; } }
/** * Notifies all listeners that the focus of the vertices has changed. * @param newVertexRefs */ private synchronized void fireVertexRefsUpdated(Collection<VertexRef> newVertexRefs, TopologyServiceClient source) { if (!hasChanged(newVertexRefs, m_verticesInFocus)) { return; } m_verticesInFocus.clear(); m_verticesInFocus.addAll(newVertexRefs); final boolean displayedSelected = m_displayableVertexRefs.size() == m_verticesInFocus.size(); final VerticesUpdateEvent updateEvent = new VerticesUpdateEvent(Collections.unmodifiableSet(m_verticesInFocus), source, displayedSelected); m_applicationContext.getEventProxy(m_serviceManager).fireEvent(updateEvent); } }
@Override public String getSessionId() { return applicationContext.getSessionId(); }
/** * Notifies all listeners that the focus of the vertices has changed. * @param newVertexRefs */ private synchronized void fireVertexRefsUpdated(Collection<VertexRef> newVertexRefs, TopologyServiceClient source) { if (!hasChanged(newVertexRefs, m_verticesInFocus)) { return; } m_verticesInFocus.clear(); m_verticesInFocus.addAll(newVertexRefs); final boolean displayedSelected = m_displayableVertexRefs.size() == m_verticesInFocus.size(); final VerticesUpdateEvent updateEvent = new VerticesUpdateEvent(Collections.unmodifiableSet(m_verticesInFocus), source, displayedSelected); m_applicationContext.getEventProxy(m_serviceManager).fireEvent(updateEvent); } }
@Override public String getSessionId() { return applicationContext.getSessionId(); }
private String getUser() { return vaadinApplicationContext.getUsername(); } }
private String createKey(VaadinApplicationContext context) { return clazz.getName() + ";" + context.getUiId() + ";" + context.getUsername(); } }
private String getFilter(VaadinApplicationContext applicationContext, Hashtable<String,Object> additionalProperties) { if (applicationContext == null && additionalProperties.isEmpty()) return null; String filter = "(&%s%s)"; String sessionFilter = "(sessionId=%s)(uiId=%s)"; String additionalPropertiesFilterString = getAdditionalPropertiesString(additionalProperties); String sessionFilterString = applicationContext == null ? "" : String.format(sessionFilter, applicationContext.getSessionId(), Integer.toString(applicationContext.getUiId())); return String.format(filter, sessionFilterString, additionalPropertiesFilterString); }
@Override public Component getView(final VaadinApplicationContext vaadinApplicationContext, final WidgetContext widgetContext) { // Get the component by asking the blueprint container to instantiate a prototype bean final Component component = (Component)m_container.getComponentInstance(m_beanId); final BundleContext bundleContext = (BundleContext) m_container.getComponentInstance("blueprintBundleContext"); final EventProxy eventProxy = vaadinApplicationContext.getEventProxy(bundleContext); eventProxy.addPossibleEventConsumer(component); injectEventProxy(component, eventProxy); injectVaadinApplicationContext(component, vaadinApplicationContext); return component; }
@Override public void setApplicationContext(VaadinApplicationContext applicationContext) { this.applicationContext = applicationContext; setSessionId(applicationContext.getSessionId()); }
private void loadUserSettings() { applyHistory(m_applicationContext.getUsername(), m_historyManager.getHistoryFragment(m_applicationContext.getUsername())); }
private String createKey(VaadinApplicationContext context) { return clazz.getName() + ";" + context.getUiId() + ";" + context.getUsername(); } }
@Override public Component getView(final VaadinApplicationContext vaadinApplicationContext, final WidgetContext widgetContext) { // Get the component by asking the blueprint container to instantiate a prototype bean final Component component = (Component)m_container.getComponentInstance(m_beanId); final BundleContext bundleContext = (BundleContext) m_container.getComponentInstance("blueprintBundleContext"); final EventProxy eventProxy = vaadinApplicationContext.getEventProxy(bundleContext); eventProxy.addPossibleEventConsumer(component); injectEventProxy(component, eventProxy); injectVaadinApplicationContext(component, vaadinApplicationContext); return component; }
@Override public void setApplicationContext(VaadinApplicationContext applicationContext) { this.applicationContext = applicationContext; setSessionId(applicationContext.getSessionId()); }
private void loadUserSettings() { applyHistory(m_applicationContext.getUsername(), m_historyManager.getHistoryFragment(m_applicationContext.getUsername())); }
@Override public Component getView(final VaadinApplicationContext vaadinApplicationContext, final WidgetContext widgetContext) { // Get the component by asking the blueprint container to instantiate a prototype bean final Component component = (Component)m_container.getComponentInstance(m_beanId); final BundleContext bundleContext = (BundleContext) m_container.getComponentInstance("blueprintBundleContext"); final EventProxy eventProxy = vaadinApplicationContext.getEventProxy(bundleContext); eventProxy.addPossibleEventConsumer(component); injectEventProxy(component, eventProxy); injectVaadinApplicationContext(component, vaadinApplicationContext); return component; }
private boolean loadHistoryFragment(VaadinRequest request) { String fragment = request.getParameter(PARAMETER_HISTORY_FRAGMENT); if (!Strings.isNullOrEmpty(fragment) && getPage() != null) { applyHistory(m_applicationContext.getUsername(), fragment); return true; } return false; }
private boolean loadHistoryFragment(VaadinRequest request) { String fragment = request.getParameter(PARAMETER_HISTORY_FRAGMENT); if (!Strings.isNullOrEmpty(fragment) && getPage() != null) { applyHistory(m_applicationContext.getUsername(), fragment); return true; } return false; }